dfish-widget 1.0.62 → 1.0.63

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 CHANGED
@@ -5467,7 +5467,7 @@ var script$O = /*#__PURE__*/Object.assign(__default__$1, {
5467
5467
  }
5468
5468
  },
5469
5469
  current: {
5470
- type: [String, Number]
5470
+ type: [String, Number, Array]
5471
5471
  },
5472
5472
  itemHeight: {
5473
5473
  type: [String, Number],
@@ -5553,7 +5553,7 @@ const props = __props;
5553
5553
  };
5554
5554
 
5555
5555
  const isCurrent = (item) => {
5556
- return props.current === item[propValue]
5556
+ return Array.isArray(props.current) ? props.current.includes(item[propValue]) : (props.current === item[propValue])
5557
5557
  };
5558
5558
 
5559
5559
  const clickItem = (e, item) => {
@@ -5699,14 +5699,19 @@ const props = __props;
5699
5699
  const watchCurrent = async (val) => {
5700
5700
  await nextTick();
5701
5701
  current = val;
5702
- if (!showList.value.find(n => n[propValue] === val)) {
5703
- const item = expandTo(val);
5704
- const i = flatList.value.indexOf(item);
5705
- if (i > -1) {
5706
- await nextTick();
5707
- wrap.value.scrollToY(((i + 1) * itemHeight) - (flow.value.height / 2));
5702
+ if (!val) return
5703
+ val = $$1.array(val);
5704
+ for (let v of val) {
5705
+ if (!showList.value.find(n => v == n[propValue])) {
5706
+ expandTo(v);
5708
5707
  }
5709
5708
  }
5709
+ const item = find(val[0]);
5710
+ const i = flatList.value.indexOf(item);
5711
+ if (i > -1) {
5712
+ await nextTick();
5713
+ wrap.value.scrollToY(((i + 1) * itemHeight) - (flow.value.height / 2));
5714
+ }
5710
5715
  };
5711
5716
 
5712
5717
  onMounted(async () => {