special.vue
3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<template>
<view>
<view class="head">
<view class="search_input">
<image src="../../static/img/search.png"></image>
<input type="text" placeholder="请输入想搜索的文章" />
</view>
</view>
<tab :lists="lists" :tab_color="tab_color" @switchover="switchover" :gauge="gauge"></tab>
<!-- 占位符 -->
<view style="width: 100%;height: 220rpx;"></view>
<view class="special">
<view class="special_list">
<view class="special_list_top">
<view class="left">
标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题 标题标题标题
</view>
<view class="right">
<image src="../../static/img/banner.png"></image>
</view>
</view>
<view class="special_list_bottom">
<text>
来源:法院法院法院
</text>
<text>
2021-03-21 19:40
</text>
</view>
</view>
</view>
</view>
</template>
<script>
import Tab from '../../components/Tab.vue';
export default {
components:{
Tab
},
data() {
return {
//tab切换数组
lists:[
{id:1,name:'普法文章'},
{id:2,name:'测试数据1'},
{id:3,name:'测试数据测试数据'},
{id:4,name:'测试数据阿萨德'},
{id:5,name:'测试数据阿萨德'},
{id:6,name:'测试数据大声道'},
{id:7,name:'测试数据fff'},
{id:8,name:'测试数据1'},
],
//tab切换选中的颜色
tab_color:'#3b87f6',
// tab组件position: fixed布局距离头部的位置大小(rpx)
gauge:120
};
},
methods:{
switchover:function(id){
console.log(id)
}
}
}
</script>
<style lang="scss">
.head{
width: 100%;
height: 120rpx;
padding: 0rpx 30rpx;
box-sizing: border-box;
background: #3b87f6;
display: flex;
align-items: center;
position: fixed;
top: 0rpx;
z-index: 99;
.search_input {
width: 100%;
height: 60rpx;
background: #fff;
border-radius: 50rpx;
display: flex;
align-items: center;
image {
width: 28rpx;
height: 28rpx;
margin-left: 26rpx;
}
input {
font-size: 26rpx;
margin-left: 25rpx;
}
}
}
.special{
width: 100%;
padding: 0rpx 30rpx;
box-sizing: border-box;
.special_list{
width: 100%;
height: 270rpx;
border-bottom: 2rpx solid #e7e7e7;
padding: 40rpx 0rpx;
box-sizing: border-box;
.special_list_top{
display: flex;
justify-content: space-between;
.left{
width: 65%;
height: 140rpx;
line-height: 46rpx;
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.right{
width: 30%;
height: 140rpx;
image{
width: 100%;
height: 100%;
}
}
}
.special_list_bottom{
width: 100%;
height: 100rpx;
line-height: 100rpx;
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #999999;
}
}
}
</style>