uview-plus 3.7.30 → 3.7.32
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/changelog.md +7 -0
- package/components/u-cascader/u-cascader.vue +24 -18
- package/components/u-picker/picker.js +11 -10
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
:mask="true" :closeable="closeable" :safe-area-inset-bottom="true"
|
|
4
4
|
close-icon-color="#ffffff" :z-index="uZIndex"
|
|
5
5
|
:maskCloseAble="maskCloseAble" @close="close">
|
|
6
|
-
<view class="up-p-t-30 up-p-l-20 up-m-b-10" v-if="headerDirection
|
|
6
|
+
<view class="up-p-t-30 up-p-l-20 up-m-b-10" v-if="headerDirection ==='column'">
|
|
7
7
|
<up-steps v-if="popupShow" dot direction="column" v-model:current="tabsIndex">
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
<view v-for="(item, index) in genTabsList" @click="toFatherIndex(index)">
|
|
9
|
+
<up-steps-item
|
|
10
|
+
:title="item.name"/>
|
|
11
|
+
</view>
|
|
10
12
|
</up-steps>
|
|
11
13
|
</view>
|
|
12
14
|
<view class="up-p-t-20 up-m-b-10" v-else>
|
|
@@ -171,7 +173,7 @@
|
|
|
171
173
|
let tabsList = [{
|
|
172
174
|
name: "请选择"
|
|
173
175
|
}];
|
|
174
|
-
|
|
176
|
+
|
|
175
177
|
// 根据选中的值动态生成tabs
|
|
176
178
|
for (let i = 0; i < this.selectedValueIndexs.length; i++) {
|
|
177
179
|
if (this.selectedValueIndexs[i] !== undefined && this.levelList[i]) {
|
|
@@ -181,8 +183,8 @@
|
|
|
181
183
|
name: selectedItem[this.labelKey]
|
|
182
184
|
};
|
|
183
185
|
// 如果还有下一级,则添加"请选择"
|
|
184
|
-
if (i === this.selectedValueIndexs.length - 1 &&
|
|
185
|
-
selectedItem[this.childrenKey] &&
|
|
186
|
+
if (i === this.selectedValueIndexs.length - 1 &&
|
|
187
|
+
selectedItem[this.childrenKey] &&
|
|
186
188
|
selectedItem[this.childrenKey].length > 0) {
|
|
187
189
|
tabsList.push({
|
|
188
190
|
name: "请选择"
|
|
@@ -191,7 +193,7 @@
|
|
|
191
193
|
}
|
|
192
194
|
}
|
|
193
195
|
}
|
|
194
|
-
|
|
196
|
+
|
|
195
197
|
return tabsList;
|
|
196
198
|
},
|
|
197
199
|
uZIndex() {
|
|
@@ -220,12 +222,12 @@
|
|
|
220
222
|
this.selectedValueIndexs = [];
|
|
221
223
|
this.levelList = []; // 设置层级数据为空
|
|
222
224
|
let currentLevelData = this.data;
|
|
223
|
-
|
|
225
|
+
|
|
224
226
|
for (let i = 0; i < this.modelValue.length; i++) {
|
|
225
227
|
const value = this.modelValue[i];
|
|
226
228
|
const index = currentLevelData.findIndex(item => item[this.valueKey] === value);
|
|
227
229
|
this.levelList[i] = currentLevelData; // 设置每一层级的数据
|
|
228
|
-
|
|
230
|
+
|
|
229
231
|
if (index !== -1) {
|
|
230
232
|
this.selectedValueIndexs.push(index);
|
|
231
233
|
// 更新下一级的数据
|
|
@@ -250,17 +252,17 @@
|
|
|
250
252
|
levelChange(levelIndex, index) {
|
|
251
253
|
// 设置当前级的选中值
|
|
252
254
|
this.$set(this.selectedValueIndexs, levelIndex, index);
|
|
253
|
-
|
|
255
|
+
|
|
254
256
|
// 清除后续级别的选中值
|
|
255
257
|
this.selectedValueIndexs.splice(levelIndex + 1);
|
|
256
258
|
this.tabsIndex = Math.min(this.tabsIndex, levelIndex);
|
|
257
|
-
|
|
259
|
+
|
|
258
260
|
// 清除后续级别的列表
|
|
259
261
|
this.levelList.splice(levelIndex + 1);
|
|
260
|
-
|
|
262
|
+
|
|
261
263
|
// 获取当前选中项
|
|
262
264
|
const currentItem = this.levelList[levelIndex][index];
|
|
263
|
-
|
|
265
|
+
|
|
264
266
|
// 如果有子级数据,则初始化下一级
|
|
265
267
|
if (currentItem && currentItem[this.childrenKey] && currentItem[this.childrenKey].length > 0) {
|
|
266
268
|
// 确保levelList数组足够长
|
|
@@ -292,13 +294,13 @@
|
|
|
292
294
|
result.push(this.levelList[i][this.selectedValueIndexs[i]][this.valueKey]);
|
|
293
295
|
}
|
|
294
296
|
}
|
|
295
|
-
|
|
297
|
+
|
|
296
298
|
// 更新confirmValues
|
|
297
299
|
this.confirmValues = [...result];
|
|
298
|
-
|
|
300
|
+
|
|
299
301
|
// 触发change事件,返回value数组
|
|
300
302
|
this.$emit('change', this.confirmValues);
|
|
301
|
-
|
|
303
|
+
|
|
302
304
|
// 根据参数决定是否关闭弹窗
|
|
303
305
|
if (closePopup) {
|
|
304
306
|
this.close();
|
|
@@ -312,7 +314,11 @@
|
|
|
312
314
|
this.$emit('update:modelValue', this.confirmValues);
|
|
313
315
|
this.$emit('confirm', this.confirmValues);
|
|
314
316
|
this.close();
|
|
315
|
-
}
|
|
317
|
+
},
|
|
318
|
+
// 跳转父节点
|
|
319
|
+
toFatherIndex(index){
|
|
320
|
+
this.tabsIndex = index;
|
|
321
|
+
},
|
|
316
322
|
}
|
|
317
323
|
}
|
|
318
324
|
</script>
|
|
@@ -337,7 +343,7 @@
|
|
|
337
343
|
height: 800rpx;
|
|
338
344
|
}
|
|
339
345
|
}
|
|
340
|
-
|
|
346
|
+
|
|
341
347
|
// 添加按钮区域样式
|
|
342
348
|
.u-cascader-action {
|
|
343
349
|
border-top: 1px solid #eee;
|
|
@@ -7,36 +7,37 @@
|
|
|
7
7
|
* @lastTime : 2025-12-19 08:55:21
|
|
8
8
|
* @FilePath : /uview-plus/libs/config/props/picker.js
|
|
9
9
|
*/
|
|
10
|
-
import { t } from '../../libs/i18n'
|
|
10
|
+
import { t } from '../../libs/i18n';
|
|
11
|
+
|
|
11
12
|
export default {
|
|
12
13
|
// picker
|
|
13
14
|
picker: {
|
|
14
15
|
show: false,
|
|
15
|
-
|
|
16
|
+
popupMode: 'bottom',
|
|
16
17
|
showToolbar: true,
|
|
17
18
|
title: '',
|
|
18
19
|
columns: [],
|
|
19
20
|
loading: false,
|
|
20
21
|
itemHeight: 44,
|
|
21
|
-
cancelText: t(
|
|
22
|
-
confirmText: t(
|
|
22
|
+
cancelText: t('up.common.cancel'),
|
|
23
|
+
confirmText: t('up.common.confirm'),
|
|
23
24
|
cancelColor: '#909193',
|
|
24
25
|
confirmColor: '',
|
|
25
26
|
visibleItemCount: 5,
|
|
26
27
|
keyName: 'text',
|
|
27
|
-
|
|
28
|
+
valueName: 'value',
|
|
28
29
|
closeOnClickOverlay: false,
|
|
29
30
|
defaultIndex: [],
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
immediateChange: true,
|
|
32
|
+
zIndex: 10076,
|
|
32
33
|
disabled: false,
|
|
33
34
|
disabledColor: '',
|
|
34
|
-
placeholder: t(
|
|
35
|
+
placeholder: t('up.common.pleaseChoose'),
|
|
35
36
|
inputProps: {},
|
|
36
|
-
bgColor: '',
|
|
37
|
+
bgColor: '#FFFFFF',
|
|
37
38
|
round: 0,
|
|
38
39
|
duration: 300,
|
|
39
40
|
overlayOpacity: 0.5,
|
|
40
41
|
pageInline: false
|
|
41
42
|
}
|
|
42
|
-
}
|
|
43
|
+
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "uview-plus",
|
|
3
3
|
"name": "uview-plus",
|
|
4
4
|
"displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙跨端移动组件库,组件丰富维护更新稳定。",
|
|
5
|
-
"version": "3.7.
|
|
5
|
+
"version": "3.7.32",
|
|
6
6
|
"description": "零云®uview-plus已兼容vue3支持多语言,120+全面的组件和便捷的工具会让您信手拈来。近期新增拖动排序、条码、图片裁剪、下拉刷新、虚拟列表、签名、Markdown等。",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"uview",
|