dfish-widget 1.0.71 → 1.0.72
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 +28 -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,22 @@ const props = __props;
|
|
|
6709
6712
|
const watchCurrent = async (val) => {
|
|
6710
6713
|
await nextTick();
|
|
6711
6714
|
current = val;
|
|
6712
|
-
|
|
6713
|
-
val = $$1.array(val);
|
|
6715
|
+
console.log(val);
|
|
6716
|
+
val = val && $$1.array(val);
|
|
6717
|
+
if (!val || !val.length) return
|
|
6714
6718
|
for (let v of val) {
|
|
6715
6719
|
if (!showList.value.find(n => v == n[propValue])) {
|
|
6716
6720
|
expandTo(v);
|
|
6717
6721
|
}
|
|
6718
6722
|
}
|
|
6719
|
-
const
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6723
|
+
const showIndex = showList.value.findIndex(n => val[0] == n[propValue]);
|
|
6724
|
+
if (showIndex === -1 || showIndex === showList.value.length - 1) {
|
|
6725
|
+
const item = find(val[0]);
|
|
6726
|
+
const i = flatList.value.indexOf(item);
|
|
6727
|
+
if (i > -1) {
|
|
6728
|
+
await nextTick();
|
|
6729
|
+
root.value.scrollToY(((i + 1) * itemHeight) - (flow.value.height / 2));
|
|
6730
|
+
}
|
|
6724
6731
|
}
|
|
6725
6732
|
};
|
|
6726
6733
|
|
|
@@ -6734,7 +6741,7 @@ const props = __props;
|
|
|
6734
6741
|
watchCurrent(props.current);
|
|
6735
6742
|
}
|
|
6736
6743
|
}, {immediate: true});
|
|
6737
|
-
watch(() => props.current, watchCurrent);
|
|
6744
|
+
watch(() => props.current, watchCurrent, {deep: true});
|
|
6738
6745
|
if (!props.children || props.children.length == 0) {
|
|
6739
6746
|
const src = props.src && props.src();
|
|
6740
6747
|
if (src) {
|
|
@@ -7435,11 +7442,10 @@ const {leafSymbol: leafSymbol$1} = $$1.symbol;
|
|
|
7435
7442
|
}, h('i', {
|
|
7436
7443
|
class: this.input_icon
|
|
7437
7444
|
})),
|
|
7438
|
-
this.x.text ?
|
|
7445
|
+
this.$slots.text || this.x.text ?
|
|
7439
7446
|
h('span', {
|
|
7440
7447
|
class: this.$options.name + '-text',
|
|
7441
|
-
|
|
7442
|
-
}, this.x.text) : null
|
|
7448
|
+
}, this.$slots.text ? this.$slots.text() : this.x.text) : null
|
|
7443
7449
|
]
|
|
7444
7450
|
},
|
|
7445
7451
|
html_main() {
|
|
@@ -11570,8 +11576,9 @@ var script$8 = {
|
|
|
11570
11576
|
}
|
|
11571
11577
|
if (Array.isArray(v)) {
|
|
11572
11578
|
return v.map(item => item.text).join(', ')
|
|
11573
|
-
} else
|
|
11574
|
-
return v &&
|
|
11579
|
+
} else {
|
|
11580
|
+
return (v && v.text) || ''
|
|
11581
|
+
}
|
|
11575
11582
|
}
|
|
11576
11583
|
}
|
|
11577
11584
|
};
|