vant 4.2.0 → 4.2.1

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 (49) hide show
  1. package/es/index.d.ts +1 -1
  2. package/es/index.mjs +1 -1
  3. package/es/pagination/Pagination.d.ts +26 -0
  4. package/es/pagination/Pagination.mjs +14 -4
  5. package/es/pagination/index.css +1 -1
  6. package/es/pagination/index.d.ts +18 -0
  7. package/es/picker/Picker.d.ts +2 -1
  8. package/es/picker/Picker.mjs +16 -6
  9. package/es/picker/PickerColumn.d.ts +2 -1
  10. package/es/picker/PickerColumn.mjs +10 -4
  11. package/es/picker/index.d.ts +2 -1
  12. package/es/sticky/Sticky.mjs +20 -4
  13. package/es/tab/Tab.mjs +24 -6
  14. package/es/{tabs/TabsTitle.d.ts → tab/TabTitle.d.ts} +1 -2
  15. package/es/{tabs/TabsTitle.mjs → tab/TabTitle.mjs} +2 -2
  16. package/es/tabs/Tabs.d.ts +1 -1
  17. package/es/tabs/Tabs.mjs +15 -30
  18. package/es/tabs/index.d.ts +1 -1
  19. package/es/tabs/style/index.mjs +0 -1
  20. package/es/tabs/types.d.ts +3 -1
  21. package/es/watermark/Watermark.mjs +3 -1
  22. package/lib/index.css +1 -1
  23. package/lib/index.d.ts +1 -1
  24. package/lib/index.js +1 -1
  25. package/lib/pagination/Pagination.d.ts +26 -0
  26. package/lib/pagination/Pagination.js +13 -3
  27. package/lib/pagination/index.css +1 -1
  28. package/lib/pagination/index.d.ts +18 -0
  29. package/lib/picker/Picker.d.ts +2 -1
  30. package/lib/picker/Picker.js +16 -6
  31. package/lib/picker/PickerColumn.d.ts +2 -1
  32. package/lib/picker/PickerColumn.js +9 -3
  33. package/lib/picker/index.d.ts +2 -1
  34. package/lib/sticky/Sticky.js +18 -2
  35. package/lib/tab/Tab.js +21 -3
  36. package/lib/{tabs/TabsTitle.d.ts → tab/TabTitle.d.ts} +1 -2
  37. package/lib/{tabs/TabsTitle.js → tab/TabTitle.js} +2 -2
  38. package/lib/tabs/Tabs.d.ts +1 -1
  39. package/lib/tabs/Tabs.js +13 -28
  40. package/lib/tabs/index.d.ts +1 -1
  41. package/lib/tabs/style/index.js +0 -1
  42. package/lib/tabs/types.d.ts +3 -1
  43. package/lib/vant.cjs.js +227 -180
  44. package/lib/vant.es.js +227 -180
  45. package/lib/vant.js +227 -180
  46. package/lib/vant.min.js +1 -1
  47. package/lib/watermark/Watermark.js +3 -1
  48. package/lib/web-types.json +1 -1
  49. package/package.json +1 -1
package/lib/vant.es.js CHANGED
@@ -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$1O = {
239
239
  name: "姓名",
240
240
  tel: "电话",
241
241
  save: "保存",
@@ -298,7 +298,7 @@ var stdin_default$1P = {
298
298
  };
299
299
  const lang = ref("zh-CN");
300
300
  const messages = reactive({
301
- "zh-CN": stdin_default$1P
301
+ "zh-CN": stdin_default$1O
302
302
  });
303
303
  const Locale = {
304
304
  messages() {
@@ -313,11 +313,11 @@ const Locale = {
313
313
  }
314
314
  };
315
315
  const useCurrentLang = () => lang;
316
- var stdin_default$1O = Locale;
316
+ var stdin_default$1N = Locale;
317
317
  function createTranslate(name2) {
318
318
  const prefix = camelize(name2) + ".";
319
319
  return (path, ...args) => {
320
- const messages2 = stdin_default$1O.messages();
320
+ const messages2 = stdin_default$1N.messages();
321
321
  const message = get(messages2, prefix + path) || get(messages2, path);
322
322
  return isFunction(message) ? message(...args) : message;
323
323
  };
@@ -445,7 +445,7 @@ const actionBarProps = {
445
445
  placeholder: Boolean,
446
446
  safeAreaInsetBottom: truthProp
447
447
  };
448
- var stdin_default$1N = defineComponent({
448
+ var stdin_default$1M = defineComponent({
449
449
  name: name$1D,
450
450
  props: actionBarProps,
451
451
  setup(props, {
@@ -474,7 +474,7 @@ var stdin_default$1N = defineComponent({
474
474
  };
475
475
  }
476
476
  });
477
- const ActionBar = withInstall(stdin_default$1N);
477
+ const ActionBar = withInstall(stdin_default$1M);
478
478
  function useExpose(apis) {
479
479
  const instance2 = getCurrentInstance();
480
480
  if (instance2) {
@@ -513,7 +513,7 @@ const badgeProps = {
513
513
  showZero: truthProp,
514
514
  position: makeStringProp("top-right")
515
515
  };
516
- var stdin_default$1M = defineComponent({
516
+ var stdin_default$1L = defineComponent({
517
517
  name: name$1C,
518
518
  props: badgeProps,
519
519
  setup(props, {
@@ -600,7 +600,7 @@ var stdin_default$1M = defineComponent({
600
600
  };
601
601
  }
602
602
  });
603
- const Badge = withInstall(stdin_default$1M);
603
+ const Badge = withInstall(stdin_default$1L);
604
604
  let globalZIndex = 2e3;
605
605
  const useGlobalZIndex = () => ++globalZIndex;
606
606
  const setGlobalZIndex = (val) => {
@@ -624,7 +624,7 @@ function mapThemeVarsToCSSVars(themeVars) {
624
624
  });
625
625
  return cssVars;
626
626
  }
627
- var stdin_default$1L = defineComponent({
627
+ var stdin_default$1K = defineComponent({
628
628
  name: name$1B,
629
629
  props: configProviderProps,
630
630
  setup(props, {
@@ -679,7 +679,7 @@ const iconProps = {
679
679
  badgeProps: Object,
680
680
  classPrefix: String
681
681
  };
682
- var stdin_default$1K = defineComponent({
682
+ var stdin_default$1J = defineComponent({
683
683
  name: name$1A,
684
684
  props: iconProps,
685
685
  setup(props, {
@@ -718,7 +718,7 @@ var stdin_default$1K = defineComponent({
718
718
  };
719
719
  }
720
720
  });
721
- const Icon = withInstall(stdin_default$1K);
721
+ const Icon = withInstall(stdin_default$1J);
722
722
  const [name$1z, bem$1u] = createNamespace("loading");
723
723
  const SpinIcon = Array(12).fill(null).map((_, index) => createVNode("i", {
724
724
  "class": bem$1u("line", String(index + 1))
@@ -740,7 +740,7 @@ const loadingProps = {
740
740
  textSize: numericProp,
741
741
  textColor: String
742
742
  };
743
- var stdin_default$1J = defineComponent({
743
+ var stdin_default$1I = defineComponent({
744
744
  name: name$1z,
745
745
  props: loadingProps,
746
746
  setup(props, {
@@ -783,7 +783,7 @@ var stdin_default$1J = defineComponent({
783
783
  };
784
784
  }
785
785
  });
786
- const Loading = withInstall(stdin_default$1J);
786
+ const Loading = withInstall(stdin_default$1I);
787
787
  const [name$1y, bem$1t] = createNamespace("button");
788
788
  const buttonProps = extend({}, routeProps, {
789
789
  tag: makeStringProp("button"),
@@ -806,7 +806,7 @@ const buttonProps = extend({}, routeProps, {
806
806
  loadingType: String,
807
807
  iconPosition: makeStringProp("left")
808
808
  });
809
- var stdin_default$1I = defineComponent({
809
+ var stdin_default$1H = defineComponent({
810
810
  name: name$1y,
811
811
  props: buttonProps,
812
812
  emits: ["click"],
@@ -923,7 +923,7 @@ var stdin_default$1I = defineComponent({
923
923
  };
924
924
  }
925
925
  });
926
- const Button = withInstall(stdin_default$1I);
926
+ const Button = withInstall(stdin_default$1H);
927
927
  const [name$1x, bem$1s] = createNamespace("action-bar-button");
928
928
  const actionBarButtonProps = extend({}, routeProps, {
929
929
  type: String,
@@ -933,7 +933,7 @@ const actionBarButtonProps = extend({}, routeProps, {
933
933
  loading: Boolean,
934
934
  disabled: Boolean
935
935
  });
936
- var stdin_default$1H = defineComponent({
936
+ var stdin_default$1G = defineComponent({
937
937
  name: name$1x,
938
938
  props: actionBarButtonProps,
939
939
  setup(props, {
@@ -986,7 +986,7 @@ var stdin_default$1H = defineComponent({
986
986
  };
987
987
  }
988
988
  });
989
- const ActionBarButton = withInstall(stdin_default$1H);
989
+ const ActionBarButton = withInstall(stdin_default$1G);
990
990
  const [name$1w, bem$1r] = createNamespace("action-bar-icon");
991
991
  const actionBarIconProps = extend({}, routeProps, {
992
992
  dot: Boolean,
@@ -998,7 +998,7 @@ const actionBarIconProps = extend({}, routeProps, {
998
998
  badgeProps: Object,
999
999
  iconPrefix: String
1000
1000
  });
1001
- var stdin_default$1G = defineComponent({
1001
+ var stdin_default$1F = defineComponent({
1002
1002
  name: name$1w,
1003
1003
  props: actionBarIconProps,
1004
1004
  setup(props, {
@@ -1044,7 +1044,7 @@ var stdin_default$1G = defineComponent({
1044
1044
  }, [renderIcon(), slots.default ? slots.default() : props.text]);
1045
1045
  }
1046
1046
  });
1047
- const ActionBarIcon = withInstall(stdin_default$1G);
1047
+ const ActionBarIcon = withInstall(stdin_default$1F);
1048
1048
  const popupSharedProps = {
1049
1049
  // whether to show popup
1050
1050
  show: Boolean,
@@ -1205,7 +1205,7 @@ const overlayProps = {
1205
1205
  lazyRender: truthProp,
1206
1206
  customStyle: Object
1207
1207
  };
1208
- var stdin_default$1F = defineComponent({
1208
+ var stdin_default$1E = defineComponent({
1209
1209
  name: name$1v,
1210
1210
  props: overlayProps,
1211
1211
  setup(props, {
@@ -1241,7 +1241,7 @@ var stdin_default$1F = defineComponent({
1241
1241
  });
1242
1242
  }
1243
1243
  });
1244
- const Overlay = withInstall(stdin_default$1F);
1244
+ const Overlay = withInstall(stdin_default$1E);
1245
1245
  const popupProps$2 = extend({}, popupSharedProps, {
1246
1246
  round: Boolean,
1247
1247
  position: makeStringProp("center"),
@@ -1255,7 +1255,7 @@ const popupProps$2 = extend({}, popupSharedProps, {
1255
1255
  safeAreaInsetBottom: Boolean
1256
1256
  });
1257
1257
  const [name$1u, bem$1p] = createNamespace("popup");
1258
- var stdin_default$1E = defineComponent({
1258
+ var stdin_default$1D = defineComponent({
1259
1259
  name: name$1u,
1260
1260
  inheritAttrs: false,
1261
1261
  props: popupProps$2,
@@ -1433,7 +1433,7 @@ var stdin_default$1E = defineComponent({
1433
1433
  };
1434
1434
  }
1435
1435
  });
1436
- const Popup = withInstall(stdin_default$1E);
1436
+ const Popup = withInstall(stdin_default$1D);
1437
1437
  const [name$1t, bem$1o] = createNamespace("action-sheet");
1438
1438
  const actionSheetProps = extend({}, popupSharedProps, {
1439
1439
  title: String,
@@ -1448,7 +1448,7 @@ const actionSheetProps = extend({}, popupSharedProps, {
1448
1448
  safeAreaInsetBottom: truthProp
1449
1449
  });
1450
1450
  const popupInheritKeys$2 = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
1451
- var stdin_default$1D = defineComponent({
1451
+ var stdin_default$1C = defineComponent({
1452
1452
  name: name$1t,
1453
1453
  props: actionSheetProps,
1454
1454
  emits: ["select", "cancel", "update:show"],
@@ -1555,7 +1555,7 @@ var stdin_default$1D = defineComponent({
1555
1555
  });
1556
1556
  }
1557
1557
  });
1558
- const ActionSheet = withInstall(stdin_default$1D);
1558
+ const ActionSheet = withInstall(stdin_default$1C);
1559
1559
  const [name$1s, bem$1n, t$j] = createNamespace("picker");
1560
1560
  const getFirstEnabledOption = (options) => options.find((option) => !option.disabled) || options[0];
1561
1561
  function getColumnsType(columns, fields) {
@@ -1627,7 +1627,7 @@ const MOMENTUM_TIME = 300;
1627
1627
  const MOMENTUM_DISTANCE = 15;
1628
1628
  const [name$1r, bem$1m] = createNamespace("picker-column");
1629
1629
  const PICKER_KEY = Symbol(name$1r);
1630
- var stdin_default$1C = defineComponent({
1630
+ var stdin_default$1B = defineComponent({
1631
1631
  name: name$1r,
1632
1632
  props: {
1633
1633
  value: numericProp,
@@ -1639,7 +1639,7 @@ var stdin_default$1C = defineComponent({
1639
1639
  swipeDuration: makeRequiredProp(numericProp),
1640
1640
  visibleOptionNum: makeRequiredProp(numericProp)
1641
1641
  },
1642
- emits: ["change", "clickOption"],
1642
+ emits: ["change", "clickOption", "scrollInto"],
1643
1643
  setup(props, {
1644
1644
  emit,
1645
1645
  slots
@@ -1683,6 +1683,7 @@ var stdin_default$1C = defineComponent({
1683
1683
  emit("clickOption", props.options[index]);
1684
1684
  };
1685
1685
  const getIndexByOffset = (offset) => clamp(Math.round(-offset / props.optionHeight), 0, count() - 1);
1686
+ const currentIndex = computed(() => getIndexByOffset(currentOffset.value));
1686
1687
  const momentum = (distance, duration) => {
1687
1688
  const speed = Math.abs(distance / duration);
1688
1689
  distance = currentOffset.value + speed / 3e-3 * (distance < 0 ? -1 : 1);
@@ -1722,11 +1723,16 @@ var stdin_default$1C = defineComponent({
1722
1723
  moving = true;
1723
1724
  preventDefault(event, true);
1724
1725
  }
1725
- currentOffset.value = clamp(startOffset + touch.deltaY.value, -(count() * props.optionHeight), props.optionHeight);
1726
+ const newOffset = clamp(startOffset + touch.deltaY.value, -(count() * props.optionHeight), props.optionHeight);
1727
+ const newIndex = getIndexByOffset(newOffset);
1728
+ if (newIndex !== currentIndex.value) {
1729
+ emit("scrollInto", props.options[newIndex]);
1730
+ }
1731
+ currentOffset.value = newOffset;
1726
1732
  const now = Date.now();
1727
1733
  if (now - touchStartTime > MOMENTUM_TIME) {
1728
1734
  touchStartTime = now;
1729
- momentumOffset = currentOffset.value;
1735
+ momentumOffset = newOffset;
1730
1736
  }
1731
1737
  };
1732
1738
  const onTouchEnd = () => {
@@ -1813,7 +1819,7 @@ const pickerToolbarProps = {
1813
1819
  };
1814
1820
  const pickerToolbarSlots = ["cancel", "confirm", "title", "toolbar"];
1815
1821
  const pickerToolbarPropKeys = Object.keys(pickerToolbarProps);
1816
- var stdin_default$1B = defineComponent({
1822
+ var stdin_default$1A = defineComponent({
1817
1823
  name: name$1q,
1818
1824
  props: pickerToolbarProps,
1819
1825
  emits: ["confirm", "cancel"],
@@ -1942,7 +1948,7 @@ const stickyProps = {
1942
1948
  offsetTop: makeNumericProp(0),
1943
1949
  offsetBottom: makeNumericProp(0)
1944
1950
  };
1945
- var stdin_default$1A = defineComponent({
1951
+ var stdin_default$1z = defineComponent({
1946
1952
  name: name$1p,
1947
1953
  props: stickyProps,
1948
1954
  emits: ["scroll", "change"],
@@ -1960,8 +1966,12 @@ var stdin_default$1A = defineComponent({
1960
1966
  // root height
1961
1967
  transform: 0
1962
1968
  });
1969
+ const isReset = ref(false);
1963
1970
  const offset = computed(() => unitToPx(props.position === "top" ? props.offsetTop : props.offsetBottom));
1964
1971
  const rootStyle = computed(() => {
1972
+ if (isReset.value) {
1973
+ return;
1974
+ }
1965
1975
  const {
1966
1976
  fixed,
1967
1977
  height,
@@ -1975,7 +1985,7 @@ var stdin_default$1A = defineComponent({
1975
1985
  }
1976
1986
  });
1977
1987
  const stickyStyle = computed(() => {
1978
- if (!state.fixed) {
1988
+ if (!state.fixed || isReset.value) {
1979
1989
  return;
1980
1990
  }
1981
1991
  const style = extend(getZIndexStyle(props.zIndex), {
@@ -2034,6 +2044,18 @@ var stdin_default$1A = defineComponent({
2034
2044
  passive: true
2035
2045
  });
2036
2046
  useVisibilityChange(root, onScroll);
2047
+ watch([windowWidth, windowHeight], () => {
2048
+ if (!root.value || isHidden(root) || !state.fixed) {
2049
+ return;
2050
+ }
2051
+ isReset.value = true;
2052
+ nextTick(() => {
2053
+ const rootRect = useRect(root);
2054
+ state.width = rootRect.width;
2055
+ state.height = rootRect.height;
2056
+ isReset.value = false;
2057
+ });
2058
+ });
2037
2059
  return () => {
2038
2060
  var _a;
2039
2061
  return createVNode("div", {
@@ -2041,98 +2063,15 @@ var stdin_default$1A = defineComponent({
2041
2063
  "style": rootStyle.value
2042
2064
  }, [createVNode("div", {
2043
2065
  "class": bem$1l({
2044
- fixed: state.fixed
2066
+ fixed: state.fixed && !isReset.value
2045
2067
  }),
2046
2068
  "style": stickyStyle.value
2047
2069
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
2048
2070
  };
2049
2071
  }
2050
2072
  });
2051
- const Sticky = withInstall(stdin_default$1A);
2052
- const [name$1o, bem$1k] = createNamespace("tab");
2053
- var stdin_default$1z = defineComponent({
2054
- name: name$1o,
2055
- props: {
2056
- id: String,
2057
- dot: Boolean,
2058
- type: String,
2059
- color: String,
2060
- title: String,
2061
- badge: numericProp,
2062
- shrink: Boolean,
2063
- isActive: Boolean,
2064
- disabled: Boolean,
2065
- controls: String,
2066
- scrollable: Boolean,
2067
- activeColor: String,
2068
- inactiveColor: String,
2069
- showZeroBadge: truthProp
2070
- },
2071
- setup(props, {
2072
- slots
2073
- }) {
2074
- const style = computed(() => {
2075
- const style2 = {};
2076
- const {
2077
- type,
2078
- color,
2079
- disabled,
2080
- isActive,
2081
- activeColor,
2082
- inactiveColor
2083
- } = props;
2084
- const isCard = type === "card";
2085
- if (color && isCard) {
2086
- style2.borderColor = color;
2087
- if (!disabled) {
2088
- if (isActive) {
2089
- style2.backgroundColor = color;
2090
- } else {
2091
- style2.color = color;
2092
- }
2093
- }
2094
- }
2095
- const titleColor = isActive ? activeColor : inactiveColor;
2096
- if (titleColor) {
2097
- style2.color = titleColor;
2098
- }
2099
- return style2;
2100
- });
2101
- const renderText = () => {
2102
- const Text2 = createVNode("span", {
2103
- "class": bem$1k("text", {
2104
- ellipsis: !props.scrollable
2105
- })
2106
- }, [slots.title ? slots.title() : props.title]);
2107
- if (props.dot || isDef(props.badge) && props.badge !== "") {
2108
- return createVNode(Badge, {
2109
- "dot": props.dot,
2110
- "content": props.badge,
2111
- "showZero": props.showZeroBadge
2112
- }, {
2113
- default: () => [Text2]
2114
- });
2115
- }
2116
- return Text2;
2117
- };
2118
- return () => createVNode("div", {
2119
- "id": props.id,
2120
- "role": "tab",
2121
- "class": [bem$1k([props.type, {
2122
- grow: props.scrollable && !props.shrink,
2123
- shrink: props.shrink,
2124
- active: props.isActive,
2125
- disabled: props.disabled
2126
- }])],
2127
- "style": style.value,
2128
- "tabindex": props.disabled ? void 0 : props.isActive ? 0 : -1,
2129
- "aria-selected": props.isActive,
2130
- "aria-disabled": props.disabled || void 0,
2131
- "aria-controls": props.controls
2132
- }, [renderText()]);
2133
- }
2134
- });
2135
- const [name$1n, bem$1j] = createNamespace("swipe");
2073
+ const Sticky = withInstall(stdin_default$1z);
2074
+ const [name$1o, bem$1k] = createNamespace("swipe");
2136
2075
  const swipeProps = {
2137
2076
  loop: truthProp,
2138
2077
  width: numericProp,
@@ -2147,9 +2086,9 @@ const swipeProps = {
2147
2086
  showIndicators: truthProp,
2148
2087
  stopPropagation: truthProp
2149
2088
  };
2150
- const SWIPE_KEY = Symbol(name$1n);
2089
+ const SWIPE_KEY = Symbol(name$1o);
2151
2090
  var stdin_default$1y = defineComponent({
2152
- name: name$1n,
2091
+ name: name$1o,
2153
2092
  props: swipeProps,
2154
2093
  emits: ["change", "dragStart", "dragEnd"],
2155
2094
  setup(props, {
@@ -2427,7 +2366,7 @@ var stdin_default$1y = defineComponent({
2427
2366
  } : void 0;
2428
2367
  return createVNode("i", {
2429
2368
  "style": style,
2430
- "class": bem$1j("indicator", {
2369
+ "class": bem$1k("indicator", {
2431
2370
  active
2432
2371
  })
2433
2372
  }, null);
@@ -2441,7 +2380,7 @@ var stdin_default$1y = defineComponent({
2441
2380
  }
2442
2381
  if (props.showIndicators && count.value > 1) {
2443
2382
  return createVNode("div", {
2444
- "class": bem$1j("indicators", {
2383
+ "class": bem$1k("indicators", {
2445
2384
  vertical: props.vertical
2446
2385
  })
2447
2386
  }, [Array(count.value).fill("").map(renderDot)]);
@@ -2483,11 +2422,11 @@ var stdin_default$1y = defineComponent({
2483
2422
  var _a;
2484
2423
  return createVNode("div", {
2485
2424
  "ref": root,
2486
- "class": bem$1j()
2425
+ "class": bem$1k()
2487
2426
  }, [createVNode("div", {
2488
2427
  "ref": track,
2489
2428
  "style": trackStyle.value,
2490
- "class": bem$1j("track", {
2429
+ "class": bem$1k("track", {
2491
2430
  vertical: props.vertical
2492
2431
  }),
2493
2432
  "onTouchstartPassive": onTouchStart,
@@ -2498,9 +2437,9 @@ var stdin_default$1y = defineComponent({
2498
2437
  }
2499
2438
  });
2500
2439
  const Swipe = withInstall(stdin_default$1y);
2501
- const [name$1m, bem$1i] = createNamespace("tabs");
2440
+ const [name$1n, bem$1j] = createNamespace("tabs");
2502
2441
  var stdin_default$1x = defineComponent({
2503
- name: name$1m,
2442
+ name: name$1n,
2504
2443
  props: {
2505
2444
  count: makeRequiredProp(Number),
2506
2445
  inited: Boolean,
@@ -2524,7 +2463,7 @@ var stdin_default$1x = defineComponent({
2524
2463
  return createVNode(Swipe, {
2525
2464
  "ref": swipeRef,
2526
2465
  "loop": false,
2527
- "class": bem$1i("track"),
2466
+ "class": bem$1j("track"),
2528
2467
  "duration": +props.duration * 1e3,
2529
2468
  "touchable": props.swipeable,
2530
2469
  "lazyRender": props.lazyRender,
@@ -2552,13 +2491,13 @@ var stdin_default$1x = defineComponent({
2552
2491
  swipeRef
2553
2492
  });
2554
2493
  return () => createVNode("div", {
2555
- "class": bem$1i("content", {
2494
+ "class": bem$1j("content", {
2556
2495
  animated: props.animated || props.swipeable
2557
2496
  })
2558
2497
  }, [renderChildren()]);
2559
2498
  }
2560
2499
  });
2561
- const [name$1l, bem$1h] = createNamespace("tabs");
2500
+ const [name$1m, bem$1i] = createNamespace("tabs");
2562
2501
  const tabsProps = {
2563
2502
  type: makeStringProp("line"),
2564
2503
  color: String,
@@ -2581,9 +2520,9 @@ const tabsProps = {
2581
2520
  titleActiveColor: String,
2582
2521
  titleInactiveColor: String
2583
2522
  };
2584
- const TABS_KEY = Symbol(name$1l);
2523
+ const TABS_KEY = Symbol(name$1m);
2585
2524
  var stdin_default$1w = defineComponent({
2586
- name: name$1l,
2525
+ name: name$1m,
2587
2526
  props: tabsProps,
2588
2527
  emits: ["change", "scroll", "rendered", "clickTab", "update:active"],
2589
2528
  setup(props, {
@@ -2772,28 +2711,10 @@ var stdin_default$1w = defineComponent({
2772
2711
  setCurrentIndex(index);
2773
2712
  }
2774
2713
  };
2775
- const renderNav = () => children.map((item, index) => createVNode(stdin_default$1z, mergeProps({
2776
- "key": item.id,
2777
- "id": `${id}-${index}`,
2778
- "ref": setTitleRefs(index),
2779
- "type": props.type,
2780
- "color": props.color,
2781
- "style": item.titleStyle,
2782
- "class": item.titleClass,
2783
- "shrink": props.shrink,
2784
- "isActive": index === state.currentIndex,
2785
- "controls": item.id,
2786
- "scrollable": scrollable.value,
2787
- "activeColor": props.titleActiveColor,
2788
- "inactiveColor": props.titleInactiveColor,
2789
- "onClick": (event) => onClickTab(item, index, event)
2790
- }, pick(item, ["dot", "badge", "title", "disabled", "showZeroBadge"])), {
2791
- title: item.$slots.title
2792
- }));
2793
2714
  const renderLine = () => {
2794
2715
  if (props.type === "line" && children.length) {
2795
2716
  return createVNode("div", {
2796
- "class": bem$1h("line"),
2717
+ "class": bem$1i("line"),
2797
2718
  "style": state.lineStyle
2798
2719
  }, null);
2799
2720
  }
@@ -2807,19 +2728,19 @@ var stdin_default$1w = defineComponent({
2807
2728
  } = props;
2808
2729
  const Header = [createVNode("div", {
2809
2730
  "ref": sticky ? void 0 : wrapRef,
2810
- "class": [bem$1h("wrap"), {
2731
+ "class": [bem$1i("wrap"), {
2811
2732
  [BORDER_TOP_BOTTOM]: type === "line" && border
2812
2733
  }]
2813
2734
  }, [createVNode("div", {
2814
2735
  "ref": navRef,
2815
2736
  "role": "tablist",
2816
- "class": bem$1h("nav", [type, {
2737
+ "class": bem$1i("nav", [type, {
2817
2738
  shrink: props.shrink,
2818
2739
  complete: scrollable.value
2819
2740
  }]),
2820
2741
  "style": navStyle.value,
2821
2742
  "aria-orientation": "horizontal"
2822
- }, [(_a = slots["nav-left"]) == null ? void 0 : _a.call(slots), renderNav(), renderLine(), (_b = slots["nav-right"]) == null ? void 0 : _b.call(slots)])]), (_c = slots["nav-bottom"]) == null ? void 0 : _c.call(slots)];
2743
+ }, [(_a = slots["nav-left"]) == null ? void 0 : _a.call(slots), children.map((item) => item.renderTitle(onClickTab)), renderLine(), (_b = slots["nav-right"]) == null ? void 0 : _b.call(slots)])]), (_c = slots["nav-bottom"]) == null ? void 0 : _c.call(slots)];
2823
2744
  if (sticky) {
2824
2745
  return createVNode("div", {
2825
2746
  "ref": wrapRef
@@ -2827,7 +2748,16 @@ var stdin_default$1w = defineComponent({
2827
2748
  }
2828
2749
  return Header;
2829
2750
  };
2830
- watch([() => props.color, windowWidth], setLine);
2751
+ const resize = () => {
2752
+ setLine();
2753
+ nextTick(() => {
2754
+ var _a, _b;
2755
+ scrollIntoView(true);
2756
+ (_b = (_a = contentRef.value) == null ? void 0 : _a.swipeRef.value) == null ? void 0 : _b.resize();
2757
+ });
2758
+ };
2759
+ watch(() => [props.color, props.duration, props.lineWidth, props.lineHeight], setLine);
2760
+ watch(windowWidth, resize);
2831
2761
  watch(() => props.active, (value) => {
2832
2762
  if (value !== currentName.value) {
2833
2763
  setCurrentIndexByName(value);
@@ -2853,13 +2783,6 @@ var stdin_default$1w = defineComponent({
2853
2783
  });
2854
2784
  };
2855
2785
  const onRendered = (name2, title) => emit("rendered", name2, title);
2856
- const resize = () => {
2857
- setLine();
2858
- nextTick(() => {
2859
- var _a, _b;
2860
- return (_b = (_a = contentRef.value) == null ? void 0 : _a.swipeRef.value) == null ? void 0 : _b.resize();
2861
- });
2862
- };
2863
2786
  useExpose({
2864
2787
  resize,
2865
2788
  scrollTo
@@ -2876,13 +2799,15 @@ var stdin_default$1w = defineComponent({
2876
2799
  id,
2877
2800
  props,
2878
2801
  setLine,
2802
+ scrollable,
2879
2803
  onRendered,
2880
2804
  currentName,
2805
+ setTitleRefs,
2881
2806
  scrollIntoView
2882
2807
  });
2883
2808
  return () => createVNode("div", {
2884
2809
  "ref": root,
2885
- "class": bem$1h([props.type])
2810
+ "class": bem$1i([props.type])
2886
2811
  }, [props.sticky ? createVNode(Sticky, {
2887
2812
  "container": root.value,
2888
2813
  "offsetTop": offsetTopPx.value,
@@ -2909,6 +2834,89 @@ var stdin_default$1w = defineComponent({
2909
2834
  });
2910
2835
  const TAB_STATUS_KEY = Symbol();
2911
2836
  const useTabStatus = () => inject(TAB_STATUS_KEY, null);
2837
+ const [name$1l, bem$1h] = createNamespace("tab");
2838
+ const TabTitle = defineComponent({
2839
+ name: name$1l,
2840
+ props: {
2841
+ id: String,
2842
+ dot: Boolean,
2843
+ type: String,
2844
+ color: String,
2845
+ title: String,
2846
+ badge: numericProp,
2847
+ shrink: Boolean,
2848
+ isActive: Boolean,
2849
+ disabled: Boolean,
2850
+ controls: String,
2851
+ scrollable: Boolean,
2852
+ activeColor: String,
2853
+ inactiveColor: String,
2854
+ showZeroBadge: truthProp
2855
+ },
2856
+ setup(props, {
2857
+ slots
2858
+ }) {
2859
+ const style = computed(() => {
2860
+ const style2 = {};
2861
+ const {
2862
+ type,
2863
+ color,
2864
+ disabled,
2865
+ isActive,
2866
+ activeColor,
2867
+ inactiveColor
2868
+ } = props;
2869
+ const isCard = type === "card";
2870
+ if (color && isCard) {
2871
+ style2.borderColor = color;
2872
+ if (!disabled) {
2873
+ if (isActive) {
2874
+ style2.backgroundColor = color;
2875
+ } else {
2876
+ style2.color = color;
2877
+ }
2878
+ }
2879
+ }
2880
+ const titleColor = isActive ? activeColor : inactiveColor;
2881
+ if (titleColor) {
2882
+ style2.color = titleColor;
2883
+ }
2884
+ return style2;
2885
+ });
2886
+ const renderText = () => {
2887
+ const Text2 = createVNode("span", {
2888
+ "class": bem$1h("text", {
2889
+ ellipsis: !props.scrollable
2890
+ })
2891
+ }, [slots.title ? slots.title() : props.title]);
2892
+ if (props.dot || isDef(props.badge) && props.badge !== "") {
2893
+ return createVNode(Badge, {
2894
+ "dot": props.dot,
2895
+ "content": props.badge,
2896
+ "showZero": props.showZeroBadge
2897
+ }, {
2898
+ default: () => [Text2]
2899
+ });
2900
+ }
2901
+ return Text2;
2902
+ };
2903
+ return () => createVNode("div", {
2904
+ "id": props.id,
2905
+ "role": "tab",
2906
+ "class": [bem$1h([props.type, {
2907
+ grow: props.scrollable && !props.shrink,
2908
+ shrink: props.shrink,
2909
+ active: props.isActive,
2910
+ disabled: props.disabled
2911
+ }])],
2912
+ "style": style.value,
2913
+ "tabindex": props.disabled ? void 0 : props.isActive ? 0 : -1,
2914
+ "aria-selected": props.isActive,
2915
+ "aria-disabled": props.disabled || void 0,
2916
+ "aria-controls": props.controls
2917
+ }, [renderText()]);
2918
+ }
2919
+ });
2912
2920
  const [name$1k, bem$1g] = createNamespace("swipe-item");
2913
2921
  var stdin_default$1v = defineComponent({
2914
2922
  name: name$1k,
@@ -3002,6 +3010,7 @@ var stdin_default$1u = defineComponent({
3002
3010
  }) {
3003
3011
  const id = useId();
3004
3012
  const inited = ref(false);
3013
+ const instance2 = getCurrentInstance();
3005
3014
  const {
3006
3015
  parent,
3007
3016
  index
@@ -3031,6 +3040,21 @@ var stdin_default$1u = defineComponent({
3031
3040
  }
3032
3041
  return isActive;
3033
3042
  });
3043
+ const renderTitle = (onClickTab) => createVNode(TabTitle, mergeProps({
3044
+ "key": id,
3045
+ "id": `${parent.id}-${index.value}`,
3046
+ "ref": parent.setTitleRefs(index.value),
3047
+ "style": props.titleStyle,
3048
+ "class": props.titleClass,
3049
+ "isActive": active.value,
3050
+ "controls": id,
3051
+ "scrollable": parent.scrollable.value,
3052
+ "activeColor": parent.props.titleActiveColor,
3053
+ "inactiveColor": parent.props.titleInactiveColor,
3054
+ "onClick": (event) => onClickTab(instance2.proxy, index.value, event)
3055
+ }, pick(parent.props, ["type", "color", "shrink"]), pick(props, ["dot", "badge", "title", "disabled", "showZeroBadge"])), {
3056
+ title: slots.title
3057
+ });
3034
3058
  const hasInactiveClass = ref(!active.value);
3035
3059
  watch(active, (val) => {
3036
3060
  if (val) {
@@ -3046,6 +3070,10 @@ var stdin_default$1u = defineComponent({
3046
3070
  parent.scrollIntoView();
3047
3071
  });
3048
3072
  provide(TAB_STATUS_KEY, active);
3073
+ useExpose({
3074
+ id,
3075
+ renderTitle
3076
+ });
3049
3077
  return () => {
3050
3078
  var _a;
3051
3079
  const label = `${parent.id}-${index.value}`;
@@ -3080,9 +3108,6 @@ var stdin_default$1u = defineComponent({
3080
3108
  }
3081
3109
  const shouldRender = inited.value || scrollspy || !lazyRender;
3082
3110
  const Content = shouldRender ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null;
3083
- useExpose({
3084
- id
3085
- });
3086
3111
  return withDirectives(createVNode("div", {
3087
3112
  "id": id,
3088
3113
  "role": "tabpanel",
@@ -3130,7 +3155,7 @@ var stdin_default$1t = defineComponent({
3130
3155
  const confirmButtonText = showNextButton() ? props.nextStepText : props.confirmButtonText;
3131
3156
  return createVNode("div", {
3132
3157
  "class": bem$1e()
3133
- }, [createVNode(stdin_default$1B, {
3158
+ }, [createVNode(stdin_default$1A, {
3134
3159
  "title": props.title,
3135
3160
  "cancelButtonText": props.cancelButtonText,
3136
3161
  "confirmButtonText": confirmButtonText,
@@ -3172,7 +3197,7 @@ const pickerProps = extend({}, pickerSharedProps, {
3172
3197
  var stdin_default$1s = defineComponent({
3173
3198
  name: name$1s,
3174
3199
  props: pickerProps,
3175
- emits: ["confirm", "cancel", "change", "clickOption", "update:modelValue"],
3200
+ emits: ["confirm", "cancel", "change", "scrollInto", "clickOption", "update:modelValue"],
3176
3201
  setup(props, {
3177
3202
  emit,
3178
3203
  slots
@@ -3234,10 +3259,14 @@ var stdin_default$1s = defineComponent({
3234
3259
  }, getEventParams()));
3235
3260
  });
3236
3261
  };
3237
- const onClickOption = (currentOption, columnIndex) => emit("clickOption", extend({
3238
- columnIndex,
3239
- currentOption
3240
- }, getEventParams()));
3262
+ const onClickOption = (currentOption, columnIndex) => {
3263
+ const params = {
3264
+ columnIndex,
3265
+ currentOption
3266
+ };
3267
+ emit("clickOption", extend(getEventParams(), params));
3268
+ emit("scrollInto", params);
3269
+ };
3241
3270
  const confirm = () => {
3242
3271
  children.forEach((child) => child.stopMomentum());
3243
3272
  const params = getEventParams();
@@ -3247,7 +3276,7 @@ var stdin_default$1s = defineComponent({
3247
3276
  return params;
3248
3277
  };
3249
3278
  const cancel = () => emit("cancel", getEventParams());
3250
- const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => createVNode(stdin_default$1C, {
3279
+ const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => createVNode(stdin_default$1B, {
3251
3280
  "value": selectedValues.value[columnIndex],
3252
3281
  "fields": fields.value,
3253
3282
  "options": options,
@@ -3257,7 +3286,13 @@ var stdin_default$1s = defineComponent({
3257
3286
  "swipeDuration": props.swipeDuration,
3258
3287
  "visibleOptionNum": props.visibleOptionNum,
3259
3288
  "onChange": (value) => onChange(value, columnIndex),
3260
- "onClickOption": (option) => onClickOption(option, columnIndex)
3289
+ "onClickOption": (option) => onClickOption(option, columnIndex),
3290
+ "onScrollInto": (option) => {
3291
+ emit("scrollInto", {
3292
+ currentOption: option,
3293
+ columnIndex
3294
+ });
3295
+ }
3261
3296
  }, {
3262
3297
  option: slots.option
3263
3298
  }));
@@ -3291,7 +3326,7 @@ var stdin_default$1s = defineComponent({
3291
3326
  };
3292
3327
  const renderToolbar = () => {
3293
3328
  if (props.showToolbar && !parent) {
3294
- return createVNode(stdin_default$1B, mergeProps(pick(props, pickerToolbarPropKeys), {
3329
+ return createVNode(stdin_default$1A, mergeProps(pick(props, pickerToolbarPropKeys), {
3295
3330
  "onConfirm": confirm,
3296
3331
  "onCancel": cancel
3297
3332
  }), pick(slots, pickerToolbarSlots));
@@ -7755,7 +7790,7 @@ var stdin_default$_ = defineComponent({
7755
7790
  }
7756
7791
  });
7757
7792
  const CollapseItem = withInstall(stdin_default$_);
7758
- const ConfigProvider = withInstall(stdin_default$1L);
7793
+ const ConfigProvider = withInstall(stdin_default$1K);
7759
7794
  const [name$Q, bem$P, t$d] = createNamespace("contact-card");
7760
7795
  const contactCardProps = {
7761
7796
  tel: String,
@@ -11145,7 +11180,9 @@ const paginationProps = {
11145
11180
  totalItems: makeNumericProp(0),
11146
11181
  showPageSize: makeNumericProp(5),
11147
11182
  itemsPerPage: makeNumericProp(10),
11148
- forceEllipses: Boolean
11183
+ forceEllipses: Boolean,
11184
+ showPrevButton: truthProp,
11185
+ showNextButton: truthProp
11149
11186
  };
11150
11187
  var stdin_default$A = defineComponent({
11151
11188
  name: name$s,
@@ -11215,8 +11252,12 @@ var stdin_default$A = defineComponent({
11215
11252
  const renderPrevButton = () => {
11216
11253
  const {
11217
11254
  mode,
11218
- modelValue
11255
+ modelValue,
11256
+ showPrevButton
11219
11257
  } = props;
11258
+ if (!showPrevButton) {
11259
+ return;
11260
+ }
11220
11261
  const slot = slots["prev-text"];
11221
11262
  const disabled = modelValue === 1;
11222
11263
  return createVNode("li", {
@@ -11234,8 +11275,12 @@ var stdin_default$A = defineComponent({
11234
11275
  const renderNextButton = () => {
11235
11276
  const {
11236
11277
  mode,
11237
- modelValue
11278
+ modelValue,
11279
+ showNextButton
11238
11280
  } = props;
11281
+ if (!showNextButton) {
11282
+ return;
11283
+ }
11239
11284
  const slot = slots["next-text"];
11240
11285
  const disabled = modelValue === count.value;
11241
11286
  return createVNode("li", {
@@ -14387,6 +14432,7 @@ var stdin_default$4 = defineComponent({
14387
14432
  if (props.image && !slots.content) {
14388
14433
  return createVNode("image", {
14389
14434
  "href": imageBase64.value,
14435
+ "xlink:href": imageBase64.value,
14390
14436
  "x": "0",
14391
14437
  "y": "0",
14392
14438
  "width": props.width,
@@ -14415,6 +14461,7 @@ var stdin_default$4 = defineComponent({
14415
14461
  "width": svgWidth,
14416
14462
  "height": svgHeight,
14417
14463
  "xmlns": "http://www.w3.org/2000/svg",
14464
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
14418
14465
  "style": {
14419
14466
  padding: `0 ${props.gapX}px ${props.gapY}px 0`,
14420
14467
  opacity: props.opacity
@@ -14437,7 +14484,7 @@ var stdin_default$4 = defineComponent({
14437
14484
  };
14438
14485
  const makeSvgToBlobUrl = (svgStr) => {
14439
14486
  const svgBlob = new Blob([svgStr], {
14440
- type: "image/svg+xml;charset=utf-8"
14487
+ type: "image/svg+xml"
14441
14488
  });
14442
14489
  return URL.createObjectURL(svgBlob);
14443
14490
  };
@@ -15355,7 +15402,7 @@ const Lazyload = {
15355
15402
  });
15356
15403
  }
15357
15404
  };
15358
- const version = "4.2.0";
15405
+ const version = "4.2.1";
15359
15406
  function install(app) {
15360
15407
  const components = [
15361
15408
  ActionBar,