@varlet/ui 2.20.6 → 2.20.7
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/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/picker/Picker.mjs +18 -3
- package/es/snackbar/style/index.mjs +1 -1
- package/es/varlet.esm.js +108 -99
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +19 -4
- package/package.json +7 -7
- package/umd/varlet.js +4 -4
package/lib/varlet.cjs.js
CHANGED
|
@@ -18344,7 +18344,16 @@ const __sfc__$v = vue.defineComponent({
|
|
|
18344
18344
|
let prevIndexes = [];
|
|
18345
18345
|
buildScrollColumns();
|
|
18346
18346
|
vue.watch(() => props2.columns, buildScrollColumns, { deep: true });
|
|
18347
|
-
vue.watch(
|
|
18347
|
+
vue.watch(
|
|
18348
|
+
() => modelValue.value,
|
|
18349
|
+
() => {
|
|
18350
|
+
if (props2.cascade && props2.modelValue.length) {
|
|
18351
|
+
buildScrollColumns();
|
|
18352
|
+
} else {
|
|
18353
|
+
updateScrollColumnsIndex();
|
|
18354
|
+
}
|
|
18355
|
+
}
|
|
18356
|
+
);
|
|
18348
18357
|
function getOptionKey(key) {
|
|
18349
18358
|
const keyMap = {
|
|
18350
18359
|
text: props2.textKey,
|
|
@@ -18401,6 +18410,10 @@ const __sfc__$v = vue.defineComponent({
|
|
|
18401
18410
|
scrolling: false
|
|
18402
18411
|
};
|
|
18403
18412
|
scrollColumns2.push(scrollColumn);
|
|
18413
|
+
if (props2.modelValue.length) {
|
|
18414
|
+
const index = children.findIndex((option) => modelValue.value[scrollColumns2.length - 1] === getValue(option));
|
|
18415
|
+
scrollColumn.index = index === -1 ? 0 : index;
|
|
18416
|
+
}
|
|
18404
18417
|
scrollTo2(scrollColumn);
|
|
18405
18418
|
createChildren(scrollColumns2, (_a = scrollColumn.column[scrollColumn.index][getOptionKey("children")]) != null ? _a : []);
|
|
18406
18419
|
}
|
|
@@ -18412,7 +18425,9 @@ const __sfc__$v = vue.defineComponent({
|
|
|
18412
18425
|
}
|
|
18413
18426
|
function buildScrollColumns() {
|
|
18414
18427
|
scrollColumns.value = props2.cascade ? normalizeCascadeMode(props2.columns) : normalizeNormalMode(props2.columns);
|
|
18415
|
-
|
|
18428
|
+
if (!props2.cascade) {
|
|
18429
|
+
updateScrollColumnsIndex();
|
|
18430
|
+
}
|
|
18416
18431
|
}
|
|
18417
18432
|
function updateScrollColumnsIndex() {
|
|
18418
18433
|
scrollColumns.value.forEach((scrollColumn, idx) => {
|
|
@@ -18524,7 +18539,7 @@ const __sfc__$v = vue.defineComponent({
|
|
|
18524
18539
|
if (isSamePicked()) {
|
|
18525
18540
|
return;
|
|
18526
18541
|
}
|
|
18527
|
-
if (cascade) {
|
|
18542
|
+
if (cascade && !props2.modelValue.length) {
|
|
18528
18543
|
rebuildChildren(scrollColumn);
|
|
18529
18544
|
}
|
|
18530
18545
|
const hasScrolling = scrollColumns.value.some((scrollColumn2) => scrollColumn2.scrolling);
|
|
@@ -24950,7 +24965,7 @@ withInstall(stdin_default$1);
|
|
|
24950
24965
|
withPropsDefaultsSetter(stdin_default$1, props);
|
|
24951
24966
|
const _WatermarkComponent = stdin_default$1;
|
|
24952
24967
|
var stdin_default = stdin_default$1;
|
|
24953
|
-
const version = "2.20.
|
|
24968
|
+
const version = "2.20.7";
|
|
24954
24969
|
function install(app) {
|
|
24955
24970
|
stdin_default$3k.install && app.use(stdin_default$3k);
|
|
24956
24971
|
stdin_default$3i.install && app.use(stdin_default$3i);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.7",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
49
|
"dayjs": "^1.10.4",
|
|
50
50
|
"decimal.js": "^10.2.1",
|
|
51
|
-
"@varlet/
|
|
52
|
-
"@varlet/
|
|
53
|
-
"@varlet/shared": "2.20.
|
|
51
|
+
"@varlet/use": "2.20.7",
|
|
52
|
+
"@varlet/icons": "2.20.7",
|
|
53
|
+
"@varlet/shared": "2.20.7"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@vue/runtime-core": "3.4.3",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"typescript": "^5.1.5",
|
|
67
67
|
"vue": "3.4.3",
|
|
68
68
|
"vue-router": "4.2.0",
|
|
69
|
-
"@varlet/ui": "2.20.
|
|
70
|
-
"@varlet/cli": "2.20.
|
|
71
|
-
"@varlet/touch-emulator": "2.20.
|
|
69
|
+
"@varlet/ui": "2.20.7",
|
|
70
|
+
"@varlet/cli": "2.20.7",
|
|
71
|
+
"@varlet/touch-emulator": "2.20.7"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "varlet-cli dev",
|