zartui 3.1.32 → 3.1.34

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/zartui.cjs.js CHANGED
@@ -9551,7 +9551,7 @@ var stdin_default$$ = vue.defineComponent({
9551
9551
  parent,
9552
9552
  index
9553
9553
  } = use.useParent(DROPDOWN_KEY);
9554
- const modelArray = vue.reactive(props.modelValueArray);
9554
+ const modelArray = vue.ref(props.modelValueArray);
9555
9555
  if (!parent) {
9556
9556
  if (process.env.NODE_ENV !== "production") {
9557
9557
  console.error("[ZartUI] <DropdownItem> must be a child component of <DropdownMenu>.");
@@ -9563,7 +9563,7 @@ var stdin_default$$ = vue.defineComponent({
9563
9563
  const onOpened = getEmitter("opened");
9564
9564
  const onClose = () => {
9565
9565
  if (props.multiSelect) {
9566
- emit("close", modelArray);
9566
+ emit("close", modelArray.value);
9567
9567
  } else {
9568
9568
  emit("close");
9569
9569
  }
@@ -9571,7 +9571,7 @@ var stdin_default$$ = vue.defineComponent({
9571
9571
  const onClosed = () => {
9572
9572
  state.showWrapper = false;
9573
9573
  if (props.multiSelect) {
9574
- emit("closed", modelArray);
9574
+ emit("closed", modelArray.value);
9575
9575
  } else {
9576
9576
  emit("closed");
9577
9577
  }
@@ -9583,14 +9583,14 @@ var stdin_default$$ = vue.defineComponent({
9583
9583
  };
9584
9584
  const onClickReset = () => {
9585
9585
  var _a;
9586
- modelArray.splice(0);
9587
- modelArray.push(...(_a = props.resetDefaultValue) != null ? _a : []);
9586
+ modelArray.value.splice(0);
9587
+ modelArray.value.push(...(_a = props.resetDefaultValue) != null ? _a : []);
9588
9588
  state.showPopup = false;
9589
9589
  emit("reset");
9590
9590
  };
9591
9591
  const onClickConfirm = () => {
9592
9592
  state.showPopup = false;
9593
- emit("confirm", modelArray);
9593
+ emit("confirm", modelArray.value);
9594
9594
  };
9595
9595
  const toggle = (show = !state.showPopup, options = {}) => {
9596
9596
  if (show === state.showPopup) {
@@ -9613,7 +9613,7 @@ var stdin_default$$ = vue.defineComponent({
9613
9613
  if (props.multiSelect) {
9614
9614
  let title = "";
9615
9615
  props.options.forEach((item) => {
9616
- if (modelArray.indexOf(item.value) > -1) {
9616
+ if (modelArray.value.indexOf(item.value) > -1) {
9617
9617
  title += item[fields.value.text] + "、";
9618
9618
  }
9619
9619
  });
@@ -9626,6 +9626,7 @@ var stdin_default$$ = vue.defineComponent({
9626
9626
  return match ? match[fields.value.text] : "";
9627
9627
  };
9628
9628
  const renderOption = (option) => {
9629
+ var _a;
9629
9630
  const {
9630
9631
  activeColor
9631
9632
  } = parent.props;
@@ -9633,7 +9634,7 @@ var stdin_default$$ = vue.defineComponent({
9633
9634
  const text = option[fields.value.text];
9634
9635
  let active = false;
9635
9636
  if (props.multiSelect) {
9636
- if (modelArray == null ? void 0 : modelArray.includes(value)) {
9637
+ if ((_a = modelArray.value) == null ? void 0 : _a.includes(value)) {
9637
9638
  active = true;
9638
9639
  option.selected = true;
9639
9640
  } else {
@@ -9646,20 +9647,17 @@ var stdin_default$$ = vue.defineComponent({
9646
9647
  if (props.multiSelect) {
9647
9648
  let isCancelSelect = true;
9648
9649
  if (option.selected) {
9649
- modelArray.splice(modelArray.indexOf(value), 1);
9650
- emit("update:modelValue", -value);
9650
+ modelArray.value.splice(modelArray.value.indexOf(value), 1);
9651
9651
  emit("change", -value);
9652
9652
  } else {
9653
- modelArray.push(value);
9653
+ modelArray.value.push(value);
9654
9654
  isCancelSelect = false;
9655
- emit("update:modelValue", value);
9656
9655
  emit("change", value);
9657
9656
  }
9658
9657
  emit("item-select", value, isCancelSelect);
9659
9658
  } else {
9660
9659
  state.showPopup = false;
9661
9660
  if (option.value !== props.modelValue) {
9662
- emit("update:modelValue", value);
9663
9661
  emit("change", value);
9664
9662
  }
9665
9663
  emit("item-select", value);
@@ -9806,11 +9804,12 @@ var stdin_default$$ = vue.defineComponent({
9806
9804
  })]), [[vue.vShow, state.showWrapper]]);
9807
9805
  };
9808
9806
  const updateInnerValue = (updateValue = []) => {
9809
- modelArray.splice(0);
9810
- modelArray.push(...updateValue);
9807
+ modelArray.value.splice(0);
9808
+ modelArray.value.push(...updateValue);
9811
9809
  };
9812
9810
  useExpose({
9813
9811
  state,
9812
+ modelArray,
9814
9813
  toggle,
9815
9814
  renderTitle,
9816
9815
  updateInnerValue
@@ -20563,7 +20562,7 @@ const Lazyload = {
20563
20562
  });
20564
20563
  }
20565
20564
  };
20566
- const version = "3.1.32";
20565
+ const version = "3.1.33";
20567
20566
  function install(app) {
20568
20567
  const components = [
20569
20568
  ActionSheet,
package/lib/zartui.es.js CHANGED
@@ -9549,7 +9549,7 @@ var stdin_default$$ = defineComponent({
9549
9549
  parent,
9550
9550
  index
9551
9551
  } = useParent(DROPDOWN_KEY);
9552
- const modelArray = reactive(props.modelValueArray);
9552
+ const modelArray = ref(props.modelValueArray);
9553
9553
  if (!parent) {
9554
9554
  if (process.env.NODE_ENV !== "production") {
9555
9555
  console.error("[ZartUI] <DropdownItem> must be a child component of <DropdownMenu>.");
@@ -9561,7 +9561,7 @@ var stdin_default$$ = defineComponent({
9561
9561
  const onOpened = getEmitter("opened");
9562
9562
  const onClose = () => {
9563
9563
  if (props.multiSelect) {
9564
- emit("close", modelArray);
9564
+ emit("close", modelArray.value);
9565
9565
  } else {
9566
9566
  emit("close");
9567
9567
  }
@@ -9569,7 +9569,7 @@ var stdin_default$$ = defineComponent({
9569
9569
  const onClosed = () => {
9570
9570
  state.showWrapper = false;
9571
9571
  if (props.multiSelect) {
9572
- emit("closed", modelArray);
9572
+ emit("closed", modelArray.value);
9573
9573
  } else {
9574
9574
  emit("closed");
9575
9575
  }
@@ -9581,14 +9581,14 @@ var stdin_default$$ = defineComponent({
9581
9581
  };
9582
9582
  const onClickReset = () => {
9583
9583
  var _a;
9584
- modelArray.splice(0);
9585
- modelArray.push(...(_a = props.resetDefaultValue) != null ? _a : []);
9584
+ modelArray.value.splice(0);
9585
+ modelArray.value.push(...(_a = props.resetDefaultValue) != null ? _a : []);
9586
9586
  state.showPopup = false;
9587
9587
  emit("reset");
9588
9588
  };
9589
9589
  const onClickConfirm = () => {
9590
9590
  state.showPopup = false;
9591
- emit("confirm", modelArray);
9591
+ emit("confirm", modelArray.value);
9592
9592
  };
9593
9593
  const toggle = (show = !state.showPopup, options = {}) => {
9594
9594
  if (show === state.showPopup) {
@@ -9611,7 +9611,7 @@ var stdin_default$$ = defineComponent({
9611
9611
  if (props.multiSelect) {
9612
9612
  let title = "";
9613
9613
  props.options.forEach((item) => {
9614
- if (modelArray.indexOf(item.value) > -1) {
9614
+ if (modelArray.value.indexOf(item.value) > -1) {
9615
9615
  title += item[fields.value.text] + "、";
9616
9616
  }
9617
9617
  });
@@ -9624,6 +9624,7 @@ var stdin_default$$ = defineComponent({
9624
9624
  return match ? match[fields.value.text] : "";
9625
9625
  };
9626
9626
  const renderOption = (option) => {
9627
+ var _a;
9627
9628
  const {
9628
9629
  activeColor
9629
9630
  } = parent.props;
@@ -9631,7 +9632,7 @@ var stdin_default$$ = defineComponent({
9631
9632
  const text = option[fields.value.text];
9632
9633
  let active = false;
9633
9634
  if (props.multiSelect) {
9634
- if (modelArray == null ? void 0 : modelArray.includes(value)) {
9635
+ if ((_a = modelArray.value) == null ? void 0 : _a.includes(value)) {
9635
9636
  active = true;
9636
9637
  option.selected = true;
9637
9638
  } else {
@@ -9644,20 +9645,17 @@ var stdin_default$$ = defineComponent({
9644
9645
  if (props.multiSelect) {
9645
9646
  let isCancelSelect = true;
9646
9647
  if (option.selected) {
9647
- modelArray.splice(modelArray.indexOf(value), 1);
9648
- emit("update:modelValue", -value);
9648
+ modelArray.value.splice(modelArray.value.indexOf(value), 1);
9649
9649
  emit("change", -value);
9650
9650
  } else {
9651
- modelArray.push(value);
9651
+ modelArray.value.push(value);
9652
9652
  isCancelSelect = false;
9653
- emit("update:modelValue", value);
9654
9653
  emit("change", value);
9655
9654
  }
9656
9655
  emit("item-select", value, isCancelSelect);
9657
9656
  } else {
9658
9657
  state.showPopup = false;
9659
9658
  if (option.value !== props.modelValue) {
9660
- emit("update:modelValue", value);
9661
9659
  emit("change", value);
9662
9660
  }
9663
9661
  emit("item-select", value);
@@ -9804,11 +9802,12 @@ var stdin_default$$ = defineComponent({
9804
9802
  })]), [[vShow, state.showWrapper]]);
9805
9803
  };
9806
9804
  const updateInnerValue = (updateValue = []) => {
9807
- modelArray.splice(0);
9808
- modelArray.push(...updateValue);
9805
+ modelArray.value.splice(0);
9806
+ modelArray.value.push(...updateValue);
9809
9807
  };
9810
9808
  useExpose({
9811
9809
  state,
9810
+ modelArray,
9812
9811
  toggle,
9813
9812
  renderTitle,
9814
9813
  updateInnerValue
@@ -20561,7 +20560,7 @@ const Lazyload = {
20561
20560
  });
20562
20561
  }
20563
20562
  };
20564
- const version = "3.1.32";
20563
+ const version = "3.1.33";
20565
20564
  function install(app) {
20566
20565
  const components = [
20567
20566
  ActionSheet,
package/lib/zartui.js CHANGED
@@ -9795,7 +9795,7 @@
9795
9795
  parent,
9796
9796
  index
9797
9797
  } = useParent(DROPDOWN_KEY);
9798
- const modelArray = vue.reactive(props.modelValueArray);
9798
+ const modelArray = vue.ref(props.modelValueArray);
9799
9799
  if (!parent) {
9800
9800
  return;
9801
9801
  }
@@ -9804,7 +9804,7 @@
9804
9804
  const onOpened = getEmitter("opened");
9805
9805
  const onClose = () => {
9806
9806
  if (props.multiSelect) {
9807
- emit("close", modelArray);
9807
+ emit("close", modelArray.value);
9808
9808
  } else {
9809
9809
  emit("close");
9810
9810
  }
@@ -9812,7 +9812,7 @@
9812
9812
  const onClosed = () => {
9813
9813
  state.showWrapper = false;
9814
9814
  if (props.multiSelect) {
9815
- emit("closed", modelArray);
9815
+ emit("closed", modelArray.value);
9816
9816
  } else {
9817
9817
  emit("closed");
9818
9818
  }
@@ -9824,14 +9824,14 @@
9824
9824
  };
9825
9825
  const onClickReset = () => {
9826
9826
  var _a;
9827
- modelArray.splice(0);
9828
- modelArray.push(...(_a = props.resetDefaultValue) != null ? _a : []);
9827
+ modelArray.value.splice(0);
9828
+ modelArray.value.push(...(_a = props.resetDefaultValue) != null ? _a : []);
9829
9829
  state.showPopup = false;
9830
9830
  emit("reset");
9831
9831
  };
9832
9832
  const onClickConfirm = () => {
9833
9833
  state.showPopup = false;
9834
- emit("confirm", modelArray);
9834
+ emit("confirm", modelArray.value);
9835
9835
  };
9836
9836
  const toggle = (show = !state.showPopup, options = {}) => {
9837
9837
  if (show === state.showPopup) {
@@ -9854,7 +9854,7 @@
9854
9854
  if (props.multiSelect) {
9855
9855
  let title = "";
9856
9856
  props.options.forEach((item) => {
9857
- if (modelArray.indexOf(item.value) > -1) {
9857
+ if (modelArray.value.indexOf(item.value) > -1) {
9858
9858
  title += item[fields.value.text] + "、";
9859
9859
  }
9860
9860
  });
@@ -9867,6 +9867,7 @@
9867
9867
  return match ? match[fields.value.text] : "";
9868
9868
  };
9869
9869
  const renderOption = (option) => {
9870
+ var _a;
9870
9871
  const {
9871
9872
  activeColor
9872
9873
  } = parent.props;
@@ -9874,7 +9875,7 @@
9874
9875
  const text = option[fields.value.text];
9875
9876
  let active = false;
9876
9877
  if (props.multiSelect) {
9877
- if (modelArray == null ? void 0 : modelArray.includes(value)) {
9878
+ if ((_a = modelArray.value) == null ? void 0 : _a.includes(value)) {
9878
9879
  active = true;
9879
9880
  option.selected = true;
9880
9881
  } else {
@@ -9887,20 +9888,17 @@
9887
9888
  if (props.multiSelect) {
9888
9889
  let isCancelSelect = true;
9889
9890
  if (option.selected) {
9890
- modelArray.splice(modelArray.indexOf(value), 1);
9891
- emit("update:modelValue", -value);
9891
+ modelArray.value.splice(modelArray.value.indexOf(value), 1);
9892
9892
  emit("change", -value);
9893
9893
  } else {
9894
- modelArray.push(value);
9894
+ modelArray.value.push(value);
9895
9895
  isCancelSelect = false;
9896
- emit("update:modelValue", value);
9897
9896
  emit("change", value);
9898
9897
  }
9899
9898
  emit("item-select", value, isCancelSelect);
9900
9899
  } else {
9901
9900
  state.showPopup = false;
9902
9901
  if (option.value !== props.modelValue) {
9903
- emit("update:modelValue", value);
9904
9902
  emit("change", value);
9905
9903
  }
9906
9904
  emit("item-select", value);
@@ -10047,11 +10045,12 @@
10047
10045
  })]), [[vue.vShow, state.showWrapper]]);
10048
10046
  };
10049
10047
  const updateInnerValue = (updateValue = []) => {
10050
- modelArray.splice(0);
10051
- modelArray.push(...updateValue);
10048
+ modelArray.value.splice(0);
10049
+ modelArray.value.push(...updateValue);
10052
10050
  };
10053
10051
  useExpose({
10054
10052
  state,
10053
+ modelArray,
10055
10054
  toggle,
10056
10055
  renderTitle,
10057
10056
  updateInnerValue
@@ -24623,7 +24622,7 @@
24623
24622
  });
24624
24623
  }
24625
24624
  };
24626
- const version = "3.1.32";
24625
+ const version = "3.1.33";
24627
24626
  function install(app) {
24628
24627
  const components = [
24629
24628
  ActionSheet,