1
1
<template >
2
- <u-card :title =" title" :sub-title =" subTitle" :thumb =" thumb" >
3
- <view class =" " slot =" body" >
4
- <view class =" u-body-item u-flex u-border-bottom u-col-between u-p-t-0" >
5
- <view class =" u-body-item-title u-line-2" >瓶身描绘的牡丹一如你初妆,冉冉檀香透过窗心事我了然,宣纸上走笔至此搁一半</view >
6
- <image src =" https://img11.360buyimg.com/n7/jfs/t1/94448/29/2734/524808/5dd4cc16E990dfb6b/59c256f85a8c3757.jpg" mode =" aspectFill" ></image >
7
- </view >
8
- <view class =" u-body-item u-flex u-row-between u-p-b-0" >
9
- <view class =" u-body-item-title u-line-2" >釉色渲染仕女图韵味被私藏,而你嫣然的一笑如含苞待放</view >
10
- <image src =" https://img12.360buyimg.com/n7/jfs/t1/102191/19/9072/330688/5e0af7cfE17698872/c91c00d713bf729a.jpg" mode =" aspectFill" ></image >
11
- </view >
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 >
12
8
</view >
13
- <view class =" " slot =" foot" ><u-icon name =" chat-fill" size =" 34" color =" " label =" 30评论" ></u-icon ></view >
14
- </u-card >
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
+
78
+ </view >
79
+
15
80
</template >
16
81
17
82
<script >
18
- export default {
19
- data () {
20
- return {
21
- title: ' 素胚勾勒出青花,笔锋浓转淡' ,
22
- subTitle: ' 2020-05-15' ,
23
- thumb: ' http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg' ,
24
- };
83
+ export default {
84
+ data () {
85
+ 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
+
120
+ },
121
+ {
122
+ name: ' 守望先锋' ,
123
+ alias: ' 守望屁股' ,
124
+ else: ' 打你**' ,
125
+
126
+ },
127
+ {
128
+ name: ' 炉石传说' ,
129
+ alias: ' 非酋玩家' ,
130
+ else: ' 冲你**' ,
131
+
132
+ }
133
+ ],
134
+
135
+ // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
136
+ // value: false,
137
+
138
+
139
+ }
140
+ },
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
+
151
+ },
152
+ 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
+
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
+ }
25
192
}
26
- };
27
193
</script >
28
194
29
- <style scoped lang="scss">
30
- .u-card-wrap {
31
- background-color : $u-bg-color ;
32
- padding : 1 px ;
195
+ <style lang="scss">
196
+ .u-read-more {
197
+ border : 1 px solid #007AFF ;
198
+ margin-top : 10 rpx ;
33
199
}
34
-
35
- .u-body-item {
36
- font-size : 32 rpx;
37
- color : #333 ;
38
- padding : 20 rpx 10 rpx;
200
+
201
+ .u-content {
202
+ font-size : 12 ;
203
+
39
204
}
40
-
41
- .u-body-item image {
42
- width : 120 rpx;
43
- flex : 0 0 120 rpx;
44
- height : 120 rpx;
45
- border-radius : 8 rpx;
46
- margin-left : 12 rpx;
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
+ }
47
230
}
48
- </style >
231
+ </style >
0 commit comments