@kengic/uni 0.6.3-beta.0 → 0.6.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/WMS/Controllers/CommonController/GetLatestApkVersion.ts +21 -28
- package/dist/api/WMS/Controllers/CommonController/index.ts +1 -1
- package/dist/api/WMS/Controllers/LoginController/GetUserInfo.ts +21 -0
- package/dist/api/WMS/Controllers/LoginController/Logout.ts +21 -28
- package/dist/api/WMS/Controllers/LoginController/index.ts +2 -1
- package/dist/api/WMS/Controllers/WhController/ListVO.ts +88 -92
- package/dist/api/WMS/Controllers/WhController/index.ts +1 -1
- package/dist/api/WMS/Controllers/WorkstationController/List.ts +45 -0
- package/dist/api/WMS/Controllers/WorkstationController/index.ts +1 -0
- package/dist/api/WMS/Controllers/index.ts +4 -3
- package/dist/api/WMS/index.ts +2 -2
- package/dist/api/WMS/models.ts +318 -192
- package/dist/api/api.ts +1 -1
- package/dist/api/def.ts +1 -1
- package/dist/api/index.ts +2 -2
- package/dist/component/KgStation/KgStation.vue +176 -0
- package/dist/component/KgStation/index.hooks.ts +62 -0
- package/dist/component/KgStation/index.store.ts +76 -0
- package/dist/component/KgStation/index.ts +4 -0
- package/dist/component/KgTabBar/KgTabBar.vue +2 -2
- package/dist/component/KgWarehouse/KgWarehouse.vue +47 -30
- package/dist/component/KgWarehouse/index.hooks.ts +24 -1
- package/dist/component/KgWarehouse/index.store.ts +8 -8
- package/dist/component/index.ts +1 -0
- package/dist/index.css +5 -0
- package/dist/service/http-client.ts +9 -2
- package/dist/store/app.store.ts +68 -49
- package/dist/uni/uni-ui/uni-data-select/uni-data-select.vue +18 -13
- package/dist/uni/uni-ui/uni-icons/uniicons_file.ts +646 -646
- package/dist/uni/uni-ui/uni-icons/uniicons_file_vue.js +646 -646
- package/dist/uni/uni-ui/uni-list-item/uni-list-item.vue +507 -503
- package/dist/uni/uni-ui/uni-popup-dialog/keypress.js +42 -42
- package/dist/uni/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +12 -7
- package/dist/uni/uni-ui/uni-rate/uni-rate.vue +1 -2
- package/dist/util/kg.ts +33 -7
- package/package.json +2 -2
|
@@ -1,534 +1,538 @@
|
|
|
1
1
|
<template>
|
|
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
|
-
|
|
2
|
+
<!-- #ifdef APP-NVUE -->
|
|
3
|
+
<cell :keep-scroll-position="keepScrollPosition">
|
|
4
|
+
<!-- #endif -->
|
|
5
|
+
<view
|
|
6
|
+
:class="{ 'uni-list-item--disabled': disabled }"
|
|
7
|
+
:style="{ 'background-color': customStyle.backgroundColor }"
|
|
8
|
+
:hover-class="(!clickable && !link) || disabled || showSwitch ? '' : 'uni-list-item--hover'"
|
|
9
|
+
class="uni-list-item"
|
|
10
|
+
@click="onClick"
|
|
11
|
+
>
|
|
12
|
+
<view v-if="!isFirstChild" class="border--left" :class="{ 'uni-list--border': border }"></view>
|
|
13
|
+
<view
|
|
14
|
+
class="uni-list-item__container"
|
|
15
|
+
:class="{ 'container--right': showArrow || link, 'flex--direction': direction === 'column' }"
|
|
16
|
+
:style="{ paddingTop: padding.top, paddingLeft: padding.left, paddingRight: padding.right, paddingBottom: padding.bottom }"
|
|
17
|
+
>
|
|
18
|
+
<slot name="header">
|
|
19
|
+
<view class="uni-list-item__header">
|
|
20
|
+
<view v-if="thumb" class="uni-list-item__icon">
|
|
21
|
+
<image :src="thumb" class="uni-list-item__icon-img" :class="['uni-list--' + thumbSize]" />
|
|
22
|
+
</view>
|
|
23
|
+
<view v-else-if="showExtraIcon" class="uni-list-item__icon">
|
|
24
|
+
<uni-icons :customPrefix="extraIcon.customPrefix" :color="extraIcon.color" :size="extraIcon.size" :type="extraIcon.type" />
|
|
25
|
+
</view>
|
|
26
|
+
</view>
|
|
27
|
+
</slot>
|
|
28
|
+
<slot name="body">
|
|
29
|
+
<view class="uni-list-item__content" :class="{ 'uni-list-item__content--center': thumb || showExtraIcon || showBadge || showSwitch }">
|
|
30
|
+
<text v-if="title" class="uni-list-item__content-title" :class="[ellipsis !== 0 && ellipsis <= 2 ? 'uni-ellipsis-' + ellipsis : '']"
|
|
31
|
+
>{{ title }}
|
|
32
|
+
</text>
|
|
33
|
+
<text v-if="note" class="uni-list-item__content-note">{{ note }}</text>
|
|
34
|
+
</view>
|
|
35
|
+
</slot>
|
|
36
|
+
<slot name="footer">
|
|
37
|
+
<view v-if="rightText || showBadge || showSwitch" class="uni-list-item__extra" :class="{ 'flex--justify': direction === 'column' }">
|
|
38
|
+
<text v-if="rightText" class="uni-list-item__extra-text">{{ rightText }}</text>
|
|
39
|
+
<uni-badge v-if="showBadge" :type="badgeType" :text="badgeText" :custom-style="badgeStyle" />
|
|
40
|
+
<switch v-if="showSwitch" :disabled="disabled" :checked="switchChecked" @change="onSwitchChange" />
|
|
41
|
+
</view>
|
|
42
|
+
</slot>
|
|
43
|
+
</view>
|
|
44
|
+
<uni-icons v-if="showArrow || link" :size="16" class="uni-icon-wrapper" color="#bbb" type="arrowright" />
|
|
45
|
+
</view>
|
|
46
|
+
<!-- #ifdef APP-NVUE -->
|
|
47
|
+
</cell>
|
|
48
|
+
<!-- #endif -->
|
|
45
49
|
</template>
|
|
46
50
|
|
|
47
51
|
<script>
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
52
|
+
/**
|
|
53
|
+
* ListItem 列表子组件
|
|
54
|
+
* @description 列表子组件
|
|
55
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=24
|
|
56
|
+
* @property {String} title 标题
|
|
57
|
+
* @property {String} note 描述
|
|
58
|
+
* @property {String} thumb 左侧缩略图,若thumb有值,则不会显示扩展图标
|
|
59
|
+
* @property {String} thumbSize = [lg|base|sm] 略缩图大小
|
|
60
|
+
* @value lg 大图
|
|
61
|
+
* @value base 一般
|
|
62
|
+
* @value sm 小图
|
|
63
|
+
* @property {String} badgeText 数字角标内容
|
|
64
|
+
* @property {String} badgeType 数字角标类型,参考[uni-icons](https://ext.dcloud.net.cn/plugin?id=21)
|
|
65
|
+
* @property {Object} badgeStyle 数字角标样式
|
|
66
|
+
* @property {String} rightText 右侧文字内容
|
|
67
|
+
* @property {Boolean} disabled = [true|false] 是否禁用
|
|
68
|
+
* @property {Boolean} clickable = [true|false] 是否开启点击反馈
|
|
69
|
+
* @property {String} link = [navigateTo|redirectTo|reLaunch|switchTab] 是否展示右侧箭头并开启点击反馈
|
|
70
|
+
* @value navigateTo 同 uni.navigateTo()
|
|
71
|
+
* @value redirectTo 同 uni.redirectTo()
|
|
72
|
+
* @value reLaunch 同 uni.reLaunch()
|
|
73
|
+
* @value switchTab 同 uni.switchTab()
|
|
74
|
+
* @property {String | PageURIString} to 跳转目标页面
|
|
75
|
+
* @property {Boolean} showBadge = [true|false] 是否显示数字角标
|
|
76
|
+
* @property {Boolean} showSwitch = [true|false] 是否显示Switch
|
|
77
|
+
* @property {Boolean} switchChecked = [true|false] Switch是否被选中
|
|
78
|
+
* @property {Boolean} showExtraIcon = [true|false] 左侧是否显示扩展图标
|
|
79
|
+
* @property {Object} extraIcon 扩展图标参数,格式为 {color: '#4cd964',size: '22',type: 'spinner'}
|
|
80
|
+
* @property {String} direction = [row|column] 排版方向
|
|
81
|
+
* @value row 水平排列
|
|
82
|
+
* @value column 垂直排列
|
|
83
|
+
* @event {Function} click 点击 uniListItem 触发事件
|
|
84
|
+
* @event {Function} switchChange 点击切换 Switch 时触发
|
|
85
|
+
*/
|
|
86
|
+
export default {
|
|
87
|
+
name: 'UniListItem',
|
|
88
|
+
emits: ['click', 'switchChange'],
|
|
89
|
+
props: {
|
|
90
|
+
direction: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: 'row',
|
|
93
|
+
},
|
|
94
|
+
title: {
|
|
95
|
+
type: String,
|
|
96
|
+
default: '',
|
|
97
|
+
},
|
|
98
|
+
note: {
|
|
99
|
+
type: String,
|
|
100
|
+
default: '',
|
|
101
|
+
},
|
|
102
|
+
ellipsis: {
|
|
103
|
+
type: [Number, String],
|
|
104
|
+
default: 0,
|
|
105
|
+
},
|
|
106
|
+
disabled: {
|
|
107
|
+
type: [Boolean, String],
|
|
108
|
+
default: false,
|
|
109
|
+
},
|
|
110
|
+
clickable: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: false,
|
|
113
|
+
},
|
|
114
|
+
showArrow: {
|
|
115
|
+
type: [Boolean, String],
|
|
116
|
+
default: false,
|
|
117
|
+
},
|
|
118
|
+
link: {
|
|
119
|
+
type: [Boolean, String],
|
|
120
|
+
default: false,
|
|
121
|
+
},
|
|
122
|
+
to: {
|
|
123
|
+
type: String,
|
|
124
|
+
default: '',
|
|
125
|
+
},
|
|
126
|
+
showBadge: {
|
|
127
|
+
type: [Boolean, String],
|
|
128
|
+
default: false,
|
|
129
|
+
},
|
|
130
|
+
showSwitch: {
|
|
131
|
+
type: [Boolean, String],
|
|
132
|
+
default: false,
|
|
133
|
+
},
|
|
134
|
+
switchChecked: {
|
|
135
|
+
type: [Boolean, String],
|
|
136
|
+
default: false,
|
|
137
|
+
},
|
|
138
|
+
badgeText: {
|
|
139
|
+
type: String,
|
|
140
|
+
default: '',
|
|
141
|
+
},
|
|
142
|
+
badgeType: {
|
|
143
|
+
type: String,
|
|
144
|
+
default: 'success',
|
|
145
|
+
},
|
|
146
|
+
badgeStyle: {
|
|
147
|
+
type: Object,
|
|
148
|
+
default() {
|
|
149
|
+
return {};
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
rightText: {
|
|
153
|
+
type: String,
|
|
154
|
+
default: '',
|
|
155
|
+
},
|
|
156
|
+
thumb: {
|
|
157
|
+
type: String,
|
|
158
|
+
default: '',
|
|
159
|
+
},
|
|
160
|
+
thumbSize: {
|
|
161
|
+
type: String,
|
|
162
|
+
default: 'base',
|
|
163
|
+
},
|
|
164
|
+
showExtraIcon: {
|
|
165
|
+
type: [Boolean, String],
|
|
166
|
+
default: false,
|
|
167
|
+
},
|
|
168
|
+
extraIcon: {
|
|
169
|
+
type: Object,
|
|
170
|
+
default() {
|
|
171
|
+
return {
|
|
172
|
+
type: '',
|
|
173
|
+
color: '#000000',
|
|
174
|
+
size: 20,
|
|
175
|
+
customPrefix: '',
|
|
176
|
+
};
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
border: {
|
|
180
|
+
type: Boolean,
|
|
181
|
+
default: true,
|
|
182
|
+
},
|
|
183
|
+
customStyle: {
|
|
184
|
+
type: Object,
|
|
185
|
+
default() {
|
|
186
|
+
return {
|
|
187
|
+
padding: '',
|
|
188
|
+
backgroundColor: '#FFFFFF',
|
|
189
|
+
};
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
keepScrollPosition: {
|
|
193
|
+
type: Boolean,
|
|
194
|
+
default: false,
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
watch: {
|
|
198
|
+
'customStyle.padding': {
|
|
199
|
+
handler(padding) {
|
|
200
|
+
if (typeof padding == 'number') {
|
|
201
|
+
padding += '';
|
|
202
|
+
}
|
|
203
|
+
let paddingArr = padding.split(' ');
|
|
204
|
+
if (paddingArr.length === 1) {
|
|
205
|
+
const allPadding = paddingArr[0];
|
|
206
|
+
this.padding = {
|
|
207
|
+
top: allPadding,
|
|
208
|
+
right: allPadding,
|
|
209
|
+
bottom: allPadding,
|
|
210
|
+
left: allPadding,
|
|
211
|
+
};
|
|
212
|
+
} else if (paddingArr.length === 2) {
|
|
213
|
+
const [verticalPadding, horizontalPadding] = paddingArr;
|
|
214
|
+
this.padding = {
|
|
215
|
+
top: verticalPadding,
|
|
216
|
+
right: horizontalPadding,
|
|
217
|
+
bottom: verticalPadding,
|
|
218
|
+
left: horizontalPadding,
|
|
219
|
+
};
|
|
220
|
+
} else if (paddingArr.length === 4) {
|
|
221
|
+
const [topPadding, rightPadding, bottomPadding, leftPadding] = paddingArr;
|
|
222
|
+
this.padding = {
|
|
223
|
+
top: topPadding,
|
|
224
|
+
right: rightPadding,
|
|
225
|
+
bottom: bottomPadding,
|
|
226
|
+
left: leftPadding,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
immediate: true,
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
// inject: ['list'],
|
|
234
|
+
data() {
|
|
235
|
+
return {
|
|
236
|
+
isFirstChild: false,
|
|
237
|
+
padding: {
|
|
238
|
+
top: '',
|
|
239
|
+
right: '',
|
|
240
|
+
bottom: '',
|
|
241
|
+
left: '',
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
},
|
|
245
|
+
mounted() {
|
|
246
|
+
this.list = this.getForm();
|
|
247
|
+
// 判断是否存在 uni-list 组件
|
|
248
|
+
if (this.list) {
|
|
249
|
+
if (!this.list.firstChildAppend) {
|
|
250
|
+
this.list.firstChildAppend = true;
|
|
251
|
+
this.isFirstChild = true;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
methods: {
|
|
256
|
+
/**
|
|
257
|
+
* 获取父元素实例
|
|
258
|
+
*/
|
|
259
|
+
getForm(name = 'uniList') {
|
|
260
|
+
let parent = this.$parent;
|
|
261
|
+
let parentName = parent.$options.name;
|
|
262
|
+
while (parentName !== name) {
|
|
263
|
+
parent = parent.$parent;
|
|
264
|
+
if (!parent) return false;
|
|
265
|
+
parentName = parent.$options.name;
|
|
266
|
+
}
|
|
267
|
+
return parent;
|
|
268
|
+
},
|
|
269
|
+
onClick() {
|
|
270
|
+
if (this.to !== '') {
|
|
271
|
+
this.openPage();
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
if (this.clickable || this.link) {
|
|
275
|
+
this.$emit('click', {
|
|
276
|
+
data: {},
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
onSwitchChange(e) {
|
|
281
|
+
this.$emit('switchChange', e.detail);
|
|
282
|
+
},
|
|
283
|
+
openPage() {
|
|
284
|
+
if (['navigateTo', 'redirectTo', 'reLaunch', 'switchTab'].indexOf(this.link) !== -1) {
|
|
285
|
+
this.pageApi(this.link);
|
|
286
|
+
} else {
|
|
287
|
+
this.pageApi('navigateTo');
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
pageApi(api) {
|
|
291
|
+
let callback = {
|
|
292
|
+
url: this.to,
|
|
293
|
+
success: (res) => {
|
|
294
|
+
this.$emit('click', {
|
|
295
|
+
data: res,
|
|
296
|
+
});
|
|
297
|
+
},
|
|
298
|
+
fail: (err) => {
|
|
299
|
+
this.$emit('click', {
|
|
300
|
+
data: err,
|
|
301
|
+
});
|
|
302
|
+
},
|
|
303
|
+
};
|
|
304
|
+
switch (api) {
|
|
305
|
+
case 'navigateTo':
|
|
306
|
+
uni.navigateTo(callback);
|
|
307
|
+
break;
|
|
308
|
+
case 'redirectTo':
|
|
309
|
+
uni.redirectTo(callback);
|
|
310
|
+
break;
|
|
311
|
+
case 'reLaunch':
|
|
312
|
+
uni.reLaunch(callback);
|
|
313
|
+
break;
|
|
314
|
+
case 'switchTab':
|
|
315
|
+
uni.switchTab(callback);
|
|
316
|
+
break;
|
|
317
|
+
default:
|
|
318
|
+
uni.navigateTo(callback);
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
};
|
|
319
323
|
</script>
|
|
320
324
|
|
|
321
325
|
<style lang="scss">
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
326
|
+
$uni-font-size-sm: 13px;
|
|
327
|
+
$uni-font-size-base: 13px;
|
|
328
|
+
$uni-font-size-lg: 16px;
|
|
329
|
+
$uni-spacing-col-lg: 12px;
|
|
330
|
+
$uni-spacing-row-lg: 15px;
|
|
331
|
+
$uni-img-size-sm: 20px;
|
|
332
|
+
$uni-img-size-base: 26px;
|
|
333
|
+
$uni-img-size-lg: 40px;
|
|
334
|
+
$uni-border-color: #e5e5e5;
|
|
335
|
+
$uni-bg-color-hover: #f1f1f1;
|
|
336
|
+
$uni-text-color-grey: #999;
|
|
337
|
+
$list-item-pd: $uni-spacing-col-lg $uni-spacing-row-lg;
|
|
334
338
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
339
|
+
.uni-list-item {
|
|
340
|
+
/* #ifndef APP-NVUE */
|
|
341
|
+
display: flex;
|
|
342
|
+
/* #endif */
|
|
343
|
+
font-size: $uni-font-size-lg;
|
|
344
|
+
position: relative;
|
|
345
|
+
justify-content: space-between;
|
|
346
|
+
align-items: center;
|
|
347
|
+
background-color: #fff;
|
|
348
|
+
flex-direction: row;
|
|
349
|
+
/* #ifdef H5 */
|
|
350
|
+
cursor: pointer;
|
|
351
|
+
/* #endif */
|
|
352
|
+
}
|
|
349
353
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
354
|
+
.uni-list-item--disabled {
|
|
355
|
+
opacity: 0.3;
|
|
356
|
+
}
|
|
353
357
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
358
|
+
.uni-list-item--hover {
|
|
359
|
+
background-color: $uni-bg-color-hover !important;
|
|
360
|
+
}
|
|
357
361
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
362
|
+
.uni-list-item__container {
|
|
363
|
+
position: relative;
|
|
364
|
+
/* #ifndef APP-NVUE */
|
|
365
|
+
display: flex;
|
|
366
|
+
/* #endif */
|
|
367
|
+
flex-direction: row;
|
|
368
|
+
padding: $list-item-pd;
|
|
369
|
+
padding-left: $uni-spacing-row-lg;
|
|
370
|
+
flex: 1;
|
|
371
|
+
overflow: hidden;
|
|
372
|
+
// align-items: center;
|
|
373
|
+
}
|
|
370
374
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
375
|
+
.container--right {
|
|
376
|
+
padding-right: 0;
|
|
377
|
+
}
|
|
374
378
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
379
|
+
// .border--left {
|
|
380
|
+
// margin-left: $uni-spacing-row-lg;
|
|
381
|
+
// }
|
|
382
|
+
.uni-list--border {
|
|
383
|
+
position: absolute;
|
|
384
|
+
top: 0;
|
|
385
|
+
right: 0;
|
|
386
|
+
left: 0;
|
|
387
|
+
/* #ifdef APP-NVUE */
|
|
388
|
+
border-top-color: $uni-border-color;
|
|
389
|
+
border-top-style: solid;
|
|
390
|
+
border-top-width: 0.5px;
|
|
391
|
+
/* #endif */
|
|
392
|
+
}
|
|
389
393
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
394
|
+
/* #ifndef APP-NVUE */
|
|
395
|
+
.uni-list--border:after {
|
|
396
|
+
position: absolute;
|
|
397
|
+
top: 0;
|
|
398
|
+
right: 0;
|
|
399
|
+
left: 0;
|
|
400
|
+
height: 1px;
|
|
401
|
+
content: '';
|
|
402
|
+
-webkit-transform: scaleY(0.5);
|
|
403
|
+
transform: scaleY(0.5);
|
|
404
|
+
background-color: $uni-border-color;
|
|
405
|
+
}
|
|
402
406
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
407
|
+
/* #endif */
|
|
408
|
+
.uni-list-item__content {
|
|
409
|
+
/* #ifndef APP-NVUE */
|
|
410
|
+
display: flex;
|
|
411
|
+
/* #endif */
|
|
412
|
+
padding-right: 8px;
|
|
413
|
+
flex: 1;
|
|
414
|
+
color: #3b4144;
|
|
415
|
+
// overflow: hidden;
|
|
416
|
+
flex-direction: column;
|
|
417
|
+
justify-content: space-between;
|
|
418
|
+
overflow: hidden;
|
|
419
|
+
}
|
|
416
420
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
421
|
+
.uni-list-item__content--center {
|
|
422
|
+
justify-content: center;
|
|
423
|
+
}
|
|
420
424
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
425
|
+
.uni-list-item__content-title {
|
|
426
|
+
font-size: $uni-font-size-base;
|
|
427
|
+
color: #3b4144;
|
|
428
|
+
overflow: hidden;
|
|
429
|
+
}
|
|
426
430
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
431
|
+
.uni-list-item__content-note {
|
|
432
|
+
margin-top: 6rpx;
|
|
433
|
+
color: $uni-text-color-grey;
|
|
434
|
+
font-size: $uni-font-size-sm;
|
|
435
|
+
overflow: hidden;
|
|
436
|
+
}
|
|
433
437
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
438
|
+
.uni-list-item__extra {
|
|
439
|
+
// width: 25%;
|
|
440
|
+
/* #ifndef APP-NVUE */
|
|
441
|
+
display: flex;
|
|
442
|
+
/* #endif */
|
|
443
|
+
flex-direction: row;
|
|
444
|
+
justify-content: flex-end;
|
|
445
|
+
align-items: center;
|
|
446
|
+
}
|
|
443
447
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
448
|
+
.uni-list-item__header {
|
|
449
|
+
/* #ifndef APP-NVUE */
|
|
450
|
+
display: flex;
|
|
451
|
+
/* #endif */
|
|
452
|
+
flex-direction: row;
|
|
453
|
+
align-items: center;
|
|
454
|
+
}
|
|
451
455
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
456
|
+
.uni-list-item__icon {
|
|
457
|
+
margin-right: 18rpx;
|
|
458
|
+
flex-direction: row;
|
|
459
|
+
justify-content: center;
|
|
460
|
+
align-items: center;
|
|
461
|
+
}
|
|
458
462
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
463
|
+
.uni-list-item__icon-img {
|
|
464
|
+
/* #ifndef APP-NVUE */
|
|
465
|
+
display: block;
|
|
466
|
+
/* #endif */
|
|
467
|
+
height: $uni-img-size-base;
|
|
468
|
+
width: $uni-img-size-base;
|
|
469
|
+
margin-right: 10px;
|
|
470
|
+
}
|
|
467
471
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
472
|
+
.uni-icon-wrapper {
|
|
473
|
+
/* #ifndef APP-NVUE */
|
|
474
|
+
display: flex;
|
|
475
|
+
/* #endif */
|
|
476
|
+
align-items: center;
|
|
477
|
+
padding: 0 10px;
|
|
478
|
+
}
|
|
475
479
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
480
|
+
.flex--direction {
|
|
481
|
+
flex-direction: column;
|
|
482
|
+
/* #ifndef APP-NVUE */
|
|
483
|
+
align-items: initial;
|
|
484
|
+
/* #endif */
|
|
485
|
+
}
|
|
482
486
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
487
|
+
.flex--justify {
|
|
488
|
+
/* #ifndef APP-NVUE */
|
|
489
|
+
justify-content: initial;
|
|
490
|
+
/* #endif */
|
|
491
|
+
}
|
|
488
492
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
+
.uni-list--lg {
|
|
494
|
+
height: $uni-img-size-lg;
|
|
495
|
+
width: $uni-img-size-lg;
|
|
496
|
+
}
|
|
493
497
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
+
.uni-list--base {
|
|
499
|
+
height: $uni-img-size-base;
|
|
500
|
+
width: $uni-img-size-base;
|
|
501
|
+
}
|
|
498
502
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
+
.uni-list--sm {
|
|
504
|
+
height: $uni-img-size-sm;
|
|
505
|
+
width: $uni-img-size-sm;
|
|
506
|
+
}
|
|
503
507
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
+
.uni-list-item__extra-text {
|
|
509
|
+
color: $uni-text-color-grey;
|
|
510
|
+
font-size: $uni-font-size-sm;
|
|
511
|
+
}
|
|
508
512
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
513
|
+
.uni-ellipsis-1 {
|
|
514
|
+
/* #ifndef APP-NVUE */
|
|
515
|
+
overflow: hidden;
|
|
516
|
+
white-space: nowrap;
|
|
517
|
+
text-overflow: ellipsis;
|
|
518
|
+
/* #endif */
|
|
519
|
+
/* #ifdef APP-NVUE */
|
|
520
|
+
lines: 1;
|
|
521
|
+
text-overflow: ellipsis;
|
|
522
|
+
/* #endif */
|
|
523
|
+
}
|
|
520
524
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
</style>
|
|
525
|
+
.uni-ellipsis-2 {
|
|
526
|
+
/* #ifndef APP-NVUE */
|
|
527
|
+
overflow: hidden;
|
|
528
|
+
text-overflow: ellipsis;
|
|
529
|
+
display: -webkit-box;
|
|
530
|
+
-webkit-line-clamp: 2;
|
|
531
|
+
-webkit-box-orient: vertical;
|
|
532
|
+
/* #endif */
|
|
533
|
+
/* #ifdef APP-NVUE */
|
|
534
|
+
lines: 2;
|
|
535
|
+
text-overflow: ellipsis;
|
|
536
|
+
/* #endif */
|
|
537
|
+
}
|
|
538
|
+
</style>
|