dfish-widget 1.0.71 → 1.0.73
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/lib/index.esm.js +27 -21
- package/lib/index.esm.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -5694,18 +5694,21 @@ const props = __props;
|
|
|
5694
5694
|
const watchCurrent = async (val) => {
|
|
5695
5695
|
await nextTick();
|
|
5696
5696
|
current = val;
|
|
5697
|
-
|
|
5698
|
-
val
|
|
5697
|
+
val = val && $$1.array(val);
|
|
5698
|
+
if (!val || !val.length) return
|
|
5699
5699
|
for (let v of val) {
|
|
5700
5700
|
if (!showList.value.find(n => v == n[propValue])) {
|
|
5701
5701
|
expandTo(v);
|
|
5702
5702
|
}
|
|
5703
5703
|
}
|
|
5704
|
-
const
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5704
|
+
const showIndex = showList.value.findIndex(n => val[0] == n[propValue]);
|
|
5705
|
+
if (showIndex === -1 || showIndex === showList.value.length - 1) {
|
|
5706
|
+
const item = find(val[0]);
|
|
5707
|
+
const i = flatList.value.indexOf(item);
|
|
5708
|
+
if (i > -1) {
|
|
5709
|
+
await nextTick();
|
|
5710
|
+
root.value.scrollToY(((i + 1) * itemHeight) - (flow.value.height / 2));
|
|
5711
|
+
}
|
|
5709
5712
|
}
|
|
5710
5713
|
};
|
|
5711
5714
|
|
|
@@ -5719,7 +5722,7 @@ const props = __props;
|
|
|
5719
5722
|
watchCurrent(props.current);
|
|
5720
5723
|
}
|
|
5721
5724
|
}, {immediate: true});
|
|
5722
|
-
watch(() => props.current, watchCurrent);
|
|
5725
|
+
watch(() => props.current, watchCurrent, {deep: true});
|
|
5723
5726
|
if (!props.children || props.children.length == 0) {
|
|
5724
5727
|
const src = props.src && props.src();
|
|
5725
5728
|
if (src) {
|
|
@@ -6709,18 +6712,21 @@ const props = __props;
|
|
|
6709
6712
|
const watchCurrent = async (val) => {
|
|
6710
6713
|
await nextTick();
|
|
6711
6714
|
current = val;
|
|
6712
|
-
|
|
6713
|
-
val
|
|
6715
|
+
val = val && $$1.array(val);
|
|
6716
|
+
if (!val || !val.length) return
|
|
6714
6717
|
for (let v of val) {
|
|
6715
6718
|
if (!showList.value.find(n => v == n[propValue])) {
|
|
6716
6719
|
expandTo(v);
|
|
6717
6720
|
}
|
|
6718
6721
|
}
|
|
6719
|
-
const
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6722
|
+
const showIndex = showList.value.findIndex(n => val[0] == n[propValue]);
|
|
6723
|
+
if (showIndex === -1 || showIndex === showList.value.length - 1) {
|
|
6724
|
+
const item = find(val[0]);
|
|
6725
|
+
const i = flatList.value.indexOf(item);
|
|
6726
|
+
if (i > -1) {
|
|
6727
|
+
await nextTick();
|
|
6728
|
+
root.value.scrollToY(((i + 1) * itemHeight) - (flow.value.height / 2));
|
|
6729
|
+
}
|
|
6724
6730
|
}
|
|
6725
6731
|
};
|
|
6726
6732
|
|
|
@@ -6734,7 +6740,7 @@ const props = __props;
|
|
|
6734
6740
|
watchCurrent(props.current);
|
|
6735
6741
|
}
|
|
6736
6742
|
}, {immediate: true});
|
|
6737
|
-
watch(() => props.current, watchCurrent);
|
|
6743
|
+
watch(() => props.current, watchCurrent, {deep: true});
|
|
6738
6744
|
if (!props.children || props.children.length == 0) {
|
|
6739
6745
|
const src = props.src && props.src();
|
|
6740
6746
|
if (src) {
|
|
@@ -7435,11 +7441,10 @@ const {leafSymbol: leafSymbol$1} = $$1.symbol;
|
|
|
7435
7441
|
}, h('i', {
|
|
7436
7442
|
class: this.input_icon
|
|
7437
7443
|
})),
|
|
7438
|
-
this.x.text ?
|
|
7444
|
+
this.$slots.text || this.x.text ?
|
|
7439
7445
|
h('span', {
|
|
7440
7446
|
class: this.$options.name + '-text',
|
|
7441
|
-
|
|
7442
|
-
}, this.x.text) : null
|
|
7447
|
+
}, this.$slots.text ? this.$slots.text() : this.x.text) : null
|
|
7443
7448
|
]
|
|
7444
7449
|
},
|
|
7445
7450
|
html_main() {
|
|
@@ -11570,8 +11575,9 @@ var script$8 = {
|
|
|
11570
11575
|
}
|
|
11571
11576
|
if (Array.isArray(v)) {
|
|
11572
11577
|
return v.map(item => item.text).join(', ')
|
|
11573
|
-
} else
|
|
11574
|
-
return v &&
|
|
11578
|
+
} else {
|
|
11579
|
+
return (v && v.text) || ''
|
|
11580
|
+
}
|
|
11575
11581
|
}
|
|
11576
11582
|
}
|
|
11577
11583
|
};
|