vant 4.3.1 → 4.4.0

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.
Files changed (113) hide show
  1. package/es/address-edit/AddressEdit.mjs +1 -0
  2. package/es/area/Area.d.ts +6 -8
  3. package/es/area/Area.mjs +1 -1
  4. package/es/area/index.d.ts +4 -6
  5. package/es/back-top/BackTop.d.ts +1 -1
  6. package/es/back-top/BackTop.mjs +6 -3
  7. package/es/back-top/index.css +1 -1
  8. package/es/back-top/index.d.ts +1 -1
  9. package/es/barrage/Barrage.d.ts +93 -0
  10. package/es/barrage/Barrage.mjs +134 -0
  11. package/es/barrage/index.css +1 -0
  12. package/es/barrage/index.d.ts +69 -0
  13. package/es/barrage/index.mjs +10 -0
  14. package/es/barrage/style/index.d.ts +1 -0
  15. package/es/barrage/style/index.mjs +2 -0
  16. package/es/barrage/types.d.ts +7 -0
  17. package/es/barrage/types.mjs +0 -0
  18. package/es/cascader/Cascader.mjs +14 -0
  19. package/es/checkbox/Checker.d.ts +2 -0
  20. package/es/checkbox/Checker.mjs +13 -1
  21. package/es/contact-list/ContactList.mjs +1 -1
  22. package/es/contact-list/index.css +1 -1
  23. package/es/date-picker/DatePicker.mjs +5 -2
  24. package/es/date-picker/utils.d.ts +1 -1
  25. package/es/dialog/index.css +1 -1
  26. package/es/divider/Divider.d.ts +4 -0
  27. package/es/divider/Divider.mjs +4 -2
  28. package/es/divider/index.css +1 -1
  29. package/es/divider/index.d.ts +3 -0
  30. package/es/field/Field.mjs +4 -0
  31. package/es/image-preview/ImagePreviewItem.mjs +60 -26
  32. package/es/index.d.ts +2 -1
  33. package/es/index.mjs +4 -1
  34. package/es/notice-bar/NoticeBar.d.ts +1 -1
  35. package/es/notice-bar/index.d.ts +1 -1
  36. package/es/picker-group/PickerGroup.d.ts +15 -1
  37. package/es/picker-group/PickerGroup.mjs +8 -6
  38. package/es/picker-group/index.d.ts +11 -1
  39. package/es/signature/Signature.d.ts +13 -0
  40. package/es/signature/Signature.mjs +24 -8
  41. package/es/signature/index.css +1 -1
  42. package/es/signature/index.d.ts +9 -0
  43. package/es/step/index.css +1 -1
  44. package/es/submit-bar/index.css +1 -1
  45. package/es/tabs/Tabs.mjs +8 -2
  46. package/es/tabs/utils.d.ts +2 -2
  47. package/es/tabs/utils.mjs +14 -4
  48. package/es/uploader/Uploader.d.ts +6 -1
  49. package/es/uploader/Uploader.mjs +25 -10
  50. package/es/uploader/UploaderPreviewItem.d.ts +5 -1
  51. package/es/uploader/UploaderPreviewItem.mjs +6 -3
  52. package/es/uploader/index.d.ts +5 -1
  53. package/es/uploader/types.d.ts +1 -0
  54. package/lib/address-edit/AddressEdit.js +1 -0
  55. package/lib/area/Area.d.ts +6 -8
  56. package/lib/area/Area.js +1 -1
  57. package/lib/area/index.d.ts +4 -6
  58. package/lib/back-top/BackTop.d.ts +1 -1
  59. package/lib/back-top/BackTop.js +6 -3
  60. package/lib/back-top/index.css +1 -1
  61. package/lib/back-top/index.d.ts +1 -1
  62. package/lib/barrage/Barrage.d.ts +93 -0
  63. package/lib/barrage/Barrage.js +153 -0
  64. package/lib/barrage/index.css +1 -0
  65. package/lib/barrage/index.d.ts +69 -0
  66. package/lib/barrage/index.js +39 -0
  67. package/lib/barrage/style/index.d.ts +1 -0
  68. package/lib/barrage/style/index.js +2 -0
  69. package/lib/barrage/types.d.ts +7 -0
  70. package/lib/barrage/types.js +15 -0
  71. package/lib/cascader/Cascader.js +14 -0
  72. package/lib/checkbox/Checker.d.ts +2 -0
  73. package/lib/checkbox/Checker.js +13 -1
  74. package/lib/contact-list/ContactList.js +1 -1
  75. package/lib/contact-list/index.css +1 -1
  76. package/lib/date-picker/DatePicker.js +5 -2
  77. package/lib/date-picker/utils.d.ts +1 -1
  78. package/lib/dialog/index.css +1 -1
  79. package/lib/divider/Divider.d.ts +4 -0
  80. package/lib/divider/Divider.js +4 -2
  81. package/lib/divider/index.css +1 -1
  82. package/lib/divider/index.d.ts +3 -0
  83. package/lib/field/Field.js +4 -0
  84. package/lib/image-preview/ImagePreviewItem.js +59 -25
  85. package/lib/index.css +1 -1
  86. package/lib/index.d.ts +2 -1
  87. package/lib/index.js +4 -1
  88. package/lib/notice-bar/NoticeBar.d.ts +1 -1
  89. package/lib/notice-bar/index.d.ts +1 -1
  90. package/lib/picker-group/PickerGroup.d.ts +15 -1
  91. package/lib/picker-group/PickerGroup.js +6 -4
  92. package/lib/picker-group/index.d.ts +11 -1
  93. package/lib/signature/Signature.d.ts +13 -0
  94. package/lib/signature/Signature.js +23 -7
  95. package/lib/signature/index.css +1 -1
  96. package/lib/signature/index.d.ts +9 -0
  97. package/lib/step/index.css +1 -1
  98. package/lib/submit-bar/index.css +1 -1
  99. package/lib/tabs/Tabs.js +8 -2
  100. package/lib/tabs/utils.d.ts +2 -2
  101. package/lib/tabs/utils.js +13 -3
  102. package/lib/uploader/Uploader.d.ts +6 -1
  103. package/lib/uploader/Uploader.js +25 -10
  104. package/lib/uploader/UploaderPreviewItem.d.ts +5 -1
  105. package/lib/uploader/UploaderPreviewItem.js +6 -3
  106. package/lib/uploader/index.d.ts +5 -1
  107. package/lib/uploader/types.d.ts +1 -0
  108. package/lib/vant.cjs.js +611 -358
  109. package/lib/vant.es.js +612 -359
  110. package/lib/vant.js +611 -358
  111. package/lib/vant.min.js +1 -1
  112. package/lib/web-types.json +1 -1
  113. package/package.json +1 -1
package/lib/vant.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { unref, ref, reactive, inject, watch, onMounted, nextTick, createVNode, defineComponent, getCurrentInstance, computed, onActivated, onDeactivated, onBeforeUnmount, provide, watchEffect, mergeProps, Transition, withDirectives, vShow, Teleport, Fragment, onBeforeUpdate, createTextVNode, onUnmounted, createApp, resolveDirective, withKeys, onUpdated, Comment, Text, h } from "vue";
2
- import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, raf, useScrollParent, usePageVisibility, doubleRaf, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, inBrowser as inBrowser$1, useToggle, cancelRaf, useCountDown, useClickAway } from "@vant/use";
2
+ import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, cancelRaf, raf, useScrollParent, usePageVisibility, doubleRaf, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, inBrowser as inBrowser$1, useToggle, useCountDown, useClickAway } from "@vant/use";
3
3
  import { offsetModifier, createPopper } from "@vant/popperjs";
4
4
  const isDef = (val) => val !== void 0 && val !== null;
5
5
  const isFunction = (val) => typeof val === "function";
@@ -235,7 +235,7 @@ function deepAssign(to, from) {
235
235
  });
236
236
  return to;
237
237
  }
238
- var stdin_default$1P = {
238
+ var stdin_default$1Q = {
239
239
  name: "姓名",
240
240
  tel: "电话",
241
241
  save: "保存",
@@ -299,7 +299,7 @@ var stdin_default$1P = {
299
299
  };
300
300
  const lang = ref("zh-CN");
301
301
  const messages = reactive({
302
- "zh-CN": stdin_default$1P
302
+ "zh-CN": stdin_default$1Q
303
303
  });
304
304
  const Locale = {
305
305
  messages() {
@@ -314,11 +314,11 @@ const Locale = {
314
314
  }
315
315
  };
316
316
  const useCurrentLang = () => lang;
317
- var stdin_default$1O = Locale;
317
+ var stdin_default$1P = Locale;
318
318
  function createTranslate(name2) {
319
319
  const prefix = camelize(name2) + ".";
320
320
  return (path, ...args) => {
321
- const messages2 = stdin_default$1O.messages();
321
+ const messages2 = stdin_default$1P.messages();
322
322
  const message = get(messages2, prefix + path) || get(messages2, path);
323
323
  return isFunction(message) ? message(...args) : message;
324
324
  };
@@ -440,20 +440,20 @@ function usePlaceholder(contentRef, bem2) {
440
440
  }
441
441
  }, [renderContent()]);
442
442
  }
443
- const [name$1E, bem$1z] = createNamespace("action-bar");
444
- const ACTION_BAR_KEY = Symbol(name$1E);
443
+ const [name$1F, bem$1A] = createNamespace("action-bar");
444
+ const ACTION_BAR_KEY = Symbol(name$1F);
445
445
  const actionBarProps = {
446
446
  placeholder: Boolean,
447
447
  safeAreaInsetBottom: truthProp
448
448
  };
449
- var stdin_default$1N = defineComponent({
450
- name: name$1E,
449
+ var stdin_default$1O = defineComponent({
450
+ name: name$1F,
451
451
  props: actionBarProps,
452
452
  setup(props, {
453
453
  slots
454
454
  }) {
455
455
  const root = ref();
456
- const renderPlaceholder = usePlaceholder(root, bem$1z);
456
+ const renderPlaceholder = usePlaceholder(root, bem$1A);
457
457
  const {
458
458
  linkChildren
459
459
  } = useChildren(ACTION_BAR_KEY);
@@ -462,7 +462,7 @@ var stdin_default$1N = defineComponent({
462
462
  var _a;
463
463
  return createVNode("div", {
464
464
  "ref": root,
465
- "class": [bem$1z(), {
465
+ "class": [bem$1A(), {
466
466
  "van-safe-area-bottom": props.safeAreaInsetBottom
467
467
  }]
468
468
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
@@ -475,7 +475,7 @@ var stdin_default$1N = defineComponent({
475
475
  };
476
476
  }
477
477
  });
478
- const ActionBar = withInstall(stdin_default$1N);
478
+ const ActionBar = withInstall(stdin_default$1O);
479
479
  function useExpose(apis) {
480
480
  const instance2 = getCurrentInstance();
481
481
  if (instance2) {
@@ -503,7 +503,7 @@ function useRoute() {
503
503
  const vm = getCurrentInstance().proxy;
504
504
  return () => route(vm);
505
505
  }
506
- const [name$1D, bem$1y] = createNamespace("badge");
506
+ const [name$1E, bem$1z] = createNamespace("badge");
507
507
  const badgeProps = {
508
508
  dot: Boolean,
509
509
  max: numericProp,
@@ -514,8 +514,8 @@ const badgeProps = {
514
514
  showZero: truthProp,
515
515
  position: makeStringProp("top-right")
516
516
  };
517
- var stdin_default$1M = defineComponent({
518
- name: name$1D,
517
+ var stdin_default$1N = defineComponent({
518
+ name: name$1E,
519
519
  props: badgeProps,
520
520
  setup(props, {
521
521
  slots
@@ -578,7 +578,7 @@ var stdin_default$1M = defineComponent({
578
578
  const renderBadge = () => {
579
579
  if (hasContent() || props.dot) {
580
580
  return createVNode("div", {
581
- "class": bem$1y([props.position, {
581
+ "class": bem$1z([props.position, {
582
582
  dot: props.dot,
583
583
  fixed: !!slots.default
584
584
  }]),
@@ -592,7 +592,7 @@ var stdin_default$1M = defineComponent({
592
592
  tag
593
593
  } = props;
594
594
  return createVNode(tag, {
595
- "class": bem$1y("wrapper")
595
+ "class": bem$1z("wrapper")
596
596
  }, {
597
597
  default: () => [slots.default(), renderBadge()]
598
598
  });
@@ -601,14 +601,14 @@ var stdin_default$1M = defineComponent({
601
601
  };
602
602
  }
603
603
  });
604
- const Badge = withInstall(stdin_default$1M);
604
+ const Badge = withInstall(stdin_default$1N);
605
605
  let globalZIndex = 2e3;
606
606
  const useGlobalZIndex = () => ++globalZIndex;
607
607
  const setGlobalZIndex = (val) => {
608
608
  globalZIndex = val;
609
609
  };
610
- const [name$1C, bem$1x] = createNamespace("config-provider");
611
- const CONFIG_PROVIDER_KEY = Symbol(name$1C);
610
+ const [name$1D, bem$1y] = createNamespace("config-provider");
611
+ const CONFIG_PROVIDER_KEY = Symbol(name$1D);
612
612
  const configProviderProps = {
613
613
  tag: makeStringProp("div"),
614
614
  theme: makeStringProp("light"),
@@ -625,8 +625,8 @@ function mapThemeVarsToCSSVars(themeVars) {
625
625
  });
626
626
  return cssVars;
627
627
  }
628
- var stdin_default$1L = defineComponent({
629
- name: name$1C,
628
+ var stdin_default$1M = defineComponent({
629
+ name: name$1D,
630
630
  props: configProviderProps,
631
631
  setup(props, {
632
632
  slots
@@ -658,7 +658,7 @@ var stdin_default$1L = defineComponent({
658
658
  }
659
659
  });
660
660
  return () => createVNode(props.tag, {
661
- "class": bem$1x(),
661
+ "class": bem$1y(),
662
662
  "style": style.value
663
663
  }, {
664
664
  default: () => {
@@ -668,7 +668,7 @@ var stdin_default$1L = defineComponent({
668
668
  });
669
669
  }
670
670
  });
671
- const [name$1B, bem$1w] = createNamespace("icon");
671
+ const [name$1C, bem$1x] = createNamespace("icon");
672
672
  const isImage$1 = (name2) => name2 == null ? void 0 : name2.includes("/");
673
673
  const iconProps = {
674
674
  dot: Boolean,
@@ -680,14 +680,14 @@ const iconProps = {
680
680
  badgeProps: Object,
681
681
  classPrefix: String
682
682
  };
683
- var stdin_default$1K = defineComponent({
684
- name: name$1B,
683
+ var stdin_default$1L = defineComponent({
684
+ name: name$1C,
685
685
  props: iconProps,
686
686
  setup(props, {
687
687
  slots
688
688
  }) {
689
689
  const config = inject(CONFIG_PROVIDER_KEY, null);
690
- const classPrefix = computed(() => props.classPrefix || (config == null ? void 0 : config.iconPrefix) || bem$1w());
690
+ const classPrefix = computed(() => props.classPrefix || (config == null ? void 0 : config.iconPrefix) || bem$1x());
691
691
  return () => {
692
692
  const {
693
693
  tag,
@@ -711,7 +711,7 @@ var stdin_default$1K = defineComponent({
711
711
  default: () => {
712
712
  var _a;
713
713
  return [(_a = slots.default) == null ? void 0 : _a.call(slots), isImageIcon && createVNode("img", {
714
- "class": bem$1w("image"),
714
+ "class": bem$1x("image"),
715
715
  "src": name2
716
716
  }, null)];
717
717
  }
@@ -719,13 +719,13 @@ var stdin_default$1K = defineComponent({
719
719
  };
720
720
  }
721
721
  });
722
- const Icon = withInstall(stdin_default$1K);
723
- const [name$1A, bem$1v] = createNamespace("loading");
722
+ const Icon = withInstall(stdin_default$1L);
723
+ const [name$1B, bem$1w] = createNamespace("loading");
724
724
  const SpinIcon = Array(12).fill(null).map((_, index) => createVNode("i", {
725
- "class": bem$1v("line", String(index + 1))
725
+ "class": bem$1w("line", String(index + 1))
726
726
  }, null));
727
727
  const CircularIcon = createVNode("svg", {
728
- "class": bem$1v("circular"),
728
+ "class": bem$1w("circular"),
729
729
  "viewBox": "25 25 50 50"
730
730
  }, [createVNode("circle", {
731
731
  "cx": "50",
@@ -741,8 +741,8 @@ const loadingProps = {
741
741
  textSize: numericProp,
742
742
  textColor: String
743
743
  };
744
- var stdin_default$1J = defineComponent({
745
- name: name$1A,
744
+ var stdin_default$1K = defineComponent({
745
+ name: name$1B,
746
746
  props: loadingProps,
747
747
  setup(props, {
748
748
  slots
@@ -753,7 +753,7 @@ var stdin_default$1J = defineComponent({
753
753
  const renderIcon = () => {
754
754
  const DefaultIcon = props.type === "spinner" ? SpinIcon : CircularIcon;
755
755
  return createVNode("span", {
756
- "class": bem$1v("spinner", props.type),
756
+ "class": bem$1w("spinner", props.type),
757
757
  "style": spinnerStyle.value
758
758
  }, [slots.icon ? slots.icon() : DefaultIcon]);
759
759
  };
@@ -761,7 +761,7 @@ var stdin_default$1J = defineComponent({
761
761
  var _a;
762
762
  if (slots.default) {
763
763
  return createVNode("span", {
764
- "class": bem$1v("text"),
764
+ "class": bem$1w("text"),
765
765
  "style": {
766
766
  fontSize: addUnit(props.textSize),
767
767
  color: (_a = props.textColor) != null ? _a : props.color
@@ -775,7 +775,7 @@ var stdin_default$1J = defineComponent({
775
775
  vertical
776
776
  } = props;
777
777
  return createVNode("div", {
778
- "class": bem$1v([type, {
778
+ "class": bem$1w([type, {
779
779
  vertical
780
780
  }]),
781
781
  "aria-live": "polite",
@@ -784,8 +784,8 @@ var stdin_default$1J = defineComponent({
784
784
  };
785
785
  }
786
786
  });
787
- const Loading = withInstall(stdin_default$1J);
788
- const [name$1z, bem$1u] = createNamespace("button");
787
+ const Loading = withInstall(stdin_default$1K);
788
+ const [name$1A, bem$1v] = createNamespace("button");
789
789
  const buttonProps = extend({}, routeProps, {
790
790
  tag: makeStringProp("button"),
791
791
  text: String,
@@ -807,8 +807,8 @@ const buttonProps = extend({}, routeProps, {
807
807
  loadingType: String,
808
808
  iconPosition: makeStringProp("left")
809
809
  });
810
- var stdin_default$1I = defineComponent({
811
- name: name$1z,
810
+ var stdin_default$1J = defineComponent({
811
+ name: name$1A,
812
812
  props: buttonProps,
813
813
  emits: ["click"],
814
814
  setup(props, {
@@ -823,7 +823,7 @@ var stdin_default$1I = defineComponent({
823
823
  return createVNode(Loading, {
824
824
  "size": props.loadingSize,
825
825
  "type": props.loadingType,
826
- "class": bem$1u("loading")
826
+ "class": bem$1v("loading")
827
827
  }, null);
828
828
  };
829
829
  const renderIcon = () => {
@@ -832,13 +832,13 @@ var stdin_default$1I = defineComponent({
832
832
  }
833
833
  if (slots.icon) {
834
834
  return createVNode("div", {
835
- "class": bem$1u("icon")
835
+ "class": bem$1v("icon")
836
836
  }, [slots.icon()]);
837
837
  }
838
838
  if (props.icon) {
839
839
  return createVNode(Icon, {
840
840
  "name": props.icon,
841
- "class": bem$1u("icon"),
841
+ "class": bem$1v("icon"),
842
842
  "classPrefix": props.iconPrefix
843
843
  }, null);
844
844
  }
@@ -852,7 +852,7 @@ var stdin_default$1I = defineComponent({
852
852
  }
853
853
  if (text) {
854
854
  return createVNode("span", {
855
- "class": bem$1u("text")
855
+ "class": bem$1v("text")
856
856
  }, [text]);
857
857
  }
858
858
  };
@@ -899,7 +899,7 @@ var stdin_default$1I = defineComponent({
899
899
  nativeType,
900
900
  iconPosition
901
901
  } = props;
902
- const classes = [bem$1u([type, size, {
902
+ const classes = [bem$1v([type, size, {
903
903
  plain,
904
904
  block,
905
905
  round,
@@ -918,14 +918,14 @@ var stdin_default$1I = defineComponent({
918
918
  "onClick": onClick
919
919
  }, {
920
920
  default: () => [createVNode("div", {
921
- "class": bem$1u("content")
921
+ "class": bem$1v("content")
922
922
  }, [iconPosition === "left" && renderIcon(), renderText(), iconPosition === "right" && renderIcon()])]
923
923
  });
924
924
  };
925
925
  }
926
926
  });
927
- const Button = withInstall(stdin_default$1I);
928
- const [name$1y, bem$1t] = createNamespace("action-bar-button");
927
+ const Button = withInstall(stdin_default$1J);
928
+ const [name$1z, bem$1u] = createNamespace("action-bar-button");
929
929
  const actionBarButtonProps = extend({}, routeProps, {
930
930
  type: String,
931
931
  text: String,
@@ -934,8 +934,8 @@ const actionBarButtonProps = extend({}, routeProps, {
934
934
  loading: Boolean,
935
935
  disabled: Boolean
936
936
  });
937
- var stdin_default$1H = defineComponent({
938
- name: name$1y,
937
+ var stdin_default$1I = defineComponent({
938
+ name: name$1z,
939
939
  props: actionBarButtonProps,
940
940
  setup(props, {
941
941
  slots
@@ -970,7 +970,7 @@ var stdin_default$1H = defineComponent({
970
970
  disabled
971
971
  } = props;
972
972
  return createVNode(Button, {
973
- "class": bem$1t([type, {
973
+ "class": bem$1u([type, {
974
974
  last: isLast.value,
975
975
  first: isFirst.value
976
976
  }]),
@@ -987,8 +987,8 @@ var stdin_default$1H = defineComponent({
987
987
  };
988
988
  }
989
989
  });
990
- const ActionBarButton = withInstall(stdin_default$1H);
991
- const [name$1x, bem$1s] = createNamespace("action-bar-icon");
990
+ const ActionBarButton = withInstall(stdin_default$1I);
991
+ const [name$1y, bem$1t] = createNamespace("action-bar-icon");
992
992
  const actionBarIconProps = extend({}, routeProps, {
993
993
  dot: Boolean,
994
994
  text: String,
@@ -999,8 +999,8 @@ const actionBarIconProps = extend({}, routeProps, {
999
999
  badgeProps: Object,
1000
1000
  iconPrefix: String
1001
1001
  });
1002
- var stdin_default$1G = defineComponent({
1003
- name: name$1x,
1002
+ var stdin_default$1H = defineComponent({
1003
+ name: name$1y,
1004
1004
  props: actionBarIconProps,
1005
1005
  setup(props, {
1006
1006
  slots
@@ -1020,7 +1020,7 @@ var stdin_default$1G = defineComponent({
1020
1020
  if (slots.icon) {
1021
1021
  return createVNode(Badge, mergeProps({
1022
1022
  "dot": dot,
1023
- "class": bem$1s("icon"),
1023
+ "class": bem$1t("icon"),
1024
1024
  "content": badge
1025
1025
  }, badgeProps2), {
1026
1026
  default: slots.icon
@@ -1032,20 +1032,20 @@ var stdin_default$1G = defineComponent({
1032
1032
  "name": icon,
1033
1033
  "badge": badge,
1034
1034
  "color": color,
1035
- "class": [bem$1s("icon"), iconClass],
1035
+ "class": [bem$1t("icon"), iconClass],
1036
1036
  "badgeProps": badgeProps2,
1037
1037
  "classPrefix": iconPrefix
1038
1038
  }, null);
1039
1039
  };
1040
1040
  return () => createVNode("div", {
1041
1041
  "role": "button",
1042
- "class": bem$1s(),
1042
+ "class": bem$1t(),
1043
1043
  "tabindex": 0,
1044
1044
  "onClick": route2
1045
1045
  }, [renderIcon(), slots.default ? slots.default() : props.text]);
1046
1046
  }
1047
1047
  });
1048
- const ActionBarIcon = withInstall(stdin_default$1G);
1048
+ const ActionBarIcon = withInstall(stdin_default$1H);
1049
1049
  const popupSharedProps = {
1050
1050
  // whether to show popup
1051
1051
  show: Boolean,
@@ -1196,7 +1196,7 @@ function useLazyRender(show) {
1196
1196
  );
1197
1197
  return (render) => () => inited.value ? render() : null;
1198
1198
  }
1199
- const [name$1w, bem$1r] = createNamespace("overlay");
1199
+ const [name$1x, bem$1s] = createNamespace("overlay");
1200
1200
  const overlayProps = {
1201
1201
  show: Boolean,
1202
1202
  zIndex: numericProp,
@@ -1206,8 +1206,8 @@ const overlayProps = {
1206
1206
  lazyRender: truthProp,
1207
1207
  customStyle: Object
1208
1208
  };
1209
- var stdin_default$1F = defineComponent({
1210
- name: name$1w,
1209
+ var stdin_default$1G = defineComponent({
1210
+ name: name$1x,
1211
1211
  props: overlayProps,
1212
1212
  setup(props, {
1213
1213
  slots
@@ -1228,7 +1228,7 @@ var stdin_default$1F = defineComponent({
1228
1228
  return withDirectives(createVNode("div", {
1229
1229
  "ref": root,
1230
1230
  "style": style,
1231
- "class": [bem$1r(), props.className]
1231
+ "class": [bem$1s(), props.className]
1232
1232
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vShow, props.show]]);
1233
1233
  });
1234
1234
  useEventListener("touchmove", onTouchMove, {
@@ -1242,7 +1242,7 @@ var stdin_default$1F = defineComponent({
1242
1242
  });
1243
1243
  }
1244
1244
  });
1245
- const Overlay = withInstall(stdin_default$1F);
1245
+ const Overlay = withInstall(stdin_default$1G);
1246
1246
  const popupProps$2 = extend({}, popupSharedProps, {
1247
1247
  round: Boolean,
1248
1248
  position: makeStringProp("center"),
@@ -1255,9 +1255,9 @@ const popupProps$2 = extend({}, popupSharedProps, {
1255
1255
  safeAreaInsetTop: Boolean,
1256
1256
  safeAreaInsetBottom: Boolean
1257
1257
  });
1258
- const [name$1v, bem$1q] = createNamespace("popup");
1259
- var stdin_default$1E = defineComponent({
1260
- name: name$1v,
1258
+ const [name$1w, bem$1r] = createNamespace("popup");
1259
+ var stdin_default$1F = defineComponent({
1260
+ name: name$1w,
1261
1261
  inheritAttrs: false,
1262
1262
  props: popupProps$2,
1263
1263
  emits: ["open", "close", "opened", "closed", "keydown", "update:show", "clickOverlay", "clickCloseIcon"],
@@ -1331,7 +1331,7 @@ var stdin_default$1E = defineComponent({
1331
1331
  "role": "button",
1332
1332
  "tabindex": 0,
1333
1333
  "name": props.closeIcon,
1334
- "class": [bem$1q("close-icon", props.closeIconPosition), HAPTICS_FEEDBACK],
1334
+ "class": [bem$1r("close-icon", props.closeIconPosition), HAPTICS_FEEDBACK],
1335
1335
  "classPrefix": props.iconPrefix,
1336
1336
  "onClick": onClickCloseIcon
1337
1337
  }, null);
@@ -1353,7 +1353,7 @@ var stdin_default$1E = defineComponent({
1353
1353
  "style": style.value,
1354
1354
  "role": "dialog",
1355
1355
  "tabindex": 0,
1356
- "class": [bem$1q({
1356
+ "class": [bem$1r({
1357
1357
  round,
1358
1358
  [position]: position
1359
1359
  }), {
@@ -1434,8 +1434,8 @@ var stdin_default$1E = defineComponent({
1434
1434
  };
1435
1435
  }
1436
1436
  });
1437
- const Popup = withInstall(stdin_default$1E);
1438
- const [name$1u, bem$1p] = createNamespace("action-sheet");
1437
+ const Popup = withInstall(stdin_default$1F);
1438
+ const [name$1v, bem$1q] = createNamespace("action-sheet");
1439
1439
  const actionSheetProps = extend({}, popupSharedProps, {
1440
1440
  title: String,
1441
1441
  round: truthProp,
@@ -1449,8 +1449,8 @@ const actionSheetProps = extend({}, popupSharedProps, {
1449
1449
  safeAreaInsetBottom: truthProp
1450
1450
  });
1451
1451
  const popupInheritKeys$2 = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
1452
- var stdin_default$1D = defineComponent({
1453
- name: name$1u,
1452
+ var stdin_default$1E = defineComponent({
1453
+ name: name$1v,
1454
1454
  props: actionSheetProps,
1455
1455
  emits: ["select", "cancel", "update:show"],
1456
1456
  setup(props, {
@@ -1465,10 +1465,10 @@ var stdin_default$1D = defineComponent({
1465
1465
  const renderHeader = () => {
1466
1466
  if (props.title) {
1467
1467
  return createVNode("div", {
1468
- "class": bem$1p("header")
1468
+ "class": bem$1q("header")
1469
1469
  }, [props.title, props.closeable && createVNode(Icon, {
1470
1470
  "name": props.closeIcon,
1471
- "class": [bem$1p("close"), HAPTICS_FEEDBACK],
1471
+ "class": [bem$1q("close"), HAPTICS_FEEDBACK],
1472
1472
  "onClick": onCancel
1473
1473
  }, null)]);
1474
1474
  }
@@ -1476,10 +1476,10 @@ var stdin_default$1D = defineComponent({
1476
1476
  const renderCancel = () => {
1477
1477
  if (slots.cancel || props.cancelText) {
1478
1478
  return [createVNode("div", {
1479
- "class": bem$1p("gap")
1479
+ "class": bem$1q("gap")
1480
1480
  }, null), createVNode("button", {
1481
1481
  "type": "button",
1482
- "class": bem$1p("cancel"),
1482
+ "class": bem$1q("cancel"),
1483
1483
  "onClick": onCancel
1484
1484
  }, [slots.cancel ? slots.cancel() : props.cancelText])];
1485
1485
  }
@@ -1487,7 +1487,7 @@ var stdin_default$1D = defineComponent({
1487
1487
  const renderActionContent = (action, index) => {
1488
1488
  if (action.loading) {
1489
1489
  return createVNode(Loading, {
1490
- "class": bem$1p("loading-icon")
1490
+ "class": bem$1q("loading-icon")
1491
1491
  }, null);
1492
1492
  }
1493
1493
  if (slots.action) {
@@ -1497,9 +1497,9 @@ var stdin_default$1D = defineComponent({
1497
1497
  });
1498
1498
  }
1499
1499
  return [createVNode("span", {
1500
- "class": bem$1p("name")
1500
+ "class": bem$1q("name")
1501
1501
  }, [action.name]), action.subname && createVNode("div", {
1502
- "class": bem$1p("subname")
1502
+ "class": bem$1q("subname")
1503
1503
  }, [action.subname])];
1504
1504
  };
1505
1505
  const renderAction = (action, index) => {
@@ -1527,7 +1527,7 @@ var stdin_default$1D = defineComponent({
1527
1527
  "style": {
1528
1528
  color
1529
1529
  },
1530
- "class": [bem$1p("item", {
1530
+ "class": [bem$1q("item", {
1531
1531
  loading,
1532
1532
  disabled
1533
1533
  }), className],
@@ -1538,26 +1538,26 @@ var stdin_default$1D = defineComponent({
1538
1538
  if (props.description || slots.description) {
1539
1539
  const content = slots.description ? slots.description() : props.description;
1540
1540
  return createVNode("div", {
1541
- "class": bem$1p("description")
1541
+ "class": bem$1q("description")
1542
1542
  }, [content]);
1543
1543
  }
1544
1544
  };
1545
1545
  return () => createVNode(Popup, mergeProps({
1546
- "class": bem$1p(),
1546
+ "class": bem$1q(),
1547
1547
  "position": "bottom",
1548
1548
  "onUpdate:show": updateShow
1549
1549
  }, pick(props, popupInheritKeys$2)), {
1550
1550
  default: () => {
1551
1551
  var _a;
1552
1552
  return [renderHeader(), renderDescription(), createVNode("div", {
1553
- "class": bem$1p("content")
1553
+ "class": bem$1q("content")
1554
1554
  }, [props.actions.map(renderAction), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderCancel()];
1555
1555
  }
1556
1556
  });
1557
1557
  }
1558
1558
  });
1559
- const ActionSheet = withInstall(stdin_default$1D);
1560
- const [name$1t, bem$1o, t$k] = createNamespace("picker");
1559
+ const ActionSheet = withInstall(stdin_default$1E);
1560
+ const [name$1u, bem$1p, t$k] = createNamespace("picker");
1561
1561
  const getFirstEnabledOption = (options) => options.find((option) => !option.disabled) || options[0];
1562
1562
  function getColumnsType(columns, fields) {
1563
1563
  const firstColumn = columns[0];
@@ -1626,10 +1626,10 @@ function assignDefaultFields(fields) {
1626
1626
  const DEFAULT_DURATION = 200;
1627
1627
  const MOMENTUM_TIME = 300;
1628
1628
  const MOMENTUM_DISTANCE = 15;
1629
- const [name$1s, bem$1n] = createNamespace("picker-column");
1630
- const PICKER_KEY = Symbol(name$1s);
1631
- var stdin_default$1C = defineComponent({
1632
- name: name$1s,
1629
+ const [name$1t, bem$1o] = createNamespace("picker-column");
1630
+ const PICKER_KEY = Symbol(name$1t);
1631
+ var stdin_default$1D = defineComponent({
1632
+ name: name$1t,
1633
1633
  props: {
1634
1634
  value: numericProp,
1635
1635
  fields: makeRequiredProp(Object),
@@ -1768,7 +1768,7 @@ var stdin_default$1C = defineComponent({
1768
1768
  role: "button",
1769
1769
  style: optionStyle,
1770
1770
  tabindex: disabled ? -1 : 0,
1771
- class: [bem$1n("item", {
1771
+ class: [bem$1o("item", {
1772
1772
  disabled,
1773
1773
  selected: value === props.value
1774
1774
  }), option.className],
@@ -1796,7 +1796,7 @@ var stdin_default$1C = defineComponent({
1796
1796
  });
1797
1797
  return () => createVNode("div", {
1798
1798
  "ref": root,
1799
- "class": bem$1n(),
1799
+ "class": bem$1o(),
1800
1800
  "onTouchstartPassive": onTouchStart,
1801
1801
  "onTouchend": onTouchEnd,
1802
1802
  "onTouchcancel": onTouchEnd
@@ -1807,12 +1807,12 @@ var stdin_default$1C = defineComponent({
1807
1807
  transitionDuration: `${currentDuration.value}ms`,
1808
1808
  transitionProperty: currentDuration.value ? "all" : "none"
1809
1809
  },
1810
- "class": bem$1n("wrapper"),
1810
+ "class": bem$1o("wrapper"),
1811
1811
  "onTransitionend": stopMomentum
1812
1812
  }, [renderOptions()])]);
1813
1813
  }
1814
1814
  });
1815
- const [name$1r] = createNamespace("picker-toolbar");
1815
+ const [name$1s] = createNamespace("picker-toolbar");
1816
1816
  const pickerToolbarProps = {
1817
1817
  title: String,
1818
1818
  cancelButtonText: String,
@@ -1820,8 +1820,8 @@ const pickerToolbarProps = {
1820
1820
  };
1821
1821
  const pickerToolbarSlots = ["cancel", "confirm", "title", "toolbar"];
1822
1822
  const pickerToolbarPropKeys = Object.keys(pickerToolbarProps);
1823
- var stdin_default$1B = defineComponent({
1824
- name: name$1r,
1823
+ var stdin_default$1C = defineComponent({
1824
+ name: name$1s,
1825
1825
  props: pickerToolbarProps,
1826
1826
  emits: ["confirm", "cancel"],
1827
1827
  setup(props, {
@@ -1834,7 +1834,7 @@ var stdin_default$1B = defineComponent({
1834
1834
  }
1835
1835
  if (props.title) {
1836
1836
  return createVNode("div", {
1837
- "class": [bem$1o("title"), "van-ellipsis"]
1837
+ "class": [bem$1p("title"), "van-ellipsis"]
1838
1838
  }, [props.title]);
1839
1839
  }
1840
1840
  };
@@ -1844,7 +1844,7 @@ var stdin_default$1B = defineComponent({
1844
1844
  const text = props.cancelButtonText || t$k("cancel");
1845
1845
  return createVNode("button", {
1846
1846
  "type": "button",
1847
- "class": [bem$1o("cancel"), HAPTICS_FEEDBACK],
1847
+ "class": [bem$1p("cancel"), HAPTICS_FEEDBACK],
1848
1848
  "onClick": onCancel
1849
1849
  }, [slots.cancel ? slots.cancel() : text]);
1850
1850
  };
@@ -1852,32 +1852,55 @@ var stdin_default$1B = defineComponent({
1852
1852
  const text = props.confirmButtonText || t$k("confirm");
1853
1853
  return createVNode("button", {
1854
1854
  "type": "button",
1855
- "class": [bem$1o("confirm"), HAPTICS_FEEDBACK],
1855
+ "class": [bem$1p("confirm"), HAPTICS_FEEDBACK],
1856
1856
  "onClick": onConfirm
1857
1857
  }, [slots.confirm ? slots.confirm() : text]);
1858
1858
  };
1859
1859
  return () => createVNode("div", {
1860
- "class": bem$1o("toolbar")
1860
+ "class": bem$1p("toolbar")
1861
1861
  }, [slots.toolbar ? slots.toolbar() : [renderCancel(), renderTitle(), renderConfirm()]]);
1862
1862
  }
1863
1863
  });
1864
+ const useSyncPropRef = (getProp, setProp) => {
1865
+ const propRef = ref(getProp());
1866
+ watch(getProp, (value) => {
1867
+ if (value !== propRef.value) {
1868
+ propRef.value = value;
1869
+ }
1870
+ });
1871
+ watch(propRef, (value) => {
1872
+ if (value !== getProp()) {
1873
+ setProp(value);
1874
+ }
1875
+ });
1876
+ return propRef;
1877
+ };
1864
1878
  function scrollLeftTo(scroller, to, duration) {
1879
+ let rafId;
1865
1880
  let count = 0;
1866
1881
  const from = scroller.scrollLeft;
1867
1882
  const frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
1883
+ function cancel() {
1884
+ cancelRaf(rafId);
1885
+ }
1868
1886
  function animate() {
1869
1887
  scroller.scrollLeft += (to - from) / frames;
1870
1888
  if (++count < frames) {
1871
- raf(animate);
1889
+ rafId = raf(animate);
1872
1890
  }
1873
1891
  }
1874
1892
  animate();
1893
+ return cancel;
1875
1894
  }
1876
1895
  function scrollTopTo(scroller, to, duration, callback) {
1896
+ let rafId;
1877
1897
  let current2 = getScrollTop(scroller);
1878
1898
  const isDown = current2 < to;
1879
1899
  const frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
1880
1900
  const step = (to - current2) / frames;
1901
+ function cancel() {
1902
+ cancelRaf(rafId);
1903
+ }
1881
1904
  function animate() {
1882
1905
  current2 += step;
1883
1906
  if (isDown && current2 > to || !isDown && current2 < to) {
@@ -1885,12 +1908,13 @@ function scrollTopTo(scroller, to, duration, callback) {
1885
1908
  }
1886
1909
  setScrollTop(scroller, current2);
1887
1910
  if (isDown && current2 < to || !isDown && current2 > to) {
1888
- raf(animate);
1911
+ rafId = raf(animate);
1889
1912
  } else if (callback) {
1890
- raf(callback);
1913
+ rafId = raf(callback);
1891
1914
  }
1892
1915
  }
1893
1916
  animate();
1917
+ return cancel;
1894
1918
  }
1895
1919
  let current = 0;
1896
1920
  function useId() {
@@ -1941,7 +1965,7 @@ function useVisibilityChange(target, onChange) {
1941
1965
  onBeforeUnmount(unobserve);
1942
1966
  onMountedOrActivated(observe);
1943
1967
  }
1944
- const [name$1q, bem$1m] = createNamespace("sticky");
1968
+ const [name$1r, bem$1n] = createNamespace("sticky");
1945
1969
  const stickyProps = {
1946
1970
  zIndex: numericProp,
1947
1971
  position: makeStringProp("top"),
@@ -1949,8 +1973,8 @@ const stickyProps = {
1949
1973
  offsetTop: makeNumericProp(0),
1950
1974
  offsetBottom: makeNumericProp(0)
1951
1975
  };
1952
- var stdin_default$1A = defineComponent({
1953
- name: name$1q,
1976
+ var stdin_default$1B = defineComponent({
1977
+ name: name$1r,
1954
1978
  props: stickyProps,
1955
1979
  emits: ["scroll", "change"],
1956
1980
  setup(props, {
@@ -2063,7 +2087,7 @@ var stdin_default$1A = defineComponent({
2063
2087
  "ref": root,
2064
2088
  "style": rootStyle.value
2065
2089
  }, [createVNode("div", {
2066
- "class": bem$1m({
2090
+ "class": bem$1n({
2067
2091
  fixed: state.fixed && !isReset.value
2068
2092
  }),
2069
2093
  "style": stickyStyle.value
@@ -2071,8 +2095,8 @@ var stdin_default$1A = defineComponent({
2071
2095
  };
2072
2096
  }
2073
2097
  });
2074
- const Sticky = withInstall(stdin_default$1A);
2075
- const [name$1p, bem$1l] = createNamespace("swipe");
2098
+ const Sticky = withInstall(stdin_default$1B);
2099
+ const [name$1q, bem$1m] = createNamespace("swipe");
2076
2100
  const swipeProps = {
2077
2101
  loop: truthProp,
2078
2102
  width: numericProp,
@@ -2087,9 +2111,9 @@ const swipeProps = {
2087
2111
  showIndicators: truthProp,
2088
2112
  stopPropagation: truthProp
2089
2113
  };
2090
- const SWIPE_KEY = Symbol(name$1p);
2091
- var stdin_default$1z = defineComponent({
2092
- name: name$1p,
2114
+ const SWIPE_KEY = Symbol(name$1q);
2115
+ var stdin_default$1A = defineComponent({
2116
+ name: name$1q,
2093
2117
  props: swipeProps,
2094
2118
  emits: ["change", "dragStart", "dragEnd"],
2095
2119
  setup(props, {
@@ -2367,7 +2391,7 @@ var stdin_default$1z = defineComponent({
2367
2391
  } : void 0;
2368
2392
  return createVNode("i", {
2369
2393
  "style": style,
2370
- "class": bem$1l("indicator", {
2394
+ "class": bem$1m("indicator", {
2371
2395
  active
2372
2396
  })
2373
2397
  }, null);
@@ -2381,7 +2405,7 @@ var stdin_default$1z = defineComponent({
2381
2405
  }
2382
2406
  if (props.showIndicators && count.value > 1) {
2383
2407
  return createVNode("div", {
2384
- "class": bem$1l("indicators", {
2408
+ "class": bem$1m("indicators", {
2385
2409
  vertical: props.vertical
2386
2410
  })
2387
2411
  }, [Array(count.value).fill("").map(renderDot)]);
@@ -2423,11 +2447,11 @@ var stdin_default$1z = defineComponent({
2423
2447
  var _a;
2424
2448
  return createVNode("div", {
2425
2449
  "ref": root,
2426
- "class": bem$1l()
2450
+ "class": bem$1m()
2427
2451
  }, [createVNode("div", {
2428
2452
  "ref": track,
2429
2453
  "style": trackStyle.value,
2430
- "class": bem$1l("track", {
2454
+ "class": bem$1m("track", {
2431
2455
  vertical: props.vertical
2432
2456
  }),
2433
2457
  "onTouchstartPassive": onTouchStart,
@@ -2437,10 +2461,10 @@ var stdin_default$1z = defineComponent({
2437
2461
  };
2438
2462
  }
2439
2463
  });
2440
- const Swipe = withInstall(stdin_default$1z);
2441
- const [name$1o, bem$1k] = createNamespace("tabs");
2442
- var stdin_default$1y = defineComponent({
2443
- name: name$1o,
2464
+ const Swipe = withInstall(stdin_default$1A);
2465
+ const [name$1p, bem$1l] = createNamespace("tabs");
2466
+ var stdin_default$1z = defineComponent({
2467
+ name: name$1p,
2444
2468
  props: {
2445
2469
  count: makeRequiredProp(Number),
2446
2470
  inited: Boolean,
@@ -2464,7 +2488,7 @@ var stdin_default$1y = defineComponent({
2464
2488
  return createVNode(Swipe, {
2465
2489
  "ref": swipeRef,
2466
2490
  "loop": false,
2467
- "class": bem$1k("track"),
2491
+ "class": bem$1l("track"),
2468
2492
  "duration": +props.duration * 1e3,
2469
2493
  "touchable": props.swipeable,
2470
2494
  "lazyRender": props.lazyRender,
@@ -2492,13 +2516,13 @@ var stdin_default$1y = defineComponent({
2492
2516
  swipeRef
2493
2517
  });
2494
2518
  return () => createVNode("div", {
2495
- "class": bem$1k("content", {
2519
+ "class": bem$1l("content", {
2496
2520
  animated: props.animated || props.swipeable
2497
2521
  })
2498
2522
  }, [renderChildren()]);
2499
2523
  }
2500
2524
  });
2501
- const [name$1n, bem$1j] = createNamespace("tabs");
2525
+ const [name$1o, bem$1k] = createNamespace("tabs");
2502
2526
  const tabsProps = {
2503
2527
  type: makeStringProp("line"),
2504
2528
  color: String,
@@ -2521,9 +2545,9 @@ const tabsProps = {
2521
2545
  titleActiveColor: String,
2522
2546
  titleInactiveColor: String
2523
2547
  };
2524
- const TABS_KEY = Symbol(name$1n);
2525
- var stdin_default$1x = defineComponent({
2526
- name: name$1n,
2548
+ const TABS_KEY = Symbol(name$1o);
2549
+ var stdin_default$1y = defineComponent({
2550
+ name: name$1o,
2527
2551
  props: tabsProps,
2528
2552
  emits: ["change", "scroll", "rendered", "clickTab", "update:active"],
2529
2553
  setup(props, {
@@ -2533,6 +2557,8 @@ var stdin_default$1x = defineComponent({
2533
2557
  let tabHeight;
2534
2558
  let lockScroll;
2535
2559
  let stickyFixed;
2560
+ let cancelScrollLeftToRaf;
2561
+ let cancelScrollTopToRaf;
2536
2562
  const root = ref();
2537
2563
  const navRef = ref();
2538
2564
  const wrapRef = ref();
@@ -2580,7 +2606,9 @@ var stdin_default$1x = defineComponent({
2580
2606
  }
2581
2607
  const title = titles[state.currentIndex].$el;
2582
2608
  const to = title.offsetLeft - (nav.offsetWidth - title.offsetWidth) / 2;
2583
- scrollLeftTo(nav, to, immediate ? 0 : +props.duration);
2609
+ if (cancelScrollLeftToRaf)
2610
+ cancelScrollLeftToRaf();
2611
+ cancelScrollLeftToRaf = scrollLeftTo(nav, to, immediate ? 0 : +props.duration);
2584
2612
  };
2585
2613
  const setLine = () => {
2586
2614
  const shouldAnimate = state.inited;
@@ -2656,7 +2684,9 @@ var stdin_default$1x = defineComponent({
2656
2684
  if (target && scroller.value) {
2657
2685
  const to = getElementTop(target, scroller.value) - scrollOffset.value;
2658
2686
  lockScroll = true;
2659
- scrollTopTo(scroller.value, to, immediate ? 0 : +props.duration, () => {
2687
+ if (cancelScrollTopToRaf)
2688
+ cancelScrollTopToRaf();
2689
+ cancelScrollTopToRaf = scrollTopTo(scroller.value, to, immediate ? 0 : +props.duration, () => {
2660
2690
  lockScroll = false;
2661
2691
  });
2662
2692
  }
@@ -2715,7 +2745,7 @@ var stdin_default$1x = defineComponent({
2715
2745
  const renderLine = () => {
2716
2746
  if (props.type === "line" && children.length) {
2717
2747
  return createVNode("div", {
2718
- "class": bem$1j("line"),
2748
+ "class": bem$1k("line"),
2719
2749
  "style": state.lineStyle
2720
2750
  }, null);
2721
2751
  }
@@ -2729,13 +2759,13 @@ var stdin_default$1x = defineComponent({
2729
2759
  } = props;
2730
2760
  const Header = [createVNode("div", {
2731
2761
  "ref": sticky ? void 0 : wrapRef,
2732
- "class": [bem$1j("wrap"), {
2762
+ "class": [bem$1k("wrap"), {
2733
2763
  [BORDER_TOP_BOTTOM]: type === "line" && border
2734
2764
  }]
2735
2765
  }, [createVNode("div", {
2736
2766
  "ref": navRef,
2737
2767
  "role": "tablist",
2738
- "class": bem$1j("nav", [type, {
2768
+ "class": bem$1k("nav", [type, {
2739
2769
  shrink: props.shrink,
2740
2770
  complete: scrollable.value
2741
2771
  }]),
@@ -2808,14 +2838,14 @@ var stdin_default$1x = defineComponent({
2808
2838
  });
2809
2839
  return () => createVNode("div", {
2810
2840
  "ref": root,
2811
- "class": bem$1j([props.type])
2841
+ "class": bem$1k([props.type])
2812
2842
  }, [props.sticky ? createVNode(Sticky, {
2813
2843
  "container": root.value,
2814
2844
  "offsetTop": offsetTopPx.value,
2815
2845
  "onScroll": onStickyScroll
2816
2846
  }, {
2817
2847
  default: () => [renderHeader()]
2818
- }) : renderHeader(), createVNode(stdin_default$1y, {
2848
+ }) : renderHeader(), createVNode(stdin_default$1z, {
2819
2849
  "ref": contentRef,
2820
2850
  "count": children.length,
2821
2851
  "inited": state.inited,
@@ -2835,9 +2865,9 @@ var stdin_default$1x = defineComponent({
2835
2865
  });
2836
2866
  const TAB_STATUS_KEY = Symbol();
2837
2867
  const useTabStatus = () => inject(TAB_STATUS_KEY, null);
2838
- const [name$1m, bem$1i] = createNamespace("tab");
2868
+ const [name$1n, bem$1j] = createNamespace("tab");
2839
2869
  const TabTitle = defineComponent({
2840
- name: name$1m,
2870
+ name: name$1n,
2841
2871
  props: {
2842
2872
  id: String,
2843
2873
  dot: Boolean,
@@ -2886,7 +2916,7 @@ const TabTitle = defineComponent({
2886
2916
  });
2887
2917
  const renderText = () => {
2888
2918
  const Text2 = createVNode("span", {
2889
- "class": bem$1i("text", {
2919
+ "class": bem$1j("text", {
2890
2920
  ellipsis: !props.scrollable
2891
2921
  })
2892
2922
  }, [slots.title ? slots.title() : props.title]);
@@ -2904,7 +2934,7 @@ const TabTitle = defineComponent({
2904
2934
  return () => createVNode("div", {
2905
2935
  "id": props.id,
2906
2936
  "role": "tab",
2907
- "class": [bem$1i([props.type, {
2937
+ "class": [bem$1j([props.type, {
2908
2938
  grow: props.scrollable && !props.shrink,
2909
2939
  shrink: props.shrink,
2910
2940
  active: props.isActive,
@@ -2918,9 +2948,9 @@ const TabTitle = defineComponent({
2918
2948
  }, [renderText()]);
2919
2949
  }
2920
2950
  });
2921
- const [name$1l, bem$1h] = createNamespace("swipe-item");
2922
- var stdin_default$1w = defineComponent({
2923
- name: name$1l,
2951
+ const [name$1m, bem$1i] = createNamespace("swipe-item");
2952
+ var stdin_default$1x = defineComponent({
2953
+ name: name$1m,
2924
2954
  setup(props, {
2925
2955
  slots
2926
2956
  }) {
@@ -2985,14 +3015,14 @@ var stdin_default$1w = defineComponent({
2985
3015
  return () => {
2986
3016
  var _a;
2987
3017
  return createVNode("div", {
2988
- "class": bem$1h(),
3018
+ "class": bem$1i(),
2989
3019
  "style": style.value
2990
3020
  }, [shouldRender.value ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null]);
2991
3021
  };
2992
3022
  }
2993
3023
  });
2994
- const SwipeItem = withInstall(stdin_default$1w);
2995
- const [name$1k, bem$1g] = createNamespace("tab");
3024
+ const SwipeItem = withInstall(stdin_default$1x);
3025
+ const [name$1l, bem$1h] = createNamespace("tab");
2996
3026
  const tabProps = extend({}, routeProps, {
2997
3027
  dot: Boolean,
2998
3028
  name: numericProp,
@@ -3003,8 +3033,8 @@ const tabProps = extend({}, routeProps, {
3003
3033
  titleStyle: [String, Object],
3004
3034
  showZeroBadge: truthProp
3005
3035
  });
3006
- var stdin_default$1v = defineComponent({
3007
- name: name$1k,
3036
+ var stdin_default$1w = defineComponent({
3037
+ name: name$1l,
3008
3038
  props: tabProps,
3009
3039
  setup(props, {
3010
3040
  slots
@@ -3092,7 +3122,7 @@ var stdin_default$1v = defineComponent({
3092
3122
  return createVNode(SwipeItem, {
3093
3123
  "id": id,
3094
3124
  "role": "tabpanel",
3095
- "class": bem$1g("panel-wrapper", {
3125
+ "class": bem$1h("panel-wrapper", {
3096
3126
  inactive: hasInactiveClass.value
3097
3127
  }),
3098
3128
  "tabindex": active.value ? 0 : -1,
@@ -3102,7 +3132,7 @@ var stdin_default$1v = defineComponent({
3102
3132
  default: () => {
3103
3133
  var _a2;
3104
3134
  return [createVNode("div", {
3105
- "class": bem$1g("panel")
3135
+ "class": bem$1h("panel")
3106
3136
  }, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)])];
3107
3137
  }
3108
3138
  });
@@ -3112,39 +3142,40 @@ var stdin_default$1v = defineComponent({
3112
3142
  return withDirectives(createVNode("div", {
3113
3143
  "id": id,
3114
3144
  "role": "tabpanel",
3115
- "class": bem$1g("panel"),
3145
+ "class": bem$1h("panel"),
3116
3146
  "tabindex": show ? 0 : -1,
3117
3147
  "aria-labelledby": label
3118
3148
  }, [Content]), [[vShow, show]]);
3119
3149
  };
3120
3150
  }
3121
3151
  });
3122
- const Tab = withInstall(stdin_default$1v);
3123
- const Tabs = withInstall(stdin_default$1x);
3124
- const [name$1j, bem$1f] = createNamespace("picker-group");
3125
- const PICKER_GROUP_KEY = Symbol(name$1j);
3152
+ const Tab = withInstall(stdin_default$1w);
3153
+ const Tabs = withInstall(stdin_default$1y);
3154
+ const [name$1k, bem$1g] = createNamespace("picker-group");
3155
+ const PICKER_GROUP_KEY = Symbol(name$1k);
3126
3156
  const pickerGroupProps = extend({
3127
3157
  tabs: makeArrayProp(),
3158
+ activeTab: makeNumericProp(0),
3128
3159
  nextStepText: String
3129
3160
  }, pickerToolbarProps);
3130
- var stdin_default$1u = defineComponent({
3131
- name: name$1j,
3161
+ var stdin_default$1v = defineComponent({
3162
+ name: name$1k,
3132
3163
  props: pickerGroupProps,
3133
- emits: ["confirm", "cancel"],
3164
+ emits: ["confirm", "cancel", "update:activeTab"],
3134
3165
  setup(props, {
3135
3166
  emit,
3136
3167
  slots
3137
3168
  }) {
3138
- const activeTab = ref(0);
3169
+ const activeTab = useSyncPropRef(() => props.activeTab, (value) => emit("update:activeTab", value));
3139
3170
  const {
3140
3171
  children,
3141
3172
  linkChildren
3142
3173
  } = useChildren(PICKER_GROUP_KEY);
3143
3174
  linkChildren();
3144
- const showNextButton = () => activeTab.value < props.tabs.length - 1 && props.nextStepText;
3175
+ const showNextButton = () => +activeTab.value < props.tabs.length - 1 && props.nextStepText;
3145
3176
  const onConfirm = () => {
3146
3177
  if (showNextButton()) {
3147
- activeTab.value++;
3178
+ activeTab.value = +activeTab.value + 1;
3148
3179
  } else {
3149
3180
  emit("confirm", children.map((item) => item.confirm()));
3150
3181
  }
@@ -3155,8 +3186,8 @@ var stdin_default$1u = defineComponent({
3155
3186
  const childNodes = (_a = slots.default) == null ? void 0 : _a.call(slots);
3156
3187
  const confirmButtonText = showNextButton() ? props.nextStepText : props.confirmButtonText;
3157
3188
  return createVNode("div", {
3158
- "class": bem$1f()
3159
- }, [createVNode(stdin_default$1B, {
3189
+ "class": bem$1g()
3190
+ }, [createVNode(stdin_default$1C, {
3160
3191
  "title": props.title,
3161
3192
  "cancelButtonText": props.cancelButtonText,
3162
3193
  "confirmButtonText": confirmButtonText,
@@ -3165,14 +3196,14 @@ var stdin_default$1u = defineComponent({
3165
3196
  }, pick(slots, pickerToolbarSlots)), createVNode(Tabs, {
3166
3197
  "active": activeTab.value,
3167
3198
  "onUpdate:active": ($event) => activeTab.value = $event,
3168
- "class": bem$1f("tabs"),
3199
+ "class": bem$1g("tabs"),
3169
3200
  "shrink": true,
3170
3201
  "animated": true,
3171
3202
  "lazyRender": false
3172
3203
  }, {
3173
3204
  default: () => [props.tabs.map((title, index) => createVNode(Tab, {
3174
3205
  "title": title,
3175
- "titleClass": bem$1f("tab-title")
3206
+ "titleClass": bem$1g("tab-title")
3176
3207
  }, {
3177
3208
  default: () => [childNodes == null ? void 0 : childNodes[index]]
3178
3209
  }))]
@@ -3195,8 +3226,8 @@ const pickerProps = extend({}, pickerSharedProps, {
3195
3226
  toolbarPosition: makeStringProp("top"),
3196
3227
  columnsFieldNames: Object
3197
3228
  });
3198
- var stdin_default$1t = defineComponent({
3199
- name: name$1t,
3229
+ var stdin_default$1u = defineComponent({
3230
+ name: name$1u,
3200
3231
  props: pickerProps,
3201
3232
  emits: ["confirm", "cancel", "change", "scrollInto", "clickOption", "update:modelValue"],
3202
3233
  setup(props, {
@@ -3277,7 +3308,7 @@ var stdin_default$1t = defineComponent({
3277
3308
  return params;
3278
3309
  };
3279
3310
  const cancel = () => emit("cancel", getEventParams());
3280
- const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => createVNode(stdin_default$1C, {
3311
+ const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => createVNode(stdin_default$1D, {
3281
3312
  "value": selectedValues.value[columnIndex],
3282
3313
  "fields": fields.value,
3283
3314
  "options": options,
@@ -3306,10 +3337,10 @@ var stdin_default$1t = defineComponent({
3306
3337
  backgroundSize: `100% ${(wrapHeight - optionHeight.value) / 2}px`
3307
3338
  };
3308
3339
  return [createVNode("div", {
3309
- "class": bem$1o("mask"),
3340
+ "class": bem$1p("mask"),
3310
3341
  "style": maskStyle
3311
3342
  }, null), createVNode("div", {
3312
- "class": [BORDER_UNSET_TOP_BOTTOM, bem$1o("frame")],
3343
+ "class": [BORDER_UNSET_TOP_BOTTOM, bem$1p("frame")],
3313
3344
  "style": frameStyle
3314
3345
  }, null)];
3315
3346
  }
@@ -3321,13 +3352,13 @@ var stdin_default$1t = defineComponent({
3321
3352
  };
3322
3353
  return createVNode("div", {
3323
3354
  "ref": columnsRef,
3324
- "class": bem$1o("columns"),
3355
+ "class": bem$1p("columns"),
3325
3356
  "style": columnsStyle
3326
3357
  }, [renderColumnItems(), renderMask(wrapHeight)]);
3327
3358
  };
3328
3359
  const renderToolbar = () => {
3329
3360
  if (props.showToolbar && !parent) {
3330
- return createVNode(stdin_default$1B, mergeProps(pick(props, pickerToolbarPropKeys), {
3361
+ return createVNode(stdin_default$1C, mergeProps(pick(props, pickerToolbarPropKeys), {
3331
3362
  "onConfirm": confirm,
3332
3363
  "onCancel": cancel
3333
3364
  }), pick(slots, pickerToolbarSlots));
@@ -3370,9 +3401,9 @@ var stdin_default$1t = defineComponent({
3370
3401
  return () => {
3371
3402
  var _a, _b;
3372
3403
  return createVNode("div", {
3373
- "class": bem$1o()
3404
+ "class": bem$1p()
3374
3405
  }, [props.toolbarPosition === "top" ? renderToolbar() : null, props.loading ? createVNode(Loading, {
3375
- "class": bem$1o("loading")
3406
+ "class": bem$1p("loading")
3376
3407
  }, null) : null, (_a = slots["columns-top"]) == null ? void 0 : _a.call(slots), renderColumns(), (_b = slots["columns-bottom"]) == null ? void 0 : _b.call(slots), props.toolbarPosition === "bottom" ? renderToolbar() : null]);
3377
3408
  };
3378
3409
  }
@@ -3463,9 +3494,9 @@ function formatDataForCascade({
3463
3494
  }
3464
3495
  return options;
3465
3496
  }
3466
- const Picker = withInstall(stdin_default$1t);
3467
- const [name$1i, bem$1e] = createNamespace("area");
3468
- const areaProps = extend({}, pickerSharedProps, {
3497
+ const Picker = withInstall(stdin_default$1u);
3498
+ const [name$1j, bem$1f] = createNamespace("area");
3499
+ const areaProps = extend({}, pick(pickerSharedProps, INHERIT_PROPS), {
3469
3500
  modelValue: String,
3470
3501
  columnsNum: makeNumericProp(3),
3471
3502
  columnsPlaceholder: makeArrayProp(),
@@ -3474,8 +3505,8 @@ const areaProps = extend({}, pickerSharedProps, {
3474
3505
  default: () => ({})
3475
3506
  }
3476
3507
  });
3477
- var stdin_default$1s = defineComponent({
3478
- name: name$1i,
3508
+ var stdin_default$1t = defineComponent({
3509
+ name: name$1j,
3479
3510
  props: areaProps,
3480
3511
  emits: ["change", "confirm", "cancel", "update:modelValue"],
3481
3512
  setup(props, {
@@ -3522,7 +3553,7 @@ var stdin_default$1s = defineComponent({
3522
3553
  "ref": picker,
3523
3554
  "modelValue": codes.value,
3524
3555
  "onUpdate:modelValue": ($event) => codes.value = $event,
3525
- "class": bem$1e(),
3556
+ "class": bem$1f(),
3526
3557
  "columns": columns.value,
3527
3558
  "onChange": onChange,
3528
3559
  "onCancel": onCancel,
@@ -3530,8 +3561,8 @@ var stdin_default$1s = defineComponent({
3530
3561
  }, pick(props, INHERIT_PROPS)), pick(slots, INHERIT_SLOTS));
3531
3562
  }
3532
3563
  });
3533
- const Area = withInstall(stdin_default$1s);
3534
- const [name$1h, bem$1d] = createNamespace("cell");
3564
+ const Area = withInstall(stdin_default$1t);
3565
+ const [name$1i, bem$1e] = createNamespace("cell");
3535
3566
  const cellSharedProps = {
3536
3567
  tag: makeStringProp("div"),
3537
3568
  icon: String,
@@ -3555,8 +3586,8 @@ const cellSharedProps = {
3555
3586
  }
3556
3587
  };
3557
3588
  const cellProps = extend({}, cellSharedProps, routeProps);
3558
- var stdin_default$1r = defineComponent({
3559
- name: name$1h,
3589
+ var stdin_default$1s = defineComponent({
3590
+ name: name$1i,
3560
3591
  props: cellProps,
3561
3592
  setup(props, {
3562
3593
  slots
@@ -3566,7 +3597,7 @@ var stdin_default$1r = defineComponent({
3566
3597
  const showLabel = slots.label || isDef(props.label);
3567
3598
  if (showLabel) {
3568
3599
  return createVNode("div", {
3569
- "class": [bem$1d("label"), props.labelClass]
3600
+ "class": [bem$1e("label"), props.labelClass]
3570
3601
  }, [slots.label ? slots.label() : props.label]);
3571
3602
  }
3572
3603
  };
@@ -3578,7 +3609,7 @@ var stdin_default$1r = defineComponent({
3578
3609
  return;
3579
3610
  }
3580
3611
  return createVNode("div", {
3581
- "class": [bem$1d("title"), props.titleClass],
3612
+ "class": [bem$1e("title"), props.titleClass],
3582
3613
  "style": props.titleStyle
3583
3614
  }, [titleSlot || createVNode("span", null, [props.title]), renderLabel()]);
3584
3615
  }
@@ -3588,7 +3619,7 @@ var stdin_default$1r = defineComponent({
3588
3619
  const hasValue = slot || isDef(props.value);
3589
3620
  if (hasValue) {
3590
3621
  return createVNode("div", {
3591
- "class": [bem$1d("value"), props.valueClass]
3622
+ "class": [bem$1e("value"), props.valueClass]
3592
3623
  }, [slot ? slot() : createVNode("span", null, [props.value])]);
3593
3624
  }
3594
3625
  };
@@ -3599,7 +3630,7 @@ var stdin_default$1r = defineComponent({
3599
3630
  if (props.icon) {
3600
3631
  return createVNode(Icon, {
3601
3632
  "name": props.icon,
3602
- "class": bem$1d("left-icon"),
3633
+ "class": bem$1e("left-icon"),
3603
3634
  "classPrefix": props.iconPrefix
3604
3635
  }, null);
3605
3636
  }
@@ -3612,7 +3643,7 @@ var stdin_default$1r = defineComponent({
3612
3643
  const name2 = props.arrowDirection && props.arrowDirection !== "right" ? `arrow-${props.arrowDirection}` : "arrow";
3613
3644
  return createVNode(Icon, {
3614
3645
  "name": name2,
3615
- "class": bem$1d("right-icon")
3646
+ "class": bem$1e("right-icon")
3616
3647
  }, null);
3617
3648
  }
3618
3649
  };
@@ -3637,7 +3668,7 @@ var stdin_default$1r = defineComponent({
3637
3668
  classes[size] = !!size;
3638
3669
  }
3639
3670
  return createVNode(tag, {
3640
- "class": bem$1d(classes),
3671
+ "class": bem$1e(classes),
3641
3672
  "role": clickable ? "button" : void 0,
3642
3673
  "tabindex": clickable ? 0 : void 0,
3643
3674
  "onClick": route2
@@ -3650,8 +3681,8 @@ var stdin_default$1r = defineComponent({
3650
3681
  };
3651
3682
  }
3652
3683
  });
3653
- const Cell = withInstall(stdin_default$1r);
3654
- const [name$1g, bem$1c] = createNamespace("form");
3684
+ const Cell = withInstall(stdin_default$1s);
3685
+ const [name$1h, bem$1d] = createNamespace("form");
3655
3686
  const formProps = {
3656
3687
  colon: Boolean,
3657
3688
  disabled: Boolean,
@@ -3670,8 +3701,8 @@ const formProps = {
3670
3701
  default: "onBlur"
3671
3702
  }
3672
3703
  };
3673
- var stdin_default$1q = defineComponent({
3674
- name: name$1g,
3704
+ var stdin_default$1r = defineComponent({
3705
+ name: name$1h,
3675
3706
  props: formProps,
3676
3707
  emits: ["submit", "failed"],
3677
3708
  setup(props, {
@@ -3797,13 +3828,13 @@ var stdin_default$1q = defineComponent({
3797
3828
  return () => {
3798
3829
  var _a;
3799
3830
  return createVNode("form", {
3800
- "class": bem$1c(),
3831
+ "class": bem$1d(),
3801
3832
  "onSubmit": onSubmit
3802
3833
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
3803
3834
  };
3804
3835
  }
3805
3836
  });
3806
- const Form = withInstall(stdin_default$1q);
3837
+ const Form = withInstall(stdin_default$1r);
3807
3838
  function isEmptyValue(value) {
3808
3839
  if (Array.isArray(value)) {
3809
3840
  return !value.length;
@@ -3892,7 +3923,7 @@ function getStringLength(str) {
3892
3923
  function cutString(str, maxlength) {
3893
3924
  return [...str].slice(0, maxlength).join("");
3894
3925
  }
3895
- const [name$1f, bem$1b] = createNamespace("field");
3926
+ const [name$1g, bem$1c] = createNamespace("field");
3896
3927
  const fieldSharedProps = {
3897
3928
  id: String,
3898
3929
  name: String,
@@ -3939,8 +3970,8 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
3939
3970
  default: null
3940
3971
  }
3941
3972
  });
3942
- var stdin_default$1p = defineComponent({
3943
- name: name$1f,
3973
+ var stdin_default$1q = defineComponent({
3974
+ name: name$1g,
3944
3975
  props: fieldProps,
3945
3976
  emits: ["blur", "focus", "clear", "keypress", "clickInput", "endValidate", "startValidate", "clickLeftIcon", "clickRightIcon", "update:modelValue"],
3946
3977
  setup(props, {
@@ -4214,7 +4245,7 @@ var stdin_default$1p = defineComponent({
4214
4245
  const getInputId = () => props.id || `${id}-input`;
4215
4246
  const getValidationStatus = () => state.status;
4216
4247
  const renderInput = () => {
4217
- const controlClass = bem$1b("control", [getProp("inputAlign"), {
4248
+ const controlClass = bem$1c("control", [getProp("inputAlign"), {
4218
4249
  error: showError.value,
4219
4250
  custom: !!slots.input,
4220
4251
  "min-height": props.type === "textarea" && !props.autosize
@@ -4256,7 +4287,7 @@ var stdin_default$1p = defineComponent({
4256
4287
  const leftIconSlot = slots["left-icon"];
4257
4288
  if (props.leftIcon || leftIconSlot) {
4258
4289
  return createVNode("div", {
4259
- "class": bem$1b("left-icon"),
4290
+ "class": bem$1c("left-icon"),
4260
4291
  "onClick": onClickLeftIcon
4261
4292
  }, [leftIconSlot ? leftIconSlot() : createVNode(Icon, {
4262
4293
  "name": props.leftIcon,
@@ -4268,7 +4299,7 @@ var stdin_default$1p = defineComponent({
4268
4299
  const rightIconSlot = slots["right-icon"];
4269
4300
  if (props.rightIcon || rightIconSlot) {
4270
4301
  return createVNode("div", {
4271
- "class": bem$1b("right-icon"),
4302
+ "class": bem$1c("right-icon"),
4272
4303
  "onClick": onClickRightIcon
4273
4304
  }, [rightIconSlot ? rightIconSlot() : createVNode(Icon, {
4274
4305
  "name": props.rightIcon,
@@ -4280,9 +4311,9 @@ var stdin_default$1p = defineComponent({
4280
4311
  if (props.showWordLimit && props.maxlength) {
4281
4312
  const count = getStringLength(getModelValue());
4282
4313
  return createVNode("div", {
4283
- "class": bem$1b("word-limit")
4314
+ "class": bem$1c("word-limit")
4284
4315
  }, [createVNode("span", {
4285
- "class": bem$1b("word-num")
4316
+ "class": bem$1c("word-num")
4286
4317
  }, [count]), createTextVNode("/"), props.maxlength]);
4287
4318
  }
4288
4319
  };
@@ -4295,7 +4326,7 @@ var stdin_default$1p = defineComponent({
4295
4326
  const slot = slots["error-message"];
4296
4327
  const errorMessageAlign = getProp("errorMessageAlign");
4297
4328
  return createVNode("div", {
4298
- "class": bem$1b("error-message", errorMessageAlign)
4329
+ "class": bem$1c("error-message", errorMessageAlign)
4299
4330
  }, [slot ? slot({
4300
4331
  message
4301
4332
  }) : message]);
@@ -4312,6 +4343,10 @@ var stdin_default$1p = defineComponent({
4312
4343
  return createVNode("label", {
4313
4344
  "id": `${id}-label`,
4314
4345
  "for": getInputId(),
4346
+ "onClick": (event) => {
4347
+ preventDefault(event);
4348
+ focus();
4349
+ },
4315
4350
  "style": labelAlign === "top" && labelWidth ? {
4316
4351
  width: addUnit(labelWidth)
4317
4352
  } : void 0
@@ -4319,13 +4354,13 @@ var stdin_default$1p = defineComponent({
4319
4354
  }
4320
4355
  };
4321
4356
  const renderFieldBody = () => [createVNode("div", {
4322
- "class": bem$1b("body")
4357
+ "class": bem$1c("body")
4323
4358
  }, [renderInput(), showClear.value && createVNode(Icon, {
4324
4359
  "ref": clearIconRef,
4325
4360
  "name": props.clearIcon,
4326
- "class": bem$1b("clear")
4361
+ "class": bem$1c("clear")
4327
4362
  }, null), renderRightIcon(), slots.button && createVNode("div", {
4328
- "class": bem$1b("button")
4363
+ "class": bem$1c("button")
4329
4364
  }, [slots.button()])]), renderWordLimit(), renderMessage()];
4330
4365
  useExpose({
4331
4366
  blur,
@@ -4369,7 +4404,7 @@ var stdin_default$1p = defineComponent({
4369
4404
  };
4370
4405
  return createVNode(Cell, {
4371
4406
  "size": props.size,
4372
- "class": bem$1b({
4407
+ "class": bem$1c({
4373
4408
  error: showError.value,
4374
4409
  disabled,
4375
4410
  [`label-${labelAlign}`]: labelAlign
@@ -4379,8 +4414,8 @@ var stdin_default$1p = defineComponent({
4379
4414
  "isLink": props.isLink,
4380
4415
  "clickable": props.clickable,
4381
4416
  "titleStyle": labelStyle.value,
4382
- "valueClass": bem$1b("value"),
4383
- "titleClass": [bem$1b("label", [labelAlign, {
4417
+ "valueClass": bem$1c("value"),
4418
+ "titleClass": [bem$1c("label", [labelAlign, {
4384
4419
  required: props.required
4385
4420
  }]), props.labelClass],
4386
4421
  "arrowDirection": props.arrowDirection
@@ -4393,7 +4428,7 @@ var stdin_default$1p = defineComponent({
4393
4428
  };
4394
4429
  }
4395
4430
  });
4396
- const Field = withInstall(stdin_default$1p);
4431
+ const Field = withInstall(stdin_default$1q);
4397
4432
  let lockCount = 0;
4398
4433
  function lockClick(lock) {
4399
4434
  if (lock) {
@@ -4408,7 +4443,7 @@ function lockClick(lock) {
4408
4443
  }
4409
4444
  }
4410
4445
  }
4411
- const [name$1e, bem$1a] = createNamespace("toast");
4446
+ const [name$1f, bem$1b] = createNamespace("toast");
4412
4447
  const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
4413
4448
  const toastProps = {
4414
4449
  icon: String,
@@ -4431,8 +4466,8 @@ const toastProps = {
4431
4466
  closeOnClick: Boolean,
4432
4467
  closeOnClickOverlay: Boolean
4433
4468
  };
4434
- var stdin_default$1o = defineComponent({
4435
- name: name$1e,
4469
+ var stdin_default$1p = defineComponent({
4470
+ name: name$1f,
4436
4471
  props: toastProps,
4437
4472
  emits: ["update:show"],
4438
4473
  setup(props, {
@@ -4468,13 +4503,13 @@ var stdin_default$1o = defineComponent({
4468
4503
  return createVNode(Icon, {
4469
4504
  "name": icon || type,
4470
4505
  "size": iconSize,
4471
- "class": bem$1a("icon"),
4506
+ "class": bem$1b("icon"),
4472
4507
  "classPrefix": iconPrefix
4473
4508
  }, null);
4474
4509
  }
4475
4510
  if (type === "loading") {
4476
4511
  return createVNode(Loading, {
4477
- "class": bem$1a("loading"),
4512
+ "class": bem$1b("loading"),
4478
4513
  "size": iconSize,
4479
4514
  "type": loadingType
4480
4515
  }, null);
@@ -4487,16 +4522,16 @@ var stdin_default$1o = defineComponent({
4487
4522
  } = props;
4488
4523
  if (slots.message) {
4489
4524
  return createVNode("div", {
4490
- "class": bem$1a("text")
4525
+ "class": bem$1b("text")
4491
4526
  }, [slots.message()]);
4492
4527
  }
4493
4528
  if (isDef(message) && message !== "") {
4494
4529
  return type === "html" ? createVNode("div", {
4495
4530
  "key": 0,
4496
- "class": bem$1a("text"),
4531
+ "class": bem$1b("text"),
4497
4532
  "innerHTML": String(message)
4498
4533
  }, null) : createVNode("div", {
4499
- "class": bem$1a("text")
4534
+ "class": bem$1b("text")
4500
4535
  }, [message]);
4501
4536
  }
4502
4537
  };
@@ -4512,7 +4547,7 @@ var stdin_default$1o = defineComponent({
4512
4547
  onMounted(toggleClickable);
4513
4548
  onUnmounted(toggleClickable);
4514
4549
  return () => createVNode(Popup, mergeProps({
4515
- "class": [bem$1a([props.position, props.wordBreak === "normal" ? "break-normal" : props.wordBreak, {
4550
+ "class": [bem$1b([props.position, props.wordBreak === "normal" ? "break-normal" : props.wordBreak, {
4516
4551
  [props.type]: !props.icon
4517
4552
  }]), props.className],
4518
4553
  "lockScroll": false,
@@ -4613,7 +4648,7 @@ function createInstance() {
4613
4648
  onClosed,
4614
4649
  "onUpdate:show": toggle
4615
4650
  };
4616
- return createVNode(stdin_default$1o, mergeProps(state, attrs), null);
4651
+ return createVNode(stdin_default$1p, mergeProps(state, attrs), null);
4617
4652
  };
4618
4653
  watch(message, (val) => {
4619
4654
  state.message = val;
@@ -4683,8 +4718,8 @@ const resetToastDefaultOptions = (type) => {
4683
4718
  const allowMultipleToast = (value = true) => {
4684
4719
  allowMultiple = value;
4685
4720
  };
4686
- const Toast = withInstall(stdin_default$1o);
4687
- const [name$1d, bem$19] = createNamespace("switch");
4721
+ const Toast = withInstall(stdin_default$1p);
4722
+ const [name$1e, bem$1a] = createNamespace("switch");
4688
4723
  const switchProps = {
4689
4724
  size: numericProp,
4690
4725
  loading: Boolean,
@@ -4701,8 +4736,8 @@ const switchProps = {
4701
4736
  default: false
4702
4737
  }
4703
4738
  };
4704
- var stdin_default$1n = defineComponent({
4705
- name: name$1d,
4739
+ var stdin_default$1o = defineComponent({
4740
+ name: name$1e,
4706
4741
  props: switchProps,
4707
4742
  emits: ["change", "update:modelValue"],
4708
4743
  setup(props, {
@@ -4721,7 +4756,7 @@ var stdin_default$1n = defineComponent({
4721
4756
  if (props.loading) {
4722
4757
  const color = isChecked() ? props.activeColor : props.inactiveColor;
4723
4758
  return createVNode(Loading, {
4724
- "class": bem$19("loading"),
4759
+ "class": bem$1a("loading"),
4725
4760
  "color": color
4726
4761
  }, null);
4727
4762
  }
@@ -4746,7 +4781,7 @@ var stdin_default$1n = defineComponent({
4746
4781
  };
4747
4782
  return createVNode("div", {
4748
4783
  "role": "switch",
4749
- "class": bem$19({
4784
+ "class": bem$1a({
4750
4785
  on: checked,
4751
4786
  loading,
4752
4787
  disabled
@@ -4756,16 +4791,16 @@ var stdin_default$1n = defineComponent({
4756
4791
  "aria-checked": checked,
4757
4792
  "onClick": onClick
4758
4793
  }, [createVNode("div", {
4759
- "class": bem$19("node")
4794
+ "class": bem$1a("node")
4760
4795
  }, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
4761
4796
  };
4762
4797
  }
4763
4798
  });
4764
- const Switch = withInstall(stdin_default$1n);
4765
- const [name$1c, bem$18] = createNamespace("address-edit-detail");
4799
+ const Switch = withInstall(stdin_default$1o);
4800
+ const [name$1d, bem$19] = createNamespace("address-edit-detail");
4766
4801
  const t$j = createNamespace("address-edit")[2];
4767
- var stdin_default$1m = defineComponent({
4768
- name: name$1c,
4802
+ var stdin_default$1n = defineComponent({
4803
+ name: name$1d,
4769
4804
  props: {
4770
4805
  show: Boolean,
4771
4806
  rows: numericProp,
@@ -4799,7 +4834,7 @@ var stdin_default$1m = defineComponent({
4799
4834
  "icon": "location-o",
4800
4835
  "title": express.name,
4801
4836
  "label": express.address,
4802
- "class": bem$18("search-item"),
4837
+ "class": bem$19("search-item"),
4803
4838
  "border": false,
4804
4839
  "onClick": () => onSelect(express)
4805
4840
  }, null));
@@ -4813,7 +4848,7 @@ var stdin_default$1m = defineComponent({
4813
4848
  "autosize": true,
4814
4849
  "clearable": true,
4815
4850
  "ref": field,
4816
- "class": bem$18(),
4851
+ "class": bem$19(),
4817
4852
  "rows": props.rows,
4818
4853
  "type": "textarea",
4819
4854
  "rules": props.rules,
@@ -4830,7 +4865,7 @@ var stdin_default$1m = defineComponent({
4830
4865
  };
4831
4866
  }
4832
4867
  });
4833
- const [name$1b, bem$17, t$i] = createNamespace("address-edit");
4868
+ const [name$1c, bem$18, t$i] = createNamespace("address-edit");
4834
4869
  const DEFAULT_DATA = {
4835
4870
  name: "",
4836
4871
  tel: "",
@@ -4870,8 +4905,8 @@ const addressEditProps = {
4870
4905
  default: isMobile
4871
4906
  }
4872
4907
  };
4873
- var stdin_default$1l = defineComponent({
4874
- name: name$1b,
4908
+ var stdin_default$1m = defineComponent({
4909
+ name: name$1c,
4875
4910
  props: addressEditProps,
4876
4911
  emits: ["save", "focus", "delete", "clickArea", "changeArea", "changeDetail", "selectSearch", "changeDefault"],
4877
4912
  setup(props, {
@@ -4981,8 +5016,9 @@ var stdin_default$1l = defineComponent({
4981
5016
  };
4982
5017
  return withDirectives(createVNode(Cell, {
4983
5018
  "center": true,
5019
+ "border": false,
4984
5020
  "title": t$i("defaultAddress"),
4985
- "class": bem$17("default")
5021
+ "class": bem$18("default")
4986
5022
  }, slots2), [[vShow, !hideBottomFields.value]]);
4987
5023
  }
4988
5024
  };
@@ -5008,13 +5044,13 @@ var stdin_default$1l = defineComponent({
5008
5044
  disableArea
5009
5045
  } = props;
5010
5046
  return createVNode(Form, {
5011
- "class": bem$17(),
5047
+ "class": bem$18(),
5012
5048
  "onSubmit": onSave
5013
5049
  }, {
5014
5050
  default: () => {
5015
5051
  var _a;
5016
5052
  return [createVNode("div", {
5017
- "class": bem$17("fields")
5053
+ "class": bem$18("fields")
5018
5054
  }, [createVNode(Field, {
5019
5055
  "modelValue": data.name,
5020
5056
  "onUpdate:modelValue": ($event) => data.name = $event,
@@ -5045,7 +5081,7 @@ var stdin_default$1l = defineComponent({
5045
5081
  emit("clickArea");
5046
5082
  showAreaPopup.value = !disableArea;
5047
5083
  }
5048
- }, null), [[vShow, props.showArea]]), createVNode(stdin_default$1m, {
5084
+ }, null), [[vShow, props.showArea]]), createVNode(stdin_default$1n, {
5049
5085
  "show": props.showDetail,
5050
5086
  "rows": props.detailRows,
5051
5087
  "rules": rules.value.addressDetail,
@@ -5059,19 +5095,19 @@ var stdin_default$1l = defineComponent({
5059
5095
  "onInput": onChangeDetail,
5060
5096
  "onSelectSearch": (event) => emit("selectSearch", event)
5061
5097
  }, null), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), withDirectives(createVNode("div", {
5062
- "class": bem$17("buttons")
5098
+ "class": bem$18("buttons")
5063
5099
  }, [createVNode(Button, {
5064
5100
  "block": true,
5065
5101
  "round": true,
5066
5102
  "type": "primary",
5067
5103
  "text": props.saveButtonText || t$i("save"),
5068
- "class": bem$17("button"),
5104
+ "class": bem$18("button"),
5069
5105
  "loading": props.isSaving,
5070
5106
  "nativeType": "submit"
5071
5107
  }, null), props.showDelete && createVNode(Button, {
5072
5108
  "block": true,
5073
5109
  "round": true,
5074
- "class": bem$17("button"),
5110
+ "class": bem$18("button"),
5075
5111
  "loading": props.isDeleting,
5076
5112
  "text": props.deleteButtonText || t$i("delete"),
5077
5113
  "onClick": onDelete
@@ -5101,8 +5137,8 @@ var stdin_default$1l = defineComponent({
5101
5137
  };
5102
5138
  }
5103
5139
  });
5104
- const AddressEdit = withInstall(stdin_default$1l);
5105
- const [name$1a, bem$16] = createNamespace("radio-group");
5140
+ const AddressEdit = withInstall(stdin_default$1m);
5141
+ const [name$1b, bem$17] = createNamespace("radio-group");
5106
5142
  const radioGroupProps = {
5107
5143
  disabled: Boolean,
5108
5144
  iconSize: numericProp,
@@ -5110,9 +5146,9 @@ const radioGroupProps = {
5110
5146
  modelValue: unknownProp,
5111
5147
  checkedColor: String
5112
5148
  };
5113
- const RADIO_KEY = Symbol(name$1a);
5114
- var stdin_default$1k = defineComponent({
5115
- name: name$1a,
5149
+ const RADIO_KEY = Symbol(name$1b);
5150
+ var stdin_default$1l = defineComponent({
5151
+ name: name$1b,
5116
5152
  props: radioGroupProps,
5117
5153
  emits: ["change", "update:modelValue"],
5118
5154
  setup(props, {
@@ -5132,14 +5168,14 @@ var stdin_default$1k = defineComponent({
5132
5168
  return () => {
5133
5169
  var _a;
5134
5170
  return createVNode("div", {
5135
- "class": bem$16([props.direction]),
5171
+ "class": bem$17([props.direction]),
5136
5172
  "role": "radiogroup"
5137
5173
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
5138
5174
  };
5139
5175
  }
5140
5176
  });
5141
- const RadioGroup = withInstall(stdin_default$1k);
5142
- const [name$19, bem$15] = createNamespace("tag");
5177
+ const RadioGroup = withInstall(stdin_default$1l);
5178
+ const [name$1a, bem$16] = createNamespace("tag");
5143
5179
  const tagProps = {
5144
5180
  size: String,
5145
5181
  mark: Boolean,
@@ -5151,8 +5187,8 @@ const tagProps = {
5151
5187
  textColor: String,
5152
5188
  closeable: Boolean
5153
5189
  };
5154
- var stdin_default$1j = defineComponent({
5155
- name: name$19,
5190
+ var stdin_default$1k = defineComponent({
5191
+ name: name$1a,
5156
5192
  props: tagProps,
5157
5193
  emits: ["close"],
5158
5194
  setup(props, {
@@ -5195,12 +5231,12 @@ var stdin_default$1j = defineComponent({
5195
5231
  }
5196
5232
  const CloseIcon = closeable && createVNode(Icon, {
5197
5233
  "name": "cross",
5198
- "class": [bem$15("close"), HAPTICS_FEEDBACK],
5234
+ "class": [bem$16("close"), HAPTICS_FEEDBACK],
5199
5235
  "onClick": onClose
5200
5236
  }, null);
5201
5237
  return createVNode("span", {
5202
5238
  "style": getStyle(),
5203
- "class": bem$15([classes, type])
5239
+ "class": bem$16([classes, type])
5204
5240
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots), CloseIcon]);
5205
5241
  };
5206
5242
  return () => createVNode(Transition, {
@@ -5210,7 +5246,7 @@ var stdin_default$1j = defineComponent({
5210
5246
  });
5211
5247
  }
5212
5248
  });
5213
- const Tag = withInstall(stdin_default$1j);
5249
+ const Tag = withInstall(stdin_default$1k);
5214
5250
  const checkerProps = {
5215
5251
  name: unknownProp,
5216
5252
  shape: makeStringProp("round"),
@@ -5221,7 +5257,7 @@ const checkerProps = {
5221
5257
  labelPosition: String,
5222
5258
  labelDisabled: Boolean
5223
5259
  };
5224
- var stdin_default$1i = defineComponent({
5260
+ var stdin_default$1j = defineComponent({
5225
5261
  props: extend({}, checkerProps, {
5226
5262
  bem: makeRequiredProp(Function),
5227
5263
  role: String,
@@ -5240,7 +5276,19 @@ var stdin_default$1i = defineComponent({
5240
5276
  return props.parent.props[name2];
5241
5277
  }
5242
5278
  };
5243
- const disabled = computed(() => getParentProp("disabled") || props.disabled);
5279
+ const disabled = computed(() => {
5280
+ if (props.parent && props.bindGroup) {
5281
+ const disabled2 = getParentProp("disabled") || props.disabled;
5282
+ if (props.role === "checkbox") {
5283
+ const checkedCount = getParentProp("modelValue").length;
5284
+ const max = getParentProp("max");
5285
+ const overlimit = max && checkedCount >= +max;
5286
+ return disabled2 || overlimit && !props.checked;
5287
+ }
5288
+ return disabled2;
5289
+ }
5290
+ return props.disabled;
5291
+ });
5244
5292
  const direction = computed(() => getParentProp("direction"));
5245
5293
  const iconStyle = computed(() => {
5246
5294
  const checkedColor = props.checkedColor || getParentProp("checkedColor");
@@ -5311,9 +5359,9 @@ var stdin_default$1i = defineComponent({
5311
5359
  }
5312
5360
  });
5313
5361
  const radioProps = checkerProps;
5314
- const [name$18, bem$14] = createNamespace("radio");
5315
- var stdin_default$1h = defineComponent({
5316
- name: name$18,
5362
+ const [name$19, bem$15] = createNamespace("radio");
5363
+ var stdin_default$1i = defineComponent({
5364
+ name: name$19,
5317
5365
  props: checkerProps,
5318
5366
  emits: ["update:modelValue"],
5319
5367
  setup(props, {
@@ -5334,8 +5382,8 @@ var stdin_default$1h = defineComponent({
5334
5382
  emit("update:modelValue", props.name);
5335
5383
  }
5336
5384
  };
5337
- return () => createVNode(stdin_default$1i, mergeProps({
5338
- "bem": bem$14,
5385
+ return () => createVNode(stdin_default$1j, mergeProps({
5386
+ "bem": bem$15,
5339
5387
  "role": "radio",
5340
5388
  "parent": parent,
5341
5389
  "checked": checked(),
@@ -5343,10 +5391,10 @@ var stdin_default$1h = defineComponent({
5343
5391
  }, props), pick(slots, ["default", "icon"]));
5344
5392
  }
5345
5393
  });
5346
- const Radio = withInstall(stdin_default$1h);
5347
- const [name$17, bem$13] = createNamespace("address-item");
5348
- var stdin_default$1g = defineComponent({
5349
- name: name$17,
5394
+ const Radio = withInstall(stdin_default$1i);
5395
+ const [name$18, bem$14] = createNamespace("address-item");
5396
+ var stdin_default$1h = defineComponent({
5397
+ name: name$18,
5350
5398
  props: {
5351
5399
  address: makeRequiredProp(Object),
5352
5400
  disabled: Boolean,
@@ -5366,7 +5414,7 @@ var stdin_default$1g = defineComponent({
5366
5414
  };
5367
5415
  const renderRightIcon = () => createVNode(Icon, {
5368
5416
  "name": "edit",
5369
- "class": bem$13("edit"),
5417
+ "class": bem$14("edit"),
5370
5418
  "onClick": (event) => {
5371
5419
  event.stopPropagation();
5372
5420
  emit("edit");
@@ -5381,7 +5429,7 @@ var stdin_default$1g = defineComponent({
5381
5429
  return createVNode(Tag, {
5382
5430
  "type": "primary",
5383
5431
  "round": true,
5384
- "class": bem$13("tag")
5432
+ "class": bem$14("tag")
5385
5433
  }, {
5386
5434
  default: () => [props.defaultTagText]
5387
5435
  });
@@ -5394,9 +5442,9 @@ var stdin_default$1g = defineComponent({
5394
5442
  switchable
5395
5443
  } = props;
5396
5444
  const Info = [createVNode("div", {
5397
- "class": bem$13("name")
5445
+ "class": bem$14("name")
5398
5446
  }, [`${address.name} ${address.tel}`, renderTag()]), createVNode("div", {
5399
- "class": bem$13("address")
5447
+ "class": bem$14("address")
5400
5448
  }, [address.address])];
5401
5449
  if (switchable && !disabled) {
5402
5450
  return createVNode(Radio, {
@@ -5414,13 +5462,13 @@ var stdin_default$1g = defineComponent({
5414
5462
  disabled
5415
5463
  } = props;
5416
5464
  return createVNode("div", {
5417
- "class": bem$13({
5465
+ "class": bem$14({
5418
5466
  disabled
5419
5467
  }),
5420
5468
  "onClick": onClick
5421
5469
  }, [createVNode(Cell, {
5422
5470
  "border": false,
5423
- "titleClass": bem$13("title")
5471
+ "titleClass": bem$14("title")
5424
5472
  }, {
5425
5473
  title: renderContent,
5426
5474
  "right-icon": renderRightIcon
@@ -5430,7 +5478,7 @@ var stdin_default$1g = defineComponent({
5430
5478
  };
5431
5479
  }
5432
5480
  });
5433
- const [name$16, bem$12, t$h] = createNamespace("address-list");
5481
+ const [name$17, bem$13, t$h] = createNamespace("address-list");
5434
5482
  const addressListProps = {
5435
5483
  list: makeArrayProp(),
5436
5484
  modelValue: numericProp,
@@ -5440,8 +5488,8 @@ const addressListProps = {
5440
5488
  addButtonText: String,
5441
5489
  defaultTagText: String
5442
5490
  };
5443
- var stdin_default$1f = defineComponent({
5444
- name: name$16,
5491
+ var stdin_default$1g = defineComponent({
5492
+ name: name$17,
5445
5493
  props: addressListProps,
5446
5494
  emits: ["add", "edit", "select", "clickItem", "editDisabled", "selectDisabled", "update:modelValue"],
5447
5495
  setup(props, {
@@ -5457,7 +5505,7 @@ var stdin_default$1f = defineComponent({
5457
5505
  emit("update:modelValue", item.id);
5458
5506
  }
5459
5507
  };
5460
- return createVNode(stdin_default$1g, {
5508
+ return createVNode(stdin_default$1h, {
5461
5509
  "key": item.id,
5462
5510
  "address": item,
5463
5511
  "disabled": disabled,
@@ -5477,13 +5525,13 @@ var stdin_default$1f = defineComponent({
5477
5525
  }
5478
5526
  };
5479
5527
  const renderBottom = () => createVNode("div", {
5480
- "class": [bem$12("bottom"), "van-safe-area-bottom"]
5528
+ "class": [bem$13("bottom"), "van-safe-area-bottom"]
5481
5529
  }, [createVNode(Button, {
5482
5530
  "round": true,
5483
5531
  "block": true,
5484
5532
  "type": "primary",
5485
5533
  "text": props.addButtonText || t$h("add"),
5486
- "class": bem$12("add"),
5534
+ "class": bem$13("add"),
5487
5535
  "onClick": () => emit("add")
5488
5536
  }, null)]);
5489
5537
  return () => {
@@ -5491,10 +5539,10 @@ var stdin_default$1f = defineComponent({
5491
5539
  const List2 = renderList(props.list);
5492
5540
  const DisabledList = renderList(props.disabledList, true);
5493
5541
  const DisabledText = props.disabledText && createVNode("div", {
5494
- "class": bem$12("disabled-text")
5542
+ "class": bem$13("disabled-text")
5495
5543
  }, [props.disabledText]);
5496
5544
  return createVNode("div", {
5497
- "class": bem$12()
5545
+ "class": bem$13()
5498
5546
  }, [(_a = slots.top) == null ? void 0 : _a.call(slots), createVNode(RadioGroup, {
5499
5547
  "modelValue": props.modelValue
5500
5548
  }, {
@@ -5503,7 +5551,7 @@ var stdin_default$1f = defineComponent({
5503
5551
  };
5504
5552
  }
5505
5553
  });
5506
- const AddressList = withInstall(stdin_default$1f);
5554
+ const AddressList = withInstall(stdin_default$1g);
5507
5555
  const hasIntersectionObserver = inBrowser$1 && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype;
5508
5556
  const modeType = {
5509
5557
  event: "event",
@@ -5656,7 +5704,7 @@ class ImageCache {
5656
5704
  this.caches.shift();
5657
5705
  }
5658
5706
  }
5659
- const [name$15, bem$11] = createNamespace("back-top");
5707
+ const [name$16, bem$12] = createNamespace("back-top");
5660
5708
  const backTopProps = {
5661
5709
  right: numericProp,
5662
5710
  bottom: numericProp,
@@ -5669,8 +5717,8 @@ const backTopProps = {
5669
5717
  default: "body"
5670
5718
  }
5671
5719
  };
5672
- var stdin_default$1e = defineComponent({
5673
- name: name$15,
5720
+ var stdin_default$1f = defineComponent({
5721
+ name: name$16,
5674
5722
  inheritAttrs: false,
5675
5723
  props: backTopProps,
5676
5724
  emits: ["click"],
@@ -5728,28 +5776,158 @@ var stdin_default$1e = defineComponent({
5728
5776
  watch(() => props.target, updateTarget);
5729
5777
  return () => {
5730
5778
  const Content = createVNode("div", mergeProps({
5731
- "ref": root,
5732
- "class": bem$11({
5779
+ "ref": !props.teleport ? root : void 0,
5780
+ "class": bem$12({
5733
5781
  active: show.value
5734
5782
  }),
5735
5783
  "style": style.value,
5736
5784
  "onClick": onClick
5737
5785
  }, attrs), [slots.default ? slots.default() : createVNode(Icon, {
5738
5786
  "name": "back-top",
5739
- "class": bem$11("icon")
5787
+ "class": bem$12("icon")
5740
5788
  }, null)]);
5741
5789
  if (props.teleport) {
5742
- return createVNode(Teleport, {
5790
+ return [createVNode("div", {
5791
+ "ref": root,
5792
+ "class": bem$12("placeholder")
5793
+ }, null), createVNode(Teleport, {
5743
5794
  "to": props.teleport
5744
5795
  }, {
5745
5796
  default: () => [Content]
5746
- });
5797
+ })];
5747
5798
  }
5748
5799
  return Content;
5749
5800
  };
5750
5801
  }
5751
5802
  });
5752
- const BackTop = withInstall(stdin_default$1e);
5803
+ const BackTop = withInstall(stdin_default$1f);
5804
+ var __async = (__this, __arguments, generator) => {
5805
+ return new Promise((resolve, reject) => {
5806
+ var fulfilled = (value) => {
5807
+ try {
5808
+ step(generator.next(value));
5809
+ } catch (e) {
5810
+ reject(e);
5811
+ }
5812
+ };
5813
+ var rejected = (value) => {
5814
+ try {
5815
+ step(generator.throw(value));
5816
+ } catch (e) {
5817
+ reject(e);
5818
+ }
5819
+ };
5820
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
5821
+ step((generator = generator.apply(__this, __arguments)).next());
5822
+ });
5823
+ };
5824
+ const barrageProps = {
5825
+ top: makeNumericProp(10),
5826
+ rows: makeNumericProp(4),
5827
+ duration: makeNumericProp(4e3),
5828
+ autoPlay: truthProp,
5829
+ delay: makeNumberProp(300),
5830
+ modelValue: makeArrayProp()
5831
+ };
5832
+ const [name$15, bem$11] = createNamespace("barrage");
5833
+ var stdin_default$1e = defineComponent({
5834
+ name: name$15,
5835
+ props: barrageProps,
5836
+ emits: ["update:modelValue"],
5837
+ setup(props, {
5838
+ emit,
5839
+ slots
5840
+ }) {
5841
+ const barrageWrapper = ref();
5842
+ const className = bem$11("item");
5843
+ const total = ref(0);
5844
+ const barrageItems = [];
5845
+ const createBarrageItem = (text, delay = props.delay) => {
5846
+ const item = document.createElement("span");
5847
+ item.className = className;
5848
+ item.innerText = String(text);
5849
+ item.style.animationDuration = `${props.duration}ms`;
5850
+ item.style.animationDelay = `${delay}ms`;
5851
+ item.style.animationName = "van-barrage";
5852
+ item.style.animationTimingFunction = "linear";
5853
+ return item;
5854
+ };
5855
+ const isInitBarrage = ref(true);
5856
+ const isPlay = ref(props.autoPlay);
5857
+ const appendBarrageItem = ({
5858
+ id,
5859
+ text
5860
+ }, i) => {
5861
+ var _a;
5862
+ const item = createBarrageItem(text, isInitBarrage.value ? i * props.delay : void 0);
5863
+ if (!props.autoPlay && isPlay.value === false) {
5864
+ item.style.animationPlayState = "paused";
5865
+ }
5866
+ (_a = barrageWrapper.value) == null ? void 0 : _a.append(item);
5867
+ total.value++;
5868
+ const top = (total.value - 1) % +props.rows * item.offsetHeight + +props.top;
5869
+ item.style.top = `${top}px`;
5870
+ item.dataset.id = String(id);
5871
+ barrageItems.push(item);
5872
+ item.addEventListener("animationend", () => {
5873
+ emit("update:modelValue", [...props.modelValue].filter((v) => String(v.id) !== item.dataset.id));
5874
+ });
5875
+ };
5876
+ const updateBarrages = (newValue, oldValue) => {
5877
+ const map = new Map(oldValue.map((item) => [item.id, item]));
5878
+ newValue.forEach((item, i) => {
5879
+ if (map.has(item.id)) {
5880
+ map.delete(item.id);
5881
+ } else {
5882
+ appendBarrageItem(item, i);
5883
+ }
5884
+ });
5885
+ map.forEach((item) => {
5886
+ const index = barrageItems.findIndex((span) => span.dataset.id === String(item.id));
5887
+ if (index > -1) {
5888
+ barrageItems[index].remove();
5889
+ barrageItems.splice(index, 1);
5890
+ }
5891
+ });
5892
+ isInitBarrage.value = false;
5893
+ };
5894
+ watch(() => props.modelValue.slice(), (newValue, oldValue) => updateBarrages(newValue != null ? newValue : [], oldValue != null ? oldValue : []), {
5895
+ deep: true
5896
+ });
5897
+ const rootStyle = ref({});
5898
+ onMounted(() => __async(this, null, function* () {
5899
+ var _a;
5900
+ rootStyle.value["--move-distance"] = `-${(_a = barrageWrapper.value) == null ? void 0 : _a.offsetWidth}px`;
5901
+ yield nextTick();
5902
+ updateBarrages(props.modelValue, []);
5903
+ }));
5904
+ const play = () => {
5905
+ isPlay.value = true;
5906
+ barrageItems.forEach((item) => {
5907
+ item.style.animationPlayState = "running";
5908
+ });
5909
+ };
5910
+ const pause = () => {
5911
+ isPlay.value = false;
5912
+ barrageItems.forEach((item) => {
5913
+ item.style.animationPlayState = "paused";
5914
+ });
5915
+ };
5916
+ useExpose({
5917
+ play,
5918
+ pause
5919
+ });
5920
+ return () => {
5921
+ var _a;
5922
+ return createVNode("div", {
5923
+ "class": bem$11(),
5924
+ "ref": barrageWrapper,
5925
+ "style": rootStyle.value
5926
+ }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
5927
+ };
5928
+ }
5929
+ });
5930
+ const Barrage = withInstall(stdin_default$1e);
5753
5931
  const [name$14, bem$10, t$g] = createNamespace("calendar");
5754
5932
  const formatMonthTitle = (date) => t$g("monthTitle", date.getFullYear(), date.getMonth() + 1);
5755
5933
  function compareMonth(date1, date2) {
@@ -6911,6 +7089,7 @@ var stdin_default$17 = defineComponent({
6911
7089
  }) {
6912
7090
  const tabs = ref([]);
6913
7091
  const activeTab = ref(0);
7092
+ const [selectedElementRefs, setSelectedElementRefs] = useRefs();
6914
7093
  const {
6915
7094
  text: textKey,
6916
7095
  value: valueKey,
@@ -7029,6 +7208,7 @@ var stdin_default$17 = defineComponent({
7029
7208
  selected
7030
7209
  }) : createVNode("span", null, [option[textKey]]);
7031
7210
  return createVNode("li", {
7211
+ "ref": selected ? setSelectedElementRefs(tabIndex) : void 0,
7032
7212
  "role": "menuitemradio",
7033
7213
  "class": [bem$Z("option", {
7034
7214
  selected,
@@ -7085,7 +7265,18 @@ var stdin_default$17 = defineComponent({
7085
7265
  }, {
7086
7266
  default: () => [tabs.value.map(renderTab)]
7087
7267
  });
7268
+ const scrollIntoView = (el) => {
7269
+ const scrollParent = el.parentElement;
7270
+ if (scrollParent) {
7271
+ scrollParent.scrollTop = el.offsetTop - (scrollParent.offsetHeight - el.offsetHeight) / 2;
7272
+ }
7273
+ };
7088
7274
  updateTabs();
7275
+ watch(activeTab, (value) => {
7276
+ const el = selectedElementRefs.value[value];
7277
+ if (el)
7278
+ scrollIntoView(el);
7279
+ });
7089
7280
  watch(() => props.options, updateTabs, {
7090
7281
  deep: true
7091
7282
  });
@@ -7269,7 +7460,7 @@ var stdin_default$14 = defineComponent({
7269
7460
  checked
7270
7461
  });
7271
7462
  useCustomFieldValue(() => props.modelValue);
7272
- return () => createVNode(stdin_default$1i, mergeProps({
7463
+ return () => createVNode(stdin_default$1j, mergeProps({
7273
7464
  "bem": bem$W,
7274
7465
  "role": "checkbox",
7275
7466
  "parent": parent,
@@ -7790,7 +7981,7 @@ var stdin_default$$ = defineComponent({
7790
7981
  }
7791
7982
  });
7792
7983
  const CollapseItem = withInstall(stdin_default$$);
7793
- const ConfigProvider = withInstall(stdin_default$1L);
7984
+ const ConfigProvider = withInstall(stdin_default$1M);
7794
7985
  const [name$R, bem$Q, t$e] = createNamespace("contact-card");
7795
7986
  const contactCardProps = {
7796
7987
  tel: String,
@@ -7955,7 +8146,7 @@ var stdin_default$Y = defineComponent({
7955
8146
  const renderRightIcon = () => createVNode(Radio, {
7956
8147
  "class": bem$O("radio"),
7957
8148
  "name": item.id,
7958
- "iconSize": 16
8149
+ "iconSize": 18
7959
8150
  }, null);
7960
8151
  const renderEditIcon = () => createVNode(Icon, {
7961
8152
  "name": "edit",
@@ -8739,6 +8930,7 @@ var stdin_default$S = defineComponent({
8739
8930
  slots
8740
8931
  }) {
8741
8932
  const currentValues = ref(props.modelValue);
8933
+ const updatedByExternalSources = ref(false);
8742
8934
  const genYearOptions = () => {
8743
8935
  const minYear = props.minDate.getFullYear();
8744
8936
  const maxYear = props.maxDate.getFullYear();
@@ -8754,7 +8946,7 @@ var stdin_default$S = defineComponent({
8754
8946
  columnsType
8755
8947
  } = props;
8756
8948
  const index = columnsType.indexOf(type);
8757
- const value = currentValues.value[index];
8949
+ const value = updatedByExternalSources.value ? props.modelValue[index] : currentValues.value[index];
8758
8950
  if (value) {
8759
8951
  return +value;
8760
8952
  }
@@ -8800,11 +8992,13 @@ var stdin_default$S = defineComponent({
8800
8992
  emit("update:modelValue", newValues);
8801
8993
  }
8802
8994
  });
8803
- watch(() => props.modelValue, (newValues) => {
8995
+ watch(() => props.modelValue, (newValues, oldValues) => {
8996
+ updatedByExternalSources.value = isSameValue(oldValues, currentValues.value);
8804
8997
  newValues = formatValueRange(newValues, columns.value);
8805
8998
  if (!isSameValue(newValues, currentValues.value)) {
8806
8999
  currentValues.value = newValues;
8807
9000
  }
9001
+ updatedByExternalSources.value = false;
8808
9002
  }, {
8809
9003
  immediate: true
8810
9004
  });
@@ -9107,6 +9301,7 @@ const [name$H, bem$H] = createNamespace("divider");
9107
9301
  const dividerProps = {
9108
9302
  dashed: Boolean,
9109
9303
  hairline: truthProp,
9304
+ vertical: Boolean,
9110
9305
  contentPosition: makeStringProp("center")
9111
9306
  };
9112
9307
  var stdin_default$Q = defineComponent({
@@ -9122,9 +9317,10 @@ var stdin_default$Q = defineComponent({
9122
9317
  "class": bem$H({
9123
9318
  dashed: props.dashed,
9124
9319
  hairline: props.hairline,
9125
- [`content-${props.contentPosition}`]: !!slots.default
9320
+ vertical: props.vertical,
9321
+ [`content-${props.contentPosition}`]: !!slots.default && !props.vertical
9126
9322
  })
9127
- }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
9323
+ }, [!props.vertical && ((_a = slots.default) == null ? void 0 : _a.call(slots))]);
9128
9324
  };
9129
9325
  }
9130
9326
  });
@@ -9604,7 +9800,12 @@ var stdin_default$M = defineComponent({
9604
9800
  });
9605
9801
  const GridItem = withInstall(stdin_default$M);
9606
9802
  const getDistance = (touches) => Math.sqrt((touches[0].clientX - touches[1].clientX) ** 2 + (touches[0].clientY - touches[1].clientY) ** 2);
9803
+ const getCenter = (touches) => ({
9804
+ x: (touches[0].clientX + touches[1].clientX) / 2,
9805
+ y: (touches[0].clientY + touches[1].clientY) / 2
9806
+ });
9607
9807
  const bem$C = createNamespace("image-preview")[1];
9808
+ const longImageRatio = 2.6;
9608
9809
  var stdin_default$L = defineComponent({
9609
9810
  props: {
9610
9811
  src: String,
@@ -9627,20 +9828,14 @@ var stdin_default$L = defineComponent({
9627
9828
  moveY: 0,
9628
9829
  moving: false,
9629
9830
  zooming: false,
9630
- imageRatio: 0,
9631
- displayWidth: 0,
9632
- displayHeight: 0
9831
+ imageRatio: 0
9633
9832
  });
9634
9833
  const touch = useTouch();
9834
+ const imageRef = ref();
9635
9835
  const swipeItem = ref();
9636
- const vertical = computed(() => {
9637
- const {
9638
- rootWidth,
9639
- rootHeight
9640
- } = props;
9641
- const rootRatio = rootHeight / rootWidth;
9642
- return state.imageRatio > rootRatio;
9643
- });
9836
+ const vertical = ref(false);
9837
+ const isLongImage = ref(false);
9838
+ let initialMoveY = 0;
9644
9839
  const imageStyle = computed(() => {
9645
9840
  const {
9646
9841
  scale,
@@ -9652,10 +9847,8 @@ var stdin_default$L = defineComponent({
9652
9847
  const style = {
9653
9848
  transitionDuration: zooming || moving ? "0s" : ".3s"
9654
9849
  };
9655
- if (scale !== 1) {
9656
- const offsetX = moveX / scale;
9657
- const offsetY = moveY / scale;
9658
- style.transform = `scale(${scale}, ${scale}) translate(${offsetX}px, ${offsetY}px)`;
9850
+ if (scale !== 1 || isLongImage.value) {
9851
+ style.transform = `matrix(${scale}, 0, 0, ${scale}, ${moveX}, ${moveY})`;
9659
9852
  }
9660
9853
  return style;
9661
9854
  });
@@ -9681,10 +9874,26 @@ var stdin_default$L = defineComponent({
9681
9874
  }
9682
9875
  return 0;
9683
9876
  });
9684
- const setScale = (scale) => {
9877
+ const setScale = (scale, center) => {
9878
+ var _a;
9685
9879
  scale = clamp(scale, +props.minZoom, +props.maxZoom + 1);
9686
9880
  if (scale !== state.scale) {
9881
+ const ratio = scale / state.scale;
9687
9882
  state.scale = scale;
9883
+ if (center) {
9884
+ const imageRect = useRect((_a = imageRef.value) == null ? void 0 : _a.$el);
9885
+ const origin = {
9886
+ x: imageRect.width * 0.5,
9887
+ y: imageRect.height * 0.5
9888
+ };
9889
+ const moveX = state.moveX - (center.x - imageRect.left - origin.x) * (ratio - 1);
9890
+ const moveY = state.moveY - (center.y - imageRect.top - origin.y) * (ratio - 1);
9891
+ state.moveX = clamp(moveX, -maxMoveX.value, maxMoveX.value);
9892
+ state.moveY = clamp(moveY, -maxMoveY.value, maxMoveY.value);
9893
+ } else {
9894
+ state.moveX = 0;
9895
+ state.moveY = isLongImage.value ? initialMoveY : 0;
9896
+ }
9688
9897
  emit("scale", {
9689
9898
  scale,
9690
9899
  index: props.active
@@ -9693,20 +9902,20 @@ var stdin_default$L = defineComponent({
9693
9902
  };
9694
9903
  const resetScale = () => {
9695
9904
  setScale(1);
9696
- state.moveX = 0;
9697
- state.moveY = 0;
9698
9905
  };
9699
9906
  const toggleScale = () => {
9700
9907
  const scale = state.scale > 1 ? 1 : 2;
9701
- setScale(scale);
9702
- state.moveX = 0;
9703
- state.moveY = 0;
9908
+ setScale(scale, scale === 2 || isLongImage.value ? {
9909
+ x: touch.startX.value,
9910
+ y: touch.startY.value
9911
+ } : void 0);
9704
9912
  };
9705
9913
  let fingerNum;
9706
9914
  let startMoveX;
9707
9915
  let startMoveY;
9708
9916
  let startScale;
9709
9917
  let startDistance;
9918
+ let lastCenter;
9710
9919
  let doubleTapTimer;
9711
9920
  let touchStartTime;
9712
9921
  let isImageMoved = false;
@@ -9726,11 +9935,11 @@ var stdin_default$L = defineComponent({
9726
9935
  startMoveY = state.moveY;
9727
9936
  touchStartTime = Date.now();
9728
9937
  isImageMoved = false;
9729
- state.moving = fingerNum === 1 && state.scale !== 1;
9938
+ state.moving = fingerNum === 1 && (state.scale !== 1 || isLongImage.value);
9730
9939
  state.zooming = fingerNum === 2 && !offsetX.value;
9731
9940
  if (state.zooming) {
9732
9941
  startScale = state.scale;
9733
- startDistance = getDistance(event.touches);
9942
+ startDistance = getDistance(touches);
9734
9943
  }
9735
9944
  };
9736
9945
  const onTouchMove = (event) => {
@@ -9759,7 +9968,8 @@ var stdin_default$L = defineComponent({
9759
9968
  if (touches.length === 2) {
9760
9969
  const distance = getDistance(touches);
9761
9970
  const scale = startScale * distance / startDistance;
9762
- setScale(scale);
9971
+ lastCenter = getCenter(touches);
9972
+ setScale(scale, lastCenter);
9763
9973
  }
9764
9974
  }
9765
9975
  };
@@ -9813,7 +10023,7 @@ var stdin_default$L = defineComponent({
9813
10023
  }
9814
10024
  const maxZoom = +props.maxZoom;
9815
10025
  if (state.scale > maxZoom) {
9816
- state.scale = maxZoom;
10026
+ setScale(maxZoom, lastCenter);
9817
10027
  }
9818
10028
  }
9819
10029
  }
@@ -9821,12 +10031,30 @@ var stdin_default$L = defineComponent({
9821
10031
  checkTap();
9822
10032
  touch.reset();
9823
10033
  };
10034
+ const resize = () => {
10035
+ const {
10036
+ rootWidth,
10037
+ rootHeight
10038
+ } = props;
10039
+ const rootRatio = rootHeight / rootWidth;
10040
+ const {
10041
+ imageRatio
10042
+ } = state;
10043
+ vertical.value = state.imageRatio > rootRatio && imageRatio < longImageRatio;
10044
+ isLongImage.value = state.imageRatio > rootRatio && imageRatio >= longImageRatio;
10045
+ if (isLongImage.value) {
10046
+ initialMoveY = (imageRatio * rootWidth - rootHeight) / 2;
10047
+ state.moveY = initialMoveY;
10048
+ }
10049
+ resetScale();
10050
+ };
9824
10051
  const onLoad = (event) => {
9825
10052
  const {
9826
10053
  naturalWidth,
9827
10054
  naturalHeight
9828
10055
  } = event.target;
9829
10056
  state.imageRatio = naturalHeight / naturalWidth;
10057
+ resize();
9830
10058
  };
9831
10059
  watch(() => props.active, resetScale);
9832
10060
  watch(() => props.show, (value) => {
@@ -9834,6 +10062,7 @@ var stdin_default$L = defineComponent({
9834
10062
  resetScale();
9835
10063
  }
9836
10064
  });
10065
+ watch(() => [props.rootWidth, props.rootHeight], resize);
9837
10066
  useEventListener("touchmove", onTouchMove, {
9838
10067
  target: computed(() => {
9839
10068
  var _a;
@@ -9858,6 +10087,7 @@ var stdin_default$L = defineComponent({
9858
10087
  }, [slots.image({
9859
10088
  src: props.src
9860
10089
  })]) : createVNode(Image$1, {
10090
+ "ref": imageRef,
9861
10091
  "src": props.src,
9862
10092
  "fit": "contain",
9863
10093
  "class": bem$C("image", {
@@ -11387,21 +11617,7 @@ var stdin_default$A = defineComponent({
11387
11617
  }
11388
11618
  });
11389
11619
  const PasswordInput = withInstall(stdin_default$A);
11390
- const PickerGroup = withInstall(stdin_default$1u);
11391
- const useSyncPropRef = (getProp, setProp) => {
11392
- const propRef = ref(getProp());
11393
- watch(getProp, (value) => {
11394
- if (value !== propRef.value) {
11395
- propRef.value = value;
11396
- }
11397
- });
11398
- watch(propRef, (value) => {
11399
- if (value !== getProp()) {
11400
- setProp(value);
11401
- }
11402
- });
11403
- return propRef;
11404
- };
11620
+ const PickerGroup = withInstall(stdin_default$1v);
11405
11621
  const [name$r, bem$q] = createNamespace("popover");
11406
11622
  const popupProps = ["overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
11407
11623
  const popoverProps = {
@@ -12381,6 +12597,7 @@ const signatureProps = {
12381
12597
  penColor: makeStringProp("#000"),
12382
12598
  lineWidth: makeNumberProp(3),
12383
12599
  clearButtonText: String,
12600
+ backgroundColor: makeStringProp(""),
12384
12601
  confirmButtonText: String
12385
12602
  };
12386
12603
  const hasCanvasSupport = () => {
@@ -12400,7 +12617,8 @@ var stdin_default$r = defineComponent({
12400
12617
  const state = reactive({
12401
12618
  width: 0,
12402
12619
  height: 0,
12403
- ctx: null
12620
+ ctx: null,
12621
+ ratio: inBrowser ? window.devicePixelRatio : 1
12404
12622
  });
12405
12623
  let canvasRect;
12406
12624
  const isRenderCanvas = inBrowser ? hasCanvasSupport() : true;
@@ -12409,7 +12627,7 @@ var stdin_default$r = defineComponent({
12409
12627
  return false;
12410
12628
  }
12411
12629
  state.ctx.beginPath();
12412
- state.ctx.lineWidth = props.lineWidth;
12630
+ state.ctx.lineWidth = props.lineWidth * state.ratio;
12413
12631
  state.ctx.strokeStyle = props.penColor;
12414
12632
  canvasRect = useRect(canvasRef);
12415
12633
  emit("start");
@@ -12421,8 +12639,8 @@ var stdin_default$r = defineComponent({
12421
12639
  }
12422
12640
  preventDefault(event);
12423
12641
  const touch = event.touches[0];
12424
- const mouseX = touch.clientX - ((canvasRect == null ? void 0 : canvasRect.left) || 0);
12425
- const mouseY = touch.clientY - ((canvasRect == null ? void 0 : canvasRect.top) || 0);
12642
+ const mouseX = (touch.clientX - ((canvasRect == null ? void 0 : canvasRect.left) || 0)) * state.ratio;
12643
+ const mouseY = (touch.clientY - ((canvasRect == null ? void 0 : canvasRect.top) || 0)) * state.ratio;
12426
12644
  state.ctx.lineCap = "round";
12427
12645
  state.ctx.lineJoin = "round";
12428
12646
  (_a = state.ctx) == null ? void 0 : _a.lineTo(mouseX, mouseY);
@@ -12439,13 +12657,23 @@ var stdin_default$r = defineComponent({
12439
12657
  empty.height = canvas.height;
12440
12658
  return canvas.toDataURL() === empty.toDataURL();
12441
12659
  };
12660
+ const setCanvasBgColor = () => {
12661
+ if (state.ctx && props.backgroundColor) {
12662
+ state.ctx.fillStyle = props.backgroundColor;
12663
+ state.ctx.fillRect(0, 0, state.width, state.height);
12664
+ }
12665
+ };
12442
12666
  const submit = () => {
12667
+ var _a, _b;
12443
12668
  const canvas = canvasRef.value;
12444
12669
  if (!canvas) {
12445
12670
  return;
12446
12671
  }
12447
12672
  const isEmpty = isCanvasEmpty(canvas);
12448
- const image = isEmpty ? "" : canvas.toDataURL(`image/${props.type}`, props.type === "jpg" ? 0.9 : null);
12673
+ const image = isEmpty ? "" : ((_b = (_a = {
12674
+ jpg: () => canvas.toDataURL("image/jpeg", 0.8),
12675
+ jpeg: () => canvas.toDataURL("image/jpeg", 0.8)
12676
+ })[props.type]) == null ? void 0 : _b.call(_a)) || canvas.toDataURL(`image/${props.type}`);
12449
12677
  emit("submit", {
12450
12678
  image,
12451
12679
  canvas
@@ -12455,6 +12683,7 @@ var stdin_default$r = defineComponent({
12455
12683
  if (state.ctx) {
12456
12684
  state.ctx.clearRect(0, 0, state.width, state.height);
12457
12685
  state.ctx.closePath();
12686
+ setCanvasBgColor();
12458
12687
  }
12459
12688
  emit("clear");
12460
12689
  };
@@ -12462,8 +12691,11 @@ var stdin_default$r = defineComponent({
12462
12691
  var _a, _b, _c;
12463
12692
  if (isRenderCanvas) {
12464
12693
  state.ctx = (_a = canvasRef.value) == null ? void 0 : _a.getContext("2d");
12465
- state.width = ((_b = wrapRef.value) == null ? void 0 : _b.offsetWidth) || 0;
12466
- state.height = ((_c = wrapRef.value) == null ? void 0 : _c.offsetHeight) || 0;
12694
+ state.width = (((_b = wrapRef.value) == null ? void 0 : _b.offsetWidth) || 0) * state.ratio;
12695
+ state.height = (((_c = wrapRef.value) == null ? void 0 : _c.offsetHeight) || 0) * state.ratio;
12696
+ nextTick(() => {
12697
+ setCanvasBgColor();
12698
+ });
12467
12699
  }
12468
12700
  });
12469
12701
  return () => createVNode("div", {
@@ -14174,10 +14406,11 @@ var stdin_default$6 = defineComponent({
14174
14406
  imageFit: String,
14175
14407
  lazyLoad: Boolean,
14176
14408
  deletable: Boolean,
14409
+ reupload: Boolean,
14177
14410
  previewSize: [Number, String, Array],
14178
14411
  beforeDelete: Function
14179
14412
  },
14180
- emits: ["delete", "preview"],
14413
+ emits: ["delete", "preview", "reupload"],
14181
14414
  setup(props, {
14182
14415
  emit,
14183
14416
  slots
@@ -14219,6 +14452,7 @@ var stdin_default$6 = defineComponent({
14219
14452
  });
14220
14453
  };
14221
14454
  const onPreview = () => emit("preview");
14455
+ const onReupload = () => emit("reupload");
14222
14456
  const renderDeleteIcon = () => {
14223
14457
  if (props.deletable && props.item.status !== "uploading") {
14224
14458
  const slot = slots["preview-delete"];
@@ -14254,7 +14488,8 @@ var stdin_default$6 = defineComponent({
14254
14488
  item,
14255
14489
  lazyLoad,
14256
14490
  imageFit,
14257
- previewSize
14491
+ previewSize,
14492
+ reupload
14258
14493
  } = props;
14259
14494
  if (isImageFile(item)) {
14260
14495
  return createVNode(Image$1, {
@@ -14264,7 +14499,7 @@ var stdin_default$6 = defineComponent({
14264
14499
  "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
14265
14500
  "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
14266
14501
  "lazyLoad": lazyLoad,
14267
- "onClick": onPreview
14502
+ "onClick": reupload ? onReupload : onPreview
14268
14503
  }, {
14269
14504
  default: renderCover
14270
14505
  });
@@ -14298,6 +14533,7 @@ const uploaderProps = {
14298
14533
  uploadIcon: makeStringProp("photograph"),
14299
14534
  uploadText: String,
14300
14535
  deletable: truthProp,
14536
+ reupload: Boolean,
14301
14537
  afterRead: Function,
14302
14538
  showUpload: truthProp,
14303
14539
  modelValue: makeArrayProp(),
@@ -14315,13 +14551,14 @@ const uploaderProps = {
14315
14551
  var stdin_default$5 = defineComponent({
14316
14552
  name: name$1,
14317
14553
  props: uploaderProps,
14318
- emits: ["delete", "oversize", "clickUpload", "closePreview", "clickPreview", "update:modelValue"],
14554
+ emits: ["delete", "oversize", "clickUpload", "closePreview", "clickPreview", "clickReupload", "update:modelValue"],
14319
14555
  setup(props, {
14320
14556
  emit,
14321
14557
  slots
14322
14558
  }) {
14323
14559
  const inputRef = ref();
14324
14560
  const urls = [];
14561
+ const reuploadIndex = ref(-1);
14325
14562
  const getDetail = (index = props.modelValue.length) => ({
14326
14563
  name: props.name,
14327
14564
  index
@@ -14347,7 +14584,14 @@ var stdin_default$5 = defineComponent({
14347
14584
  }
14348
14585
  }
14349
14586
  items = reactive(items);
14350
- emit("update:modelValue", [...props.modelValue, ...toArray(items)]);
14587
+ if (reuploadIndex.value > -1) {
14588
+ const arr = [...props.modelValue];
14589
+ arr.splice(reuploadIndex.value, 1, items);
14590
+ emit("update:modelValue", arr);
14591
+ reuploadIndex.value = -1;
14592
+ } else {
14593
+ emit("update:modelValue", [...props.modelValue, ...toArray(items)]);
14594
+ }
14351
14595
  if (props.afterRead) {
14352
14596
  props.afterRead(items, getDetail());
14353
14597
  }
@@ -14448,15 +14692,20 @@ var stdin_default$5 = defineComponent({
14448
14692
  emit("update:modelValue", fileList);
14449
14693
  emit("delete", item, getDetail(index));
14450
14694
  };
14695
+ const reuploadImage = (index) => {
14696
+ chooseFile();
14697
+ reuploadIndex.value = index;
14698
+ };
14451
14699
  const renderPreviewItem = (item, index) => {
14452
- const needPickData = ["imageFit", "deletable", "previewSize", "beforeDelete"];
14700
+ const needPickData = ["imageFit", "deletable", "reupload", "previewSize", "beforeDelete"];
14453
14701
  const previewData = extend(pick(props, needPickData), pick(item, needPickData, true));
14454
14702
  return createVNode(stdin_default$6, mergeProps({
14455
14703
  "item": item,
14456
14704
  "index": index,
14457
- "onClick": () => emit("clickPreview", item, getDetail(index)),
14705
+ "onClick": () => emit(props.reupload ? "clickReupload" : "clickPreview", item, getDetail(index)),
14458
14706
  "onDelete": () => deleteFile(item, index),
14459
- "onPreview": () => previewImage(item)
14707
+ "onPreview": () => previewImage(item),
14708
+ "onReupload": () => reuploadImage(index)
14460
14709
  }, pick(props, ["name", "lazyLoad"]), previewData), pick(slots, ["preview-cover", "preview-delete"]));
14461
14710
  };
14462
14711
  const renderPreviewList = () => {
@@ -14466,24 +14715,25 @@ var stdin_default$5 = defineComponent({
14466
14715
  };
14467
14716
  const onClickUpload = (event) => emit("clickUpload", event);
14468
14717
  const renderUpload = () => {
14469
- if (props.modelValue.length >= +props.maxCount) {
14718
+ if (props.modelValue.length >= +props.maxCount && !props.reupload) {
14470
14719
  return;
14471
14720
  }
14721
+ const hideUploader = props.modelValue.length >= +props.maxCount && props.reupload;
14472
14722
  const Input = props.readonly ? null : createVNode("input", {
14473
14723
  "ref": inputRef,
14474
14724
  "type": "file",
14475
14725
  "class": bem$1("input"),
14476
14726
  "accept": props.accept,
14477
14727
  "capture": props.capture,
14478
- "multiple": props.multiple,
14728
+ "multiple": props.multiple && reuploadIndex.value === -1,
14479
14729
  "disabled": props.disabled,
14480
14730
  "onChange": onChange
14481
14731
  }, null);
14482
14732
  if (slots.default) {
14483
- return createVNode("div", {
14733
+ return withDirectives(createVNode("div", {
14484
14734
  "class": bem$1("input-wrapper"),
14485
14735
  "onClick": onClickUpload
14486
- }, [slots.default(), Input]);
14736
+ }, [slots.default(), Input]), [[vShow, !hideUploader]]);
14487
14737
  }
14488
14738
  return withDirectives(createVNode("div", {
14489
14739
  "class": bem$1("upload", {
@@ -14496,7 +14746,7 @@ var stdin_default$5 = defineComponent({
14496
14746
  "class": bem$1("upload-icon")
14497
14747
  }, null), props.uploadText && createVNode("span", {
14498
14748
  "class": bem$1("upload-text")
14499
- }, [props.uploadText]), Input]), [[vShow, props.showUpload]]);
14749
+ }, [props.uploadText]), Input]), [[vShow, props.showUpload && !hideUploader]]);
14500
14750
  };
14501
14751
  const chooseFile = () => {
14502
14752
  if (inputRef.value && !props.disabled) {
@@ -15523,7 +15773,7 @@ const Lazyload = {
15523
15773
  });
15524
15774
  }
15525
15775
  };
15526
- const version = "4.3.1";
15776
+ const version = "4.4.0";
15527
15777
  function install(app) {
15528
15778
  const components = [
15529
15779
  ActionBar,
@@ -15535,6 +15785,7 @@ function install(app) {
15535
15785
  Area,
15536
15786
  BackTop,
15537
15787
  Badge,
15788
+ Barrage,
15538
15789
  Button,
15539
15790
  Calendar,
15540
15791
  Card,
@@ -15645,6 +15896,7 @@ export {
15645
15896
  Area,
15646
15897
  BackTop,
15647
15898
  Badge,
15899
+ Barrage,
15648
15900
  Button,
15649
15901
  Calendar,
15650
15902
  Card,
@@ -15744,6 +15996,7 @@ export {
15744
15996
  areaProps,
15745
15997
  backTopProps,
15746
15998
  badgeProps,
15999
+ barrageProps,
15747
16000
  buttonProps,
15748
16001
  calendarProps,
15749
16002
  cardProps,