@kengic/uni 0.5.2-beta.3 → 0.5.2-beta.4
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.
|
@@ -1,517 +1,503 @@
|
|
|
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
|
-
</view>
|
|
2
|
+
<view class="uni-stat__select">
|
|
3
|
+
<span v-if="label" class="uni-label-text hide-on-phone">{{ label + ':' }}</span>
|
|
4
|
+
<view class="uni-stat-box" :class="{ 'uni-stat__actived': current }">
|
|
5
|
+
<view class="uni-select" :class="{ 'uni-select--disabled': disabled }">
|
|
6
|
+
<view class="uni-select__input-box" @click="toggleSelector">
|
|
7
|
+
<view v-if="current" class="uni-select__input-text">{{ current }}</view>
|
|
8
|
+
<view v-else class="uni-select__input-text uni-select__input-placeholder">{{ typePlaceholder }}</view>
|
|
9
|
+
<view v-if="current && clear && !disabled" @click.stop="clearVal">
|
|
10
|
+
<uni-icons type="clear" color="#c0c4cc" size="24" />
|
|
11
|
+
</view>
|
|
12
|
+
<view v-else>
|
|
13
|
+
<uni-icons :type="showSelector ? 'top' : 'bottom'" size="14" color="#999" />
|
|
14
|
+
</view>
|
|
15
|
+
</view>
|
|
16
|
+
<view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
|
|
17
|
+
<view class="uni-select__selector" v-if="showSelector">
|
|
18
|
+
<view class="uni-popper__arrow"></view>
|
|
19
|
+
<scroll-view scroll-y="true" class="uni-select__selector-scroll">
|
|
20
|
+
<view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0">
|
|
21
|
+
<text>{{ emptyTips }}</text>
|
|
22
|
+
</view>
|
|
23
|
+
<view v-else class="uni-select__selector-item" v-for="(item, index) in mixinDatacomResData" :key="index" @click="change(item)">
|
|
24
|
+
<text :class="{ 'uni-select__selector__disabled': item.disable }">{{ formatItemName(item) }}</text>
|
|
25
|
+
</view>
|
|
26
|
+
</scroll-view>
|
|
27
|
+
</view>
|
|
28
|
+
</view>
|
|
29
|
+
</view>
|
|
30
|
+
</view>
|
|
32
31
|
</template>
|
|
33
32
|
|
|
34
33
|
<script>
|
|
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
|
-
|
|
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
|
-
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
|
290
|
-
cacheData[name] = value;
|
|
291
|
-
uni.setStorageSync(this.cacheKey, cacheData);
|
|
292
|
-
},
|
|
293
|
-
// 删除缓存
|
|
294
|
-
removeCache(name=this.getCurrentCacheKey()){
|
|
295
|
-
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
|
296
|
-
delete cacheData[name];
|
|
297
|
-
uni.setStorageSync(this.cacheKey, cacheData);
|
|
298
|
-
},
|
|
299
|
-
}
|
|
300
|
-
}
|
|
34
|
+
/**
|
|
35
|
+
* DataChecklist 数据选择器
|
|
36
|
+
* @description 通过数据渲染的下拉框组件
|
|
37
|
+
* @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
|
|
38
|
+
* @property {String} value 默认值
|
|
39
|
+
* @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
|
|
40
|
+
* @property {Boolean} clear 是否可以清空已选项
|
|
41
|
+
* @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
|
|
42
|
+
* @property {String} label 左侧标题
|
|
43
|
+
* @property {String} placeholder 输入框的提示文字
|
|
44
|
+
* @property {Boolean} disabled 是否禁用
|
|
45
|
+
* @event {Function} change 选中发生变化触发
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
export default {
|
|
49
|
+
name: 'UniDataSelect',
|
|
50
|
+
mixins: [uniCloud.mixinDatacom || {}],
|
|
51
|
+
props: {
|
|
52
|
+
localdata: {
|
|
53
|
+
type: Array,
|
|
54
|
+
default() {
|
|
55
|
+
return [];
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
value: {
|
|
59
|
+
type: [String, Number],
|
|
60
|
+
default: '',
|
|
61
|
+
},
|
|
62
|
+
modelValue: {
|
|
63
|
+
type: [String, Number],
|
|
64
|
+
default: '',
|
|
65
|
+
},
|
|
66
|
+
label: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: '',
|
|
69
|
+
},
|
|
70
|
+
placeholder: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: '请选择',
|
|
73
|
+
},
|
|
74
|
+
emptyTips: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: '无选项',
|
|
77
|
+
},
|
|
78
|
+
clear: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: true,
|
|
81
|
+
},
|
|
82
|
+
defItem: {
|
|
83
|
+
type: Number,
|
|
84
|
+
default: 0,
|
|
85
|
+
},
|
|
86
|
+
disabled: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: false,
|
|
89
|
+
},
|
|
90
|
+
// 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
|
|
91
|
+
format: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: '',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
data() {
|
|
97
|
+
return {
|
|
98
|
+
showSelector: false,
|
|
99
|
+
current: '',
|
|
100
|
+
mixinDatacomResData: [],
|
|
101
|
+
apps: [],
|
|
102
|
+
channels: [],
|
|
103
|
+
cacheKey: 'uni-data-select-lastSelectedValue',
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
created() {
|
|
107
|
+
this.debounceGet = this.debounce(() => {
|
|
108
|
+
this.query();
|
|
109
|
+
}, 300);
|
|
110
|
+
if (this.collection && !this.localdata.length) {
|
|
111
|
+
this.debounceGet();
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
computed: {
|
|
115
|
+
typePlaceholder() {
|
|
116
|
+
const text = {
|
|
117
|
+
'opendb-stat-app-versions': '版本',
|
|
118
|
+
'opendb-app-channels': '渠道',
|
|
119
|
+
'opendb-app-list': '应用',
|
|
120
|
+
};
|
|
121
|
+
const common = this.placeholder;
|
|
122
|
+
const placeholder = text[this.collection];
|
|
123
|
+
return placeholder ? common + placeholder : common;
|
|
124
|
+
},
|
|
125
|
+
valueCom() {
|
|
126
|
+
// #ifdef VUE3
|
|
127
|
+
return this.modelValue;
|
|
128
|
+
// #endif
|
|
129
|
+
// #ifndef VUE3
|
|
130
|
+
return this.value;
|
|
131
|
+
// #endif
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
watch: {
|
|
135
|
+
localdata: {
|
|
136
|
+
immediate: true,
|
|
137
|
+
handler(val, old) {
|
|
138
|
+
if (Array.isArray(val) && old !== val) {
|
|
139
|
+
this.mixinDatacomResData = val;
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
valueCom(val, old) {
|
|
144
|
+
this.initDefVal();
|
|
145
|
+
},
|
|
146
|
+
mixinDatacomResData: {
|
|
147
|
+
immediate: true,
|
|
148
|
+
handler(val) {
|
|
149
|
+
if (val.length) {
|
|
150
|
+
this.initDefVal();
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
methods: {
|
|
156
|
+
debounce(fn, time = 100) {
|
|
157
|
+
let timer = null;
|
|
158
|
+
return function (...args) {
|
|
159
|
+
if (timer) clearTimeout(timer);
|
|
160
|
+
timer = setTimeout(() => {
|
|
161
|
+
fn.apply(this, args);
|
|
162
|
+
}, time);
|
|
163
|
+
};
|
|
164
|
+
},
|
|
165
|
+
// 执行数据库查询
|
|
166
|
+
query() {
|
|
167
|
+
this.mixinDatacomEasyGet();
|
|
168
|
+
},
|
|
169
|
+
// 监听查询条件变更事件
|
|
170
|
+
onMixinDatacomPropsChange() {
|
|
171
|
+
if (this.collection) {
|
|
172
|
+
this.debounceGet();
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
initDefVal() {
|
|
176
|
+
let defValue = '';
|
|
177
|
+
if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
|
|
178
|
+
defValue = this.valueCom;
|
|
179
|
+
} else {
|
|
180
|
+
let strogeValue;
|
|
181
|
+
if (this.collection) {
|
|
182
|
+
strogeValue = this.getCache();
|
|
183
|
+
}
|
|
184
|
+
if (strogeValue || strogeValue === 0) {
|
|
185
|
+
defValue = strogeValue;
|
|
186
|
+
} else {
|
|
187
|
+
let defItem = '';
|
|
188
|
+
if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
|
|
189
|
+
defItem = this.mixinDatacomResData[this.defItem - 1].value;
|
|
190
|
+
}
|
|
191
|
+
defValue = defItem;
|
|
192
|
+
}
|
|
193
|
+
if (defValue || defValue === 0) {
|
|
194
|
+
this.emit(defValue);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
const def = this.mixinDatacomResData.find((item) => item.value === defValue);
|
|
198
|
+
this.current = def ? this.formatItemName(def) : '';
|
|
199
|
+
},
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* @param {[String, Number]} value
|
|
203
|
+
* 判断用户给的 value 是否同时为禁用状态
|
|
204
|
+
*/
|
|
205
|
+
isDisabled(value) {
|
|
206
|
+
let isDisabled = false;
|
|
207
|
+
|
|
208
|
+
this.mixinDatacomResData.forEach((item) => {
|
|
209
|
+
if (item.value === value) {
|
|
210
|
+
isDisabled = item.disable;
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
return isDisabled;
|
|
215
|
+
},
|
|
216
|
+
|
|
217
|
+
clearVal() {
|
|
218
|
+
this.emit('');
|
|
219
|
+
if (this.collection) {
|
|
220
|
+
this.removeCache();
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
change(item) {
|
|
224
|
+
if (!item.disable) {
|
|
225
|
+
this.showSelector = false;
|
|
226
|
+
this.current = this.formatItemName(item);
|
|
227
|
+
this.emit(item.value);
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
emit(val) {
|
|
231
|
+
this.$emit('input', val);
|
|
232
|
+
this.$emit('update:modelValue', val);
|
|
233
|
+
this.$emit('change', val);
|
|
234
|
+
if (this.collection) {
|
|
235
|
+
this.setCache(val);
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
toggleSelector() {
|
|
239
|
+
if (this.disabled) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
this.showSelector = !this.showSelector;
|
|
244
|
+
},
|
|
245
|
+
formatItemName(item) {
|
|
246
|
+
let { text, value, channel_code } = item;
|
|
247
|
+
channel_code = channel_code ? `(${channel_code})` : '';
|
|
248
|
+
|
|
249
|
+
if (this.format) {
|
|
250
|
+
// 格式化输出
|
|
251
|
+
let str = '';
|
|
252
|
+
str = this.format;
|
|
253
|
+
for (let key in item) {
|
|
254
|
+
str = str.replace(new RegExp(`{${key}}`, 'g'), item[key]);
|
|
255
|
+
}
|
|
256
|
+
return str;
|
|
257
|
+
} else {
|
|
258
|
+
return this.collection.indexOf('app-list') > 0 ? `${text}(${value})` : text ? text : `未命名${channel_code}`;
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
// 获取当前加载的数据
|
|
262
|
+
getLoadData() {
|
|
263
|
+
return this.mixinDatacomResData;
|
|
264
|
+
},
|
|
265
|
+
// 获取当前缓存key
|
|
266
|
+
getCurrentCacheKey() {
|
|
267
|
+
return this.collection;
|
|
268
|
+
},
|
|
269
|
+
// 获取缓存
|
|
270
|
+
getCache(name = this.getCurrentCacheKey()) {
|
|
271
|
+
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
|
272
|
+
return cacheData[name];
|
|
273
|
+
},
|
|
274
|
+
// 设置缓存
|
|
275
|
+
setCache(value, name = this.getCurrentCacheKey()) {
|
|
276
|
+
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
|
277
|
+
cacheData[name] = value;
|
|
278
|
+
uni.setStorageSync(this.cacheKey, cacheData);
|
|
279
|
+
},
|
|
280
|
+
// 删除缓存
|
|
281
|
+
removeCache(name = this.getCurrentCacheKey()) {
|
|
282
|
+
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
|
283
|
+
delete cacheData[name];
|
|
284
|
+
uni.setStorageSync(this.cacheKey, cacheData);
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
};
|
|
301
288
|
</script>
|
|
302
289
|
|
|
303
290
|
<style lang="scss">
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
}
|
|
291
|
+
$uni-base-color: #6a6a6a !default;
|
|
292
|
+
$uni-main-color: #333 !default;
|
|
293
|
+
$uni-secondary-color: #909399 !default;
|
|
294
|
+
$uni-border-3: #e5e5e5;
|
|
295
|
+
|
|
296
|
+
/* #ifndef APP-NVUE */
|
|
297
|
+
@media screen and (max-width: 500px) {
|
|
298
|
+
.hide-on-phone {
|
|
299
|
+
display: none;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* #endif */
|
|
304
|
+
.uni-stat__select {
|
|
305
|
+
display: flex;
|
|
306
|
+
align-items: center;
|
|
307
|
+
// padding: 15px;
|
|
308
|
+
/* #ifdef H5 */
|
|
309
|
+
cursor: pointer;
|
|
310
|
+
/* #endif */
|
|
311
|
+
width: 100%;
|
|
312
|
+
flex: 1;
|
|
313
|
+
box-sizing: border-box;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.uni-stat-box {
|
|
317
|
+
width: 100%;
|
|
318
|
+
flex: 1;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.uni-stat__actived {
|
|
322
|
+
width: 100%;
|
|
323
|
+
flex: 1;
|
|
324
|
+
// outline: 1px solid #2979ff;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.uni-label-text {
|
|
328
|
+
font-size: 14px;
|
|
329
|
+
font-weight: bold;
|
|
330
|
+
color: $uni-base-color;
|
|
331
|
+
margin: auto 0;
|
|
332
|
+
margin-right: 5px;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.uni-select {
|
|
336
|
+
font-size: 14px;
|
|
337
|
+
border: 1px solid $uni-border-3;
|
|
338
|
+
box-sizing: border-box;
|
|
339
|
+
border-radius: 3px;
|
|
340
|
+
padding: 0 5px;
|
|
341
|
+
padding-left: 10px;
|
|
342
|
+
position: relative;
|
|
343
|
+
/* #ifndef APP-NVUE */
|
|
344
|
+
display: flex;
|
|
345
|
+
user-select: none;
|
|
346
|
+
/* #endif */
|
|
347
|
+
flex-direction: row;
|
|
348
|
+
align-items: center;
|
|
349
|
+
border-bottom: solid 1px $uni-border-3;
|
|
350
|
+
width: 100%;
|
|
351
|
+
flex: 1;
|
|
352
|
+
height: 35px;
|
|
353
|
+
|
|
354
|
+
&--disabled {
|
|
355
|
+
background-color: #f5f7fa;
|
|
356
|
+
cursor: not-allowed;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.uni-select__label {
|
|
361
|
+
font-size: 16px;
|
|
362
|
+
// line-height: 22px;
|
|
363
|
+
height: 35px;
|
|
364
|
+
padding-right: 10px;
|
|
365
|
+
color: $uni-secondary-color;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.uni-select__input-box {
|
|
369
|
+
height: 35px;
|
|
370
|
+
position: relative;
|
|
371
|
+
/* #ifndef APP-NVUE */
|
|
372
|
+
display: flex;
|
|
373
|
+
/* #endif */
|
|
374
|
+
flex: 1;
|
|
375
|
+
flex-direction: row;
|
|
376
|
+
align-items: center;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.uni-select__input {
|
|
380
|
+
flex: 1;
|
|
381
|
+
font-size: 14px;
|
|
382
|
+
height: 22px;
|
|
383
|
+
line-height: 22px;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.uni-select__input-plac {
|
|
387
|
+
font-size: 14px;
|
|
388
|
+
color: $uni-secondary-color;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.uni-select__selector {
|
|
392
|
+
/* #ifndef APP-NVUE */
|
|
393
|
+
box-sizing: border-box;
|
|
394
|
+
/* #endif */
|
|
395
|
+
position: absolute;
|
|
396
|
+
top: calc(100% + 12px);
|
|
397
|
+
left: 0;
|
|
398
|
+
width: 100%;
|
|
399
|
+
background-color: #ffffff;
|
|
400
|
+
border: 1px solid #ebeef5;
|
|
401
|
+
border-radius: 3px;
|
|
402
|
+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
403
|
+
z-index: 3;
|
|
404
|
+
padding: 4px 0;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.uni-select__selector-scroll {
|
|
408
|
+
/* #ifndef APP-NVUE */
|
|
409
|
+
max-height: 200px;
|
|
410
|
+
box-sizing: border-box;
|
|
411
|
+
/* #endif */
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/* #ifdef H5 */
|
|
415
|
+
@media (min-width: 768px) {
|
|
416
|
+
.uni-select__selector-scroll {
|
|
417
|
+
max-height: 600px;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
/* #endif */
|
|
421
|
+
|
|
422
|
+
.uni-select__selector-empty,
|
|
423
|
+
.uni-select__selector-item {
|
|
424
|
+
/* #ifndef APP-NVUE */
|
|
425
|
+
display: flex;
|
|
426
|
+
cursor: pointer;
|
|
427
|
+
/* #endif */
|
|
428
|
+
line-height: 35px;
|
|
429
|
+
font-size: 14px;
|
|
430
|
+
text-align: center;
|
|
431
|
+
/* border-bottom: solid 1px $uni-border-3; */
|
|
432
|
+
padding: 0px 10px;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.uni-select__selector-item:hover {
|
|
436
|
+
background-color: #f9f9f9;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.uni-select__selector-empty:last-child,
|
|
440
|
+
.uni-select__selector-item:last-child {
|
|
441
|
+
/* #ifndef APP-NVUE */
|
|
442
|
+
border-bottom: none;
|
|
443
|
+
/* #endif */
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.uni-select__selector__disabled {
|
|
447
|
+
opacity: 0.4;
|
|
448
|
+
cursor: default;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/* picker 弹出层通用的指示小三角 */
|
|
452
|
+
.uni-popper__arrow,
|
|
453
|
+
.uni-popper__arrow::after {
|
|
454
|
+
position: absolute;
|
|
455
|
+
display: block;
|
|
456
|
+
width: 0;
|
|
457
|
+
height: 0;
|
|
458
|
+
border-color: transparent;
|
|
459
|
+
border-style: solid;
|
|
460
|
+
border-width: 6px;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.uni-popper__arrow {
|
|
464
|
+
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
|
465
|
+
top: -6px;
|
|
466
|
+
left: 10%;
|
|
467
|
+
margin-right: 3px;
|
|
468
|
+
border-top-width: 0;
|
|
469
|
+
border-bottom-color: #ebeef5;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.uni-popper__arrow::after {
|
|
473
|
+
content: ' ';
|
|
474
|
+
top: 1px;
|
|
475
|
+
margin-left: -6px;
|
|
476
|
+
border-top-width: 0;
|
|
477
|
+
border-bottom-color: #fff;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.uni-select__input-text {
|
|
481
|
+
// width: 280px;
|
|
482
|
+
width: 100%;
|
|
483
|
+
color: $uni-main-color;
|
|
484
|
+
white-space: nowrap;
|
|
485
|
+
text-overflow: ellipsis;
|
|
486
|
+
-o-text-overflow: ellipsis;
|
|
487
|
+
overflow: hidden;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.uni-select__input-placeholder {
|
|
491
|
+
color: $uni-base-color;
|
|
492
|
+
font-size: 12px;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.uni-select--mask {
|
|
496
|
+
position: fixed;
|
|
497
|
+
top: 0;
|
|
498
|
+
bottom: 0;
|
|
499
|
+
right: 0;
|
|
500
|
+
left: 0;
|
|
501
|
+
z-index: 2;
|
|
502
|
+
}
|
|
517
503
|
</style>
|
package/package.json
CHANGED