1
1
<template >
2
- <view >
3
- <view class =" wed" >
4
- <!-- 单选日期 -->
5
- <text @click =" WE=!WE" >开始</text >
6
- <input type =" text" v-model =" result" />
7
- <u-calendar v-model =" WE" :mode =" WEmode" @change =" WEchange" start-text =" 开始" end-text =" 结束" ></u-calendar >
8
- </view >
9
-
10
- <view class =" wed" >
11
- <!-- 多选日期 -->
12
- <text @click =" WED=!WED" >开始</text >
13
- <input type =" text" v-model =" startDate" />
14
- <text @click =" WED=!WED" >结束</text >
15
- <input type =" text" v-model =" endDate" />
16
- <u-calendar v-model =" WED" :mode =" WEDmode" @change =" WEDchange" start-text =" 开始" end-text =" 结束" ></u-calendar >
17
- </view >
18
-
19
-
20
- <view class =" " >
21
- <u-read-more class =" u-read-more" :toggle =" true" show-height =" 100" font-size =" 12" close-text =" 更多" :shadow-style =" shadowStyle" >
22
- <rich-text :nodes =" content" ></rich-text >
23
- </u-read-more >
24
- <u-read-more class =" u-read-more" :toggle =" true" show-height =" 100" font-size =" 12" close-tex t =" 更多" :shadow-style =" shadowStyle" >
25
- <rich-text :nodes =" content" ></rich-text >
26
- </u-read-more >
27
-
28
- </view >
29
-
30
- <view >
31
- <!-- 字段少的表格 -->
32
- <u-table >
33
- <u-tr >
34
- <u-th width =" 30%" >学校</u-th >
35
- <u-th >班级</u-th >
36
- <u-th >年龄</u-th >
37
- <u-th >爱好</u-th >
38
- </u-tr >
39
- <u-tr v-for =" (item, index) in itemList" :key =" index" >
40
- <u-td width =" 6%" >
41
- <u-checkbox-group @change =" checkboxGroupChange1(index)" >
42
- <u-checkbox @change =" checkboxChange" v-model =" item.checked" ></u-checkbox >
43
- </u-checkbox-group >
44
- </u-td >
45
- <u-td >{{item.warehouseid}}</u-td >
46
- <u-td >{{item.warehouseid}}</u-td >
47
- <u-td >{{item.desc}}</u-td >
48
- <u-td >{{item.desc}}</u-td >
49
- </u-tr >
50
- </u-table >
51
- </view >
52
-
53
-
54
-
55
- <view >
56
- <u-table >
57
- <u-tr >
58
- <u-th width =" 38%" >名称</u-th >
59
- <u-th >别名</u-th >
60
- <u-th >座右铭</u-th >
61
- </u-tr >
62
- <u-tr v-for =" (item, index) in itemList" :key =" index" >
63
- <u-td width =" 6%" >
64
- <u-radio-group v-model =" value" label-disabled =" true" @change =" radioGroupChange(index)" >
65
- <u-radio @change =" radioChange" :name =" item.warehouseid" >
66
-
67
- </u-radio >
68
- </u-radio-group >
69
- </u-td >
70
- <u-td >{{item.warehouseid}}</u-td >
71
- <u-td >{{item.warehouseid}}</u-td >
72
- <u-td >{{item.desc}}</u-td >
73
-
74
- </u-tr >
75
- </u-table >
76
- </view >
77
-
2
+ <view class =" wrap" >
3
+ <u-swiper :list =" list" ></u-swiper >
78
4
</view >
79
-
80
5
</template >
81
6
82
7
<script >
83
8
export default {
84
9
data () {
85
10
return {
86
- // ----单选------------
87
- WE : false ,
88
- WEmode: " date" ,
89
- result: ' ' ,
90
- // ---------------------
91
-
92
- // ----多选--------------
93
- WED : false ,
94
- WEDmode: ' range' ,
95
- startDate: " " ,
96
- endDate: ' ' ,
97
- // ----------------------
98
- content: ` 客户:山不在高,有仙则名。水不在深,有龙则灵。斯是陋室,惟吾德馨。
99
- 苔痕上阶绿,草色入帘青。谈笑有鸿儒,往来无白丁。可以调素琴,阅金经。
100
- 无丝竹之乱耳,无案牍之劳形。南阳诸葛庐,西蜀子云亭。孔子云:何陋之有?` ,
101
- shadowStyle: {
102
- // backgroundImage: "linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, #fff 80%)",
103
- paddingTop: " 300rpx" ,
104
- marginTop: " -300rpx" ,
105
-
106
- },
107
- // -------------单选框
108
- checked: false ,
109
- checked1: false ,
110
- currentSort: 0 ,
111
- itemList: {},
112
-
113
-
114
- value: ' orange' ,
115
- bangkList: [{
116
- name: ' 英雄联盟' ,
117
- alias: ' 撸啊撸' ,
118
- else: ' 玩你**' ,
119
-
11
+ list: [{
12
+ image: ' /static/uView/swiper/swiper1.jpg' ,
13
+ title: ' 蒹葭苍苍,白露为霜。所谓伊人,在水一方'
120
14
},
121
15
{
122
- name: ' 守望先锋' ,
123
- alias: ' 守望屁股' ,
124
- else: ' 打你**' ,
125
-
16
+ image: ' /static/uView/swiper/swiper2.jpg' ,
17
+ title: ' 溯洄从之,道阻且长。溯游从之,宛在水中央'
126
18
},
127
19
{
128
- name: ' 炉石传说' ,
129
- alias: ' 非酋玩家' ,
130
- else: ' 冲你**' ,
131
-
20
+ image: ' /static/uView/swiper/swiper3.jpg' ,
21
+ title: ' 蒹葭萋萋,白露未晞。所谓伊人,在水之湄'
132
22
}
133
- ],
134
-
135
- // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
136
- // value: false,
137
-
138
-
23
+ ]
139
24
}
140
25
},
141
- created () {
142
- // 页面一进来就发送请求
143
- uni .request ({
144
- url: ' http://47.99.173.114:9999/wms/wmmdwarehouse/list' ,
145
- method: ' GET' ,
146
- success : res => {
147
- this .itemList = res .data
148
- }
149
- })
150
-
26
+ onLoad () {
27
+ setTimeout (() => {
28
+ this .list .pop ();
29
+ }, 2000 )
151
30
},
152
31
methods: {
153
- // 选中某个单选框时,由radio时触发
154
- radioChange (e ) {
155
- // console.log(e);
156
- },
157
-
158
- // 选中任一radio时,由radio-group触发
159
- radioGroupChange (index ) {
160
- console .log (index);
161
- },
162
-
163
-
164
- checkboxGroupChange1 (index ) {
165
- console .log (" 下标为:" + index);
166
-
167
- },
168
- // 选中某个复选框时,由checkbox时触发
169
- checkboxChange (e ) {
170
- console .log (e);
171
-
172
32
173
- },
174
- // 选中任一checkbox时,由checkbox-group触发
175
- checkboxGroupChange (e ) {
176
- console .log (" 全部选按钮" + e);
177
- },
178
-
179
- WEchange (e ) {
180
- console .log (e); // 打印出来的值
181
- // ----------时间单选-----------
182
- this .result = e .result
183
- },
184
- WEDchange (e ) {
185
- console .log (e); // 打印出来的值
186
- // ----------时间多选择-----------
187
- this .startDate = e .startDate // 赋值
188
- this .endDate = e .endDate // 赋值
189
-
190
- },
191
33
}
192
34
}
193
35
</script >
194
36
195
- <style lang="scss">
196
- .u-read-more {
197
- border : 1px solid #007AFF ;
198
- margin-top : 10 rpx;
199
- }
200
-
201
- .u-content {
202
- font-size : 12 ;
203
-
204
- }
205
-
206
- .wed {
207
- rich-text {
208
- font-size : 12 rpx;
209
- color : #0066CC
210
- }
211
-
212
- text {
213
- width : 100 rpx;
214
- height : 100% ;
215
- }
216
-
217
- width : 100% ;
218
- height : 100% ;
219
- display : flex ;
220
- border : 2 rpx solid #007AFF ;
221
- // justify-content: center;
222
-
223
- .red {
224
-
225
- uni-view ,
226
- uni-text {
227
- border : 1px solid #007aff ;
228
- }
229
- }
37
+ <style lang="scss" scoped>
38
+ .wrap {
39
+ padding : 40 rpx;
230
40
}
231
- </style >
41
+ </style >
0 commit comments