vant 4.9.21 → 4.9.23

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 (276) hide show
  1. package/README.md +2 -4
  2. package/es/action-bar-button/index.css +1 -1
  3. package/es/action-bar-icon/ActionBarIcon.d.ts +4 -0
  4. package/es/action-bar-icon/ActionBarIcon.mjs +12 -4
  5. package/es/action-bar-icon/index.css +1 -1
  6. package/es/action-bar-icon/index.d.ts +3 -0
  7. package/es/action-sheet/ActionSheet.d.ts +1 -1
  8. package/es/action-sheet/index.d.ts +1 -1
  9. package/es/address-list/AddressListItem.d.ts +1 -1
  10. package/es/area/Area.d.ts +1 -1
  11. package/es/area/index.d.ts +1 -1
  12. package/es/calendar/index.css +1 -1
  13. package/es/composables/on-popup-reopen.mjs +1 -1
  14. package/es/composables/use-tab-status.mjs +2 -2
  15. package/es/composables/use-touch.mjs +4 -4
  16. package/es/date-picker/DatePicker.d.ts +1 -1
  17. package/es/date-picker/index.d.ts +1 -1
  18. package/es/dialog/Dialog.d.ts +1 -1
  19. package/es/dialog/index.css +1 -1
  20. package/es/dialog/index.d.ts +1 -1
  21. package/es/field/Field.d.ts +5 -5
  22. package/es/field/Field.mjs +5 -4
  23. package/es/field/index.d.ts +3 -3
  24. package/es/field/types.d.ts +1 -0
  25. package/es/floating-panel/FloatingPanel.d.ts +26 -0
  26. package/es/floating-panel/FloatingPanel.mjs +26 -2
  27. package/es/floating-panel/index.css +1 -1
  28. package/es/floating-panel/index.d.ts +18 -0
  29. package/es/grid/Grid.d.ts +1 -1
  30. package/es/grid/index.d.ts +1 -1
  31. package/es/index.d.ts +1 -1
  32. package/es/index.mjs +1 -1
  33. package/es/list/List.d.ts +13 -3
  34. package/es/list/List.mjs +5 -2
  35. package/es/list/index.d.ts +9 -2
  36. package/es/locale/lang/ar-SA.d.ts +1 -0
  37. package/es/locale/lang/ar-SA.mjs +10 -1
  38. package/es/locale/lang/bg-BG.d.ts +1 -0
  39. package/es/locale/lang/bg-BG.mjs +1 -0
  40. package/es/locale/lang/bn-BD.d.ts +1 -0
  41. package/es/locale/lang/bn-BD.mjs +1 -0
  42. package/es/locale/lang/da-DK.d.ts +1 -0
  43. package/es/locale/lang/da-DK.mjs +1 -0
  44. package/es/locale/lang/de-DE-formal.d.ts +1 -0
  45. package/es/locale/lang/de-DE-formal.mjs +1 -0
  46. package/es/locale/lang/de-DE.d.ts +1 -0
  47. package/es/locale/lang/de-DE.mjs +1 -0
  48. package/es/locale/lang/el-GR.d.ts +1 -0
  49. package/es/locale/lang/el-GR.mjs +1 -0
  50. package/es/locale/lang/en-US.d.ts +1 -0
  51. package/es/locale/lang/en-US.mjs +1 -0
  52. package/es/locale/lang/eo-EO.d.ts +1 -0
  53. package/es/locale/lang/eo-EO.mjs +1 -0
  54. package/es/locale/lang/es-ES.d.ts +1 -0
  55. package/es/locale/lang/es-ES.mjs +1 -0
  56. package/es/locale/lang/fa-IR.d.ts +1 -0
  57. package/es/locale/lang/fa-IR.mjs +1 -0
  58. package/es/locale/lang/fr-FR.d.ts +1 -0
  59. package/es/locale/lang/fr-FR.mjs +1 -0
  60. package/es/locale/lang/he-IL.d.ts +1 -0
  61. package/es/locale/lang/he-IL.mjs +1 -0
  62. package/es/locale/lang/hi-IN.d.ts +1 -0
  63. package/es/locale/lang/hi-IN.mjs +1 -0
  64. package/es/locale/lang/id-ID.d.ts +1 -0
  65. package/es/locale/lang/id-ID.mjs +1 -0
  66. package/es/locale/lang/is-IS.d.ts +1 -0
  67. package/es/locale/lang/is-IS.mjs +1 -0
  68. package/es/locale/lang/it-IT.d.ts +1 -0
  69. package/es/locale/lang/it-IT.mjs +1 -0
  70. package/es/locale/lang/ja-JP.d.ts +1 -0
  71. package/es/locale/lang/ja-JP.mjs +1 -0
  72. package/es/locale/lang/kk-KZ.d.ts +1 -0
  73. package/es/locale/lang/kk-KZ.mjs +1 -0
  74. package/es/locale/lang/km-KH.d.ts +1 -0
  75. package/es/locale/lang/km-KH.mjs +1 -0
  76. package/es/locale/lang/ko-KR.d.ts +1 -0
  77. package/es/locale/lang/ko-KR.mjs +1 -0
  78. package/es/locale/lang/la-LA.d.ts +1 -0
  79. package/es/locale/lang/la-LA.mjs +1 -0
  80. package/es/locale/lang/mm-MN.d.ts +1 -0
  81. package/es/locale/lang/mm-MN.mjs +1 -0
  82. package/es/locale/lang/nb-NO.d.ts +1 -0
  83. package/es/locale/lang/nb-NO.mjs +1 -0
  84. package/es/locale/lang/nl-NL.d.ts +1 -0
  85. package/es/locale/lang/nl-NL.mjs +1 -0
  86. package/es/locale/lang/pl-PL.d.ts +1 -0
  87. package/es/locale/lang/pl-PL.mjs +1 -0
  88. package/es/locale/lang/pt-BR.d.ts +1 -0
  89. package/es/locale/lang/pt-BR.mjs +1 -0
  90. package/es/locale/lang/ro-RO.d.ts +1 -0
  91. package/es/locale/lang/ro-RO.mjs +1 -0
  92. package/es/locale/lang/ru-RU.d.ts +1 -0
  93. package/es/locale/lang/ru-RU.mjs +1 -0
  94. package/es/locale/lang/sr-RS.d.ts +1 -0
  95. package/es/locale/lang/sr-RS.mjs +1 -0
  96. package/es/locale/lang/sv-SE.d.ts +1 -0
  97. package/es/locale/lang/sv-SE.mjs +1 -0
  98. package/es/locale/lang/th-TH.d.ts +1 -0
  99. package/es/locale/lang/th-TH.mjs +1 -0
  100. package/es/locale/lang/tr-TR.d.ts +1 -0
  101. package/es/locale/lang/tr-TR.mjs +1 -0
  102. package/es/locale/lang/uk-UA.d.ts +1 -0
  103. package/es/locale/lang/uk-UA.mjs +1 -0
  104. package/es/locale/lang/vi-VN.d.ts +1 -0
  105. package/es/locale/lang/vi-VN.mjs +1 -0
  106. package/es/locale/lang/zh-CN.d.ts +1 -0
  107. package/es/locale/lang/zh-CN.mjs +1 -0
  108. package/es/locale/lang/zh-HK.d.ts +1 -0
  109. package/es/locale/lang/zh-HK.mjs +1 -0
  110. package/es/locale/lang/zh-TW.d.ts +1 -0
  111. package/es/locale/lang/zh-TW.mjs +1 -0
  112. package/es/picker/Picker.d.ts +1 -1
  113. package/es/picker/index.d.ts +1 -1
  114. package/es/popup/index.d.ts +1 -0
  115. package/es/popup/index.mjs +7 -1
  116. package/es/progress/Progress.mjs +8 -4
  117. package/es/search/Search.d.ts +4 -4
  118. package/es/search/Search.mjs +1 -0
  119. package/es/search/index.d.ts +3 -3
  120. package/es/share-sheet/ShareSheet.d.ts +1 -1
  121. package/es/share-sheet/index.d.ts +1 -1
  122. package/es/signature/Signature.d.ts +16 -0
  123. package/es/signature/Signature.mjs +32 -1
  124. package/es/signature/index.d.ts +11 -0
  125. package/es/signature/types.d.ts +1 -0
  126. package/es/stepper/Stepper.mjs +3 -0
  127. package/es/swipe-cell/SwipeCell.d.ts +16 -0
  128. package/es/swipe-cell/SwipeCell.mjs +7 -2
  129. package/es/swipe-cell/index.d.ts +11 -0
  130. package/es/tabs/Tabs.d.ts +1 -1
  131. package/es/tabs/index.d.ts +1 -1
  132. package/es/time-picker/TimePicker.d.ts +1 -1
  133. package/es/time-picker/TimePicker.mjs +1 -1
  134. package/es/time-picker/index.d.ts +1 -1
  135. package/es/utils/constant.mjs +1 -1
  136. package/lib/action-bar-button/index.css +1 -1
  137. package/lib/action-bar-icon/ActionBarIcon.d.ts +4 -0
  138. package/lib/action-bar-icon/ActionBarIcon.js +12 -4
  139. package/lib/action-bar-icon/index.css +1 -1
  140. package/lib/action-bar-icon/index.d.ts +3 -0
  141. package/lib/action-sheet/ActionSheet.d.ts +1 -1
  142. package/lib/action-sheet/index.d.ts +1 -1
  143. package/lib/address-list/AddressListItem.d.ts +1 -1
  144. package/lib/area/Area.d.ts +1 -1
  145. package/lib/area/index.d.ts +1 -1
  146. package/lib/calendar/index.css +1 -1
  147. package/lib/composables/on-popup-reopen.js +1 -1
  148. package/lib/composables/use-tab-status.js +2 -2
  149. package/lib/composables/use-touch.js +4 -4
  150. package/lib/date-picker/DatePicker.d.ts +1 -1
  151. package/lib/date-picker/index.d.ts +1 -1
  152. package/lib/dialog/Dialog.d.ts +1 -1
  153. package/lib/dialog/index.css +1 -1
  154. package/lib/dialog/index.d.ts +1 -1
  155. package/lib/field/Field.d.ts +5 -5
  156. package/lib/field/Field.js +5 -4
  157. package/lib/field/index.d.ts +3 -3
  158. package/lib/field/types.d.ts +1 -0
  159. package/lib/floating-panel/FloatingPanel.d.ts +26 -0
  160. package/lib/floating-panel/FloatingPanel.js +26 -2
  161. package/lib/floating-panel/index.css +1 -1
  162. package/lib/floating-panel/index.d.ts +18 -0
  163. package/lib/grid/Grid.d.ts +1 -1
  164. package/lib/grid/index.d.ts +1 -1
  165. package/lib/index.css +1 -1
  166. package/lib/index.d.ts +1 -1
  167. package/lib/index.js +1 -1
  168. package/lib/list/List.d.ts +13 -3
  169. package/lib/list/List.js +5 -2
  170. package/lib/list/index.d.ts +9 -2
  171. package/lib/locale/lang/ar-SA.d.ts +1 -0
  172. package/lib/locale/lang/ar-SA.js +10 -1
  173. package/lib/locale/lang/bg-BG.d.ts +1 -0
  174. package/lib/locale/lang/bg-BG.js +1 -0
  175. package/lib/locale/lang/bn-BD.d.ts +1 -0
  176. package/lib/locale/lang/bn-BD.js +1 -0
  177. package/lib/locale/lang/da-DK.d.ts +1 -0
  178. package/lib/locale/lang/da-DK.js +1 -0
  179. package/lib/locale/lang/de-DE-formal.d.ts +1 -0
  180. package/lib/locale/lang/de-DE-formal.js +1 -0
  181. package/lib/locale/lang/de-DE.d.ts +1 -0
  182. package/lib/locale/lang/de-DE.js +1 -0
  183. package/lib/locale/lang/el-GR.d.ts +1 -0
  184. package/lib/locale/lang/el-GR.js +1 -0
  185. package/lib/locale/lang/en-US.d.ts +1 -0
  186. package/lib/locale/lang/en-US.js +1 -0
  187. package/lib/locale/lang/eo-EO.d.ts +1 -0
  188. package/lib/locale/lang/eo-EO.js +1 -0
  189. package/lib/locale/lang/es-ES.d.ts +1 -0
  190. package/lib/locale/lang/es-ES.js +1 -0
  191. package/lib/locale/lang/fa-IR.d.ts +1 -0
  192. package/lib/locale/lang/fa-IR.js +1 -0
  193. package/lib/locale/lang/fr-FR.d.ts +1 -0
  194. package/lib/locale/lang/fr-FR.js +1 -0
  195. package/lib/locale/lang/he-IL.d.ts +1 -0
  196. package/lib/locale/lang/he-IL.js +1 -0
  197. package/lib/locale/lang/hi-IN.d.ts +1 -0
  198. package/lib/locale/lang/hi-IN.js +1 -0
  199. package/lib/locale/lang/id-ID.d.ts +1 -0
  200. package/lib/locale/lang/id-ID.js +1 -0
  201. package/lib/locale/lang/is-IS.d.ts +1 -0
  202. package/lib/locale/lang/is-IS.js +1 -0
  203. package/lib/locale/lang/it-IT.d.ts +1 -0
  204. package/lib/locale/lang/it-IT.js +1 -0
  205. package/lib/locale/lang/ja-JP.d.ts +1 -0
  206. package/lib/locale/lang/ja-JP.js +1 -0
  207. package/lib/locale/lang/kk-KZ.d.ts +1 -0
  208. package/lib/locale/lang/kk-KZ.js +1 -0
  209. package/lib/locale/lang/km-KH.d.ts +1 -0
  210. package/lib/locale/lang/km-KH.js +1 -0
  211. package/lib/locale/lang/ko-KR.d.ts +1 -0
  212. package/lib/locale/lang/ko-KR.js +1 -0
  213. package/lib/locale/lang/la-LA.d.ts +1 -0
  214. package/lib/locale/lang/la-LA.js +1 -0
  215. package/lib/locale/lang/mm-MN.d.ts +1 -0
  216. package/lib/locale/lang/mm-MN.js +1 -0
  217. package/lib/locale/lang/nb-NO.d.ts +1 -0
  218. package/lib/locale/lang/nb-NO.js +1 -0
  219. package/lib/locale/lang/nl-NL.d.ts +1 -0
  220. package/lib/locale/lang/nl-NL.js +1 -0
  221. package/lib/locale/lang/pl-PL.d.ts +1 -0
  222. package/lib/locale/lang/pl-PL.js +1 -0
  223. package/lib/locale/lang/pt-BR.d.ts +1 -0
  224. package/lib/locale/lang/pt-BR.js +1 -0
  225. package/lib/locale/lang/ro-RO.d.ts +1 -0
  226. package/lib/locale/lang/ro-RO.js +1 -0
  227. package/lib/locale/lang/ru-RU.d.ts +1 -0
  228. package/lib/locale/lang/ru-RU.js +1 -0
  229. package/lib/locale/lang/sr-RS.d.ts +1 -0
  230. package/lib/locale/lang/sr-RS.js +1 -0
  231. package/lib/locale/lang/sv-SE.d.ts +1 -0
  232. package/lib/locale/lang/sv-SE.js +1 -0
  233. package/lib/locale/lang/th-TH.d.ts +1 -0
  234. package/lib/locale/lang/th-TH.js +1 -0
  235. package/lib/locale/lang/tr-TR.d.ts +1 -0
  236. package/lib/locale/lang/tr-TR.js +1 -0
  237. package/lib/locale/lang/uk-UA.d.ts +1 -0
  238. package/lib/locale/lang/uk-UA.js +1 -0
  239. package/lib/locale/lang/vi-VN.d.ts +1 -0
  240. package/lib/locale/lang/vi-VN.js +1 -0
  241. package/lib/locale/lang/zh-CN.d.ts +1 -0
  242. package/lib/locale/lang/zh-CN.js +1 -0
  243. package/lib/locale/lang/zh-HK.d.ts +1 -0
  244. package/lib/locale/lang/zh-HK.js +1 -0
  245. package/lib/locale/lang/zh-TW.d.ts +1 -0
  246. package/lib/locale/lang/zh-TW.js +1 -0
  247. package/lib/picker/Picker.d.ts +1 -1
  248. package/lib/picker/index.d.ts +1 -1
  249. package/lib/popup/index.d.ts +1 -0
  250. package/lib/popup/index.js +4 -1
  251. package/lib/progress/Progress.js +8 -4
  252. package/lib/search/Search.d.ts +4 -4
  253. package/lib/search/Search.js +1 -0
  254. package/lib/search/index.d.ts +3 -3
  255. package/lib/share-sheet/ShareSheet.d.ts +1 -1
  256. package/lib/share-sheet/index.d.ts +1 -1
  257. package/lib/signature/Signature.d.ts +16 -0
  258. package/lib/signature/Signature.js +32 -1
  259. package/lib/signature/index.d.ts +11 -0
  260. package/lib/signature/types.d.ts +1 -0
  261. package/lib/stepper/Stepper.js +3 -0
  262. package/lib/swipe-cell/SwipeCell.d.ts +16 -0
  263. package/lib/swipe-cell/SwipeCell.js +7 -2
  264. package/lib/swipe-cell/index.d.ts +11 -0
  265. package/lib/tabs/Tabs.d.ts +1 -1
  266. package/lib/tabs/index.d.ts +1 -1
  267. package/lib/time-picker/TimePicker.d.ts +1 -1
  268. package/lib/time-picker/TimePicker.js +1 -1
  269. package/lib/time-picker/index.d.ts +1 -1
  270. package/lib/utils/constant.js +1 -1
  271. package/lib/vant.cjs.js +108 -25
  272. package/lib/vant.es.js +108 -25
  273. package/lib/vant.js +118 -35
  274. package/lib/vant.min.js +3 -3
  275. package/lib/web-types.json +1 -1
  276. package/package.json +35 -35
@@ -99,8 +99,8 @@ export declare const Tabs: import("../utils").WithInstall<import("vue").DefineCo
99
99
  "onUpdate:active"?: ((...args: any[]) => any) | undefined;
100
100
  }>, {
101
101
  type: import("./types").TabsType;
102
- ellipsis: boolean;
103
102
  sticky: boolean;
103
+ ellipsis: boolean;
104
104
  border: boolean;
105
105
  active: string | number;
106
106
  duration: string | number;
@@ -222,8 +222,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
222
222
  };
223
223
  }>> & Readonly<{
224
224
  onChange?: ((...args: any[]) => any) | undefined;
225
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
226
225
  onCancel?: ((...args: any[]) => any) | undefined;
226
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
227
227
  onConfirm?: ((...args: any[]) => any) | undefined;
228
228
  }>, {
229
229
  formatter: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
@@ -118,7 +118,7 @@ var stdin_default = (0, import_vue.defineComponent)({
118
118
  return (0, import_utils.genOptions)(+minSecond, +maxSecond, type, formatter, filter, currentValues.value);
119
119
  default:
120
120
  if (process.env.NODE_ENV !== "production") {
121
- throw new Error(`[Vant] DatePicker: unsupported columns type: ${type}`);
121
+ throw new Error(`[Vant] TimePicker: unsupported columns type: ${type}`);
122
122
  }
123
123
  return [];
124
124
  }
@@ -143,8 +143,8 @@ export declare const TimePicker: import("../utils").WithInstall<import("vue").De
143
143
  };
144
144
  }>> & Readonly<{
145
145
  onChange?: ((...args: any[]) => any) | undefined;
146
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
147
146
  onCancel?: ((...args: any[]) => any) | undefined;
147
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
148
148
  onConfirm?: ((...args: any[]) => any) | undefined;
149
149
  }>, {
150
150
  formatter: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
@@ -40,6 +40,6 @@ const BORDER_SURROUND = `${BORDER}--surround`;
40
40
  const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
41
41
  const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
42
42
  const HAPTICS_FEEDBACK = "van-haptics-feedback";
43
- const FORM_KEY = Symbol("van-form");
43
+ const FORM_KEY = /* @__PURE__ */ Symbol("van-form");
44
44
  const LONG_PRESS_START_TIME = 500;
45
45
  const TAP_OFFSET = 5;
package/lib/vant.cjs.js CHANGED
@@ -263,6 +263,7 @@ var stdin_default$1W = {
263
263
  tel: "电话",
264
264
  save: "保存",
265
265
  clear: "清空",
266
+ undo: "撤销",
266
267
  cancel: "取消",
267
268
  confirm: "确认",
268
269
  delete: "删除",
@@ -391,7 +392,7 @@ const BORDER_SURROUND = `${BORDER}--surround`;
391
392
  const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
392
393
  const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
393
394
  const HAPTICS_FEEDBACK = "van-haptics-feedback";
394
- const FORM_KEY = Symbol("van-form");
395
+ const FORM_KEY = /* @__PURE__ */ Symbol("van-form");
395
396
  const LONG_PRESS_START_TIME = 500;
396
397
  const TAP_OFFSET = 5;
397
398
  function callInterceptor(interceptor, {
@@ -434,7 +435,7 @@ function closest(arr, target) {
434
435
  (pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur
435
436
  );
436
437
  }
437
- const POPUP_TOGGLE_KEY = Symbol();
438
+ const POPUP_TOGGLE_KEY = /* @__PURE__ */ Symbol();
438
439
  function onPopupReopen(callback) {
439
440
  const popupToggleStatus = vue.inject(POPUP_TOGGLE_KEY, null);
440
441
  if (popupToggleStatus) {
@@ -1062,7 +1063,8 @@ const actionBarIconProps = extend({}, routeProps, {
1062
1063
  badge: numericProp,
1063
1064
  iconClass: unknownProp,
1064
1065
  badgeProps: Object,
1065
- iconPrefix: String
1066
+ iconPrefix: String,
1067
+ disabled: Boolean
1066
1068
  });
1067
1069
  var stdin_default$1M = vue.defineComponent({
1068
1070
  name: name$1D,
@@ -1102,11 +1104,18 @@ var stdin_default$1M = vue.defineComponent({
1102
1104
  "classPrefix": iconPrefix
1103
1105
  }, null);
1104
1106
  };
1107
+ const onClick = () => {
1108
+ if (!props2.disabled) {
1109
+ route2();
1110
+ }
1111
+ };
1105
1112
  return () => vue.createVNode("div", {
1106
1113
  "role": "button",
1107
- "class": bem$1y(),
1108
- "tabindex": 0,
1109
- "onClick": route2
1114
+ "class": bem$1y({
1115
+ disabled: props2.disabled
1116
+ }),
1117
+ "tabindex": props2.disabled ? -1 : 0,
1118
+ "onClick": onClick
1110
1119
  }, [renderIcon(), slots.default ? slots.default() : props2.text]);
1111
1120
  }
1112
1121
  });
@@ -2985,8 +2994,8 @@ var stdin_default$1D = vue.defineComponent({
2985
2994
  })]);
2986
2995
  }
2987
2996
  });
2988
- const TAB_STATUS_KEY = Symbol();
2989
- const ALL_TAB_STATUS_KEY = Symbol();
2997
+ const TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
2998
+ const ALL_TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
2990
2999
  const useTabStatus = () => vue.inject(TAB_STATUS_KEY, null);
2991
3000
  const useAllTabStatus = () => vue.inject(ALL_TAB_STATUS_KEY, null);
2992
3001
  const useProvideTabStatus = (status) => {
@@ -4291,10 +4300,11 @@ var stdin_default$1v = vue.defineComponent({
4291
4300
  if (modelValue && getStringLength(modelValue) === +maxlength) {
4292
4301
  return modelValue;
4293
4302
  }
4294
- const selectionEnd = (_a = inputRef.value) == null ? void 0 : _a.selectionEnd;
4303
+ let selectionEnd = (_a = inputRef.value) == null ? void 0 : _a.selectionEnd;
4295
4304
  if (state.focused && selectionEnd) {
4296
4305
  const valueArr = [...value];
4297
4306
  const exceededLength = valueArr.length - +maxlength;
4307
+ selectionEnd = getStringLength(value.slice(0, selectionEnd));
4298
4308
  valueArr.splice(selectionEnd - exceededLength, exceededLength);
4299
4309
  return valueArr.join("");
4300
4310
  }
@@ -4306,7 +4316,7 @@ var stdin_default$1v = vue.defineComponent({
4306
4316
  var _a, _b;
4307
4317
  const originalValue = value;
4308
4318
  value = limitValueLength(value);
4309
- const limitDiffLen = getStringLength(originalValue) - getStringLength(value);
4319
+ const limitDiffLen = originalValue.length - value.length;
4310
4320
  if (props2.type === "number" || props2.type === "digit") {
4311
4321
  const isNumber = props2.type === "number";
4312
4322
  value = formatNumber(value, isNumber, isNumber);
@@ -4332,7 +4342,7 @@ var stdin_default$1v = vue.defineComponent({
4332
4342
  selectionEnd
4333
4343
  } = inputRef.value;
4334
4344
  const bcoVal = cutString(originalValue, selectionEnd);
4335
- formatterDiffLen = getStringLength(formatter(bcoVal)) - getStringLength(bcoVal);
4345
+ formatterDiffLen = formatter(bcoVal).length - bcoVal.length;
4336
4346
  }
4337
4347
  }
4338
4348
  if (inputRef.value && inputRef.value.value !== value) {
@@ -4343,7 +4353,7 @@ var stdin_default$1v = vue.defineComponent({
4343
4353
  } = inputRef.value;
4344
4354
  inputRef.value.value = value;
4345
4355
  if (isDef(selectionStart) && isDef(selectionEnd)) {
4346
- const valueLen = getStringLength(value);
4356
+ const valueLen = value.length;
4347
4357
  if (limitDiffLen) {
4348
4358
  selectionStart -= limitDiffLen;
4349
4359
  selectionEnd -= limitDiffLen;
@@ -10342,6 +10352,8 @@ const floatingPanelProps = {
10342
10352
  height: makeNumericProp(0),
10343
10353
  anchors: makeArrayProp(),
10344
10354
  duration: makeNumericProp(0.3),
10355
+ magnetic: truthProp,
10356
+ draggable: truthProp,
10345
10357
  contentDraggable: truthProp,
10346
10358
  lockScroll: Boolean,
10347
10359
  safeAreaInsetBottom: truthProp
@@ -10391,6 +10403,7 @@ var stdin_default$R = vue.defineComponent({
10391
10403
  let maxScroll = -1;
10392
10404
  const touch = useTouch();
10393
10405
  const onTouchstart = (e) => {
10406
+ if (!props2.draggable) return;
10394
10407
  touch.start(e);
10395
10408
  dragging.value = true;
10396
10409
  startY = -height.value;
@@ -10398,6 +10411,7 @@ var stdin_default$R = vue.defineComponent({
10398
10411
  };
10399
10412
  const onTouchmove = (e) => {
10400
10413
  var _a;
10414
+ if (!props2.draggable) return;
10401
10415
  touch.move(e);
10402
10416
  const target = e.target;
10403
10417
  if (contentRef.value === target || ((_a = contentRef.value) == null ? void 0 : _a.contains(target))) {
@@ -10417,8 +10431,22 @@ var stdin_default$R = vue.defineComponent({
10417
10431
  };
10418
10432
  const onTouchend = () => {
10419
10433
  maxScroll = -1;
10434
+ if (!dragging.value) {
10435
+ return;
10436
+ }
10420
10437
  dragging.value = false;
10421
- height.value = closest(anchors.value, height.value);
10438
+ if (!props2.draggable) {
10439
+ return;
10440
+ }
10441
+ if (props2.magnetic) {
10442
+ height.value = closest(anchors.value, height.value);
10443
+ } else {
10444
+ const {
10445
+ min,
10446
+ max
10447
+ } = boundary.value;
10448
+ height.value = Math.max(min, Math.min(max, height.value));
10449
+ }
10422
10450
  if (height.value !== -startY) {
10423
10451
  emit("heightChange", {
10424
10452
  height: height.value
@@ -10438,6 +10466,9 @@ var stdin_default$R = vue.defineComponent({
10438
10466
  if (slots.header) {
10439
10467
  return slots.header();
10440
10468
  }
10469
+ if (!props2.draggable) {
10470
+ return null;
10471
+ }
10441
10472
  return vue.createVNode("div", {
10442
10473
  "class": bem$I("header")
10443
10474
  }, [vue.createVNode("div", {
@@ -10457,7 +10488,10 @@ var stdin_default$R = vue.defineComponent({
10457
10488
  "onTouchcancel": onTouchend
10458
10489
  }, [renderHeader(), vue.createVNode("div", {
10459
10490
  "class": bem$I("content"),
10460
- "ref": contentRef
10491
+ "ref": contentRef,
10492
+ "style": {
10493
+ paddingBottom: addUnit(boundary.value.max - height.value)
10494
+ }
10461
10495
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
10462
10496
  };
10463
10497
  }
@@ -11645,7 +11679,10 @@ const listProps = {
11645
11679
  scroller: Object,
11646
11680
  errorText: String,
11647
11681
  direction: makeStringProp("down"),
11648
- loadingText: String,
11682
+ loadingText: {
11683
+ type: String,
11684
+ default: ""
11685
+ },
11649
11686
  finishedText: String,
11650
11687
  immediateCheck: truthProp
11651
11688
  };
@@ -11722,7 +11759,7 @@ var stdin_default$J = vue.defineComponent({
11722
11759
  if (loading.value && !props2.finished && !props2.disabled) {
11723
11760
  return vue.createVNode("div", {
11724
11761
  "class": bem$A("loading")
11725
- }, [slots.loading ? slots.loading() : vue.createVNode(Loading, {
11762
+ }, [slots.loading ? slots.loading() : props2.loadingText != null && vue.createVNode(Loading, {
11726
11763
  "class": bem$A("loading-icon")
11727
11764
  }, {
11728
11765
  default: () => [props2.loadingText || t$7("loading")]
@@ -12858,7 +12895,9 @@ const progressProps = {
12858
12895
  var stdin_default$A = vue.defineComponent({
12859
12896
  name: name$s,
12860
12897
  props: progressProps,
12861
- setup(props2) {
12898
+ setup(props2, {
12899
+ slots
12900
+ }) {
12862
12901
  const background = vue.computed(() => props2.inactive ? void 0 : props2.color);
12863
12902
  const format2 = (rate) => Math.min(Math.max(+rate, 0), 100);
12864
12903
  const renderPivot = () => {
@@ -12869,8 +12908,8 @@ var stdin_default$A = vue.defineComponent({
12869
12908
  percentage
12870
12909
  } = props2;
12871
12910
  const safePercentage = format2(percentage);
12872
- const text = pivotText != null ? pivotText : `${percentage}%`;
12873
- if (props2.showPivot && text) {
12911
+ const text = pivotText != null ? pivotText : `${safePercentage}%`;
12912
+ if (props2.showPivot && (slots.pivot || text)) {
12874
12913
  const style = {
12875
12914
  color: textColor,
12876
12915
  left: `${safePercentage}%`,
@@ -12882,7 +12921,9 @@ var stdin_default$A = vue.defineComponent({
12882
12921
  "class": bem$r("pivot", {
12883
12922
  inactive: props2.inactive
12884
12923
  })
12885
- }, [text]);
12924
+ }, [slots.pivot ? slots.pivot({
12925
+ percentage: safePercentage
12926
+ }) : text]);
12886
12927
  }
12887
12928
  };
12888
12929
  return () => {
@@ -13522,6 +13563,7 @@ var stdin_default$v = vue.defineComponent({
13522
13563
  "with-message": fieldAttrs.errorMessage
13523
13564
  }),
13524
13565
  "border": false,
13566
+ "labelAlign": "left",
13525
13567
  "onBlur": onBlur,
13526
13568
  "onFocus": onFocus,
13527
13569
  "onClear": onClear,
@@ -13773,6 +13815,8 @@ const signatureProps = {
13773
13815
  type: makeStringProp("png"),
13774
13816
  penColor: makeStringProp("#000"),
13775
13817
  lineWidth: makeNumberProp(3),
13818
+ historySize: makeNumberProp(20),
13819
+ undoButtonText: String,
13776
13820
  clearButtonText: String,
13777
13821
  backgroundColor: makeStringProp(""),
13778
13822
  confirmButtonText: String
@@ -13800,6 +13844,15 @@ var stdin_default$r = vue.defineComponent({
13800
13844
  let canvasWidth = 0;
13801
13845
  let canvasHeight = 0;
13802
13846
  let canvasRect;
13847
+ const history = vue.ref([]);
13848
+ const saveState = () => {
13849
+ if (ctx.value && canvasWidth && canvasHeight) {
13850
+ if (history.value.length >= props2.historySize) {
13851
+ history.value.shift();
13852
+ }
13853
+ history.value.push(ctx.value.getImageData(0, 0, canvasWidth, canvasHeight));
13854
+ }
13855
+ };
13803
13856
  const touchStart = () => {
13804
13857
  if (!ctx.value) {
13805
13858
  return false;
@@ -13826,6 +13879,7 @@ var stdin_default$r = vue.defineComponent({
13826
13879
  };
13827
13880
  const touchEnd = (event) => {
13828
13881
  preventDefault(event);
13882
+ saveState();
13829
13883
  emit("end");
13830
13884
  };
13831
13885
  const isCanvasEmpty = (canvas) => {
@@ -13866,8 +13920,21 @@ var stdin_default$r = vue.defineComponent({
13866
13920
  ctx.value.closePath();
13867
13921
  setCanvasBgColor(ctx.value);
13868
13922
  }
13923
+ history.value = [];
13869
13924
  emit("clear");
13870
13925
  };
13926
+ const undo = () => {
13927
+ if (history.value.length) {
13928
+ history.value.pop();
13929
+ if (ctx.value) {
13930
+ ctx.value.clearRect(0, 0, canvasWidth, canvasHeight);
13931
+ setCanvasBgColor(ctx.value);
13932
+ if (history.value.length) {
13933
+ ctx.value.putImageData(history.value[history.value.length - 1], 0, 0);
13934
+ }
13935
+ }
13936
+ }
13937
+ };
13871
13938
  const initialize = () => {
13872
13939
  var _a, _b, _c;
13873
13940
  if (isRenderCanvas && canvasRef.value) {
@@ -13891,7 +13958,8 @@ var stdin_default$r = vue.defineComponent({
13891
13958
  useExpose({
13892
13959
  resize,
13893
13960
  clear,
13894
- submit
13961
+ submit,
13962
+ undo
13895
13963
  });
13896
13964
  return () => vue.createVNode("div", {
13897
13965
  "class": bem$i()
@@ -13910,6 +13978,11 @@ var stdin_default$r = vue.defineComponent({
13910
13978
  "onClick": clear
13911
13979
  }, {
13912
13980
  default: () => [props2.clearButtonText || t$2("clear")]
13981
+ }), vue.createVNode(Button, {
13982
+ "size": "small",
13983
+ "onClick": undo
13984
+ }, {
13985
+ default: () => [props2.undoButtonText || t$2("undo")]
13913
13986
  }), vue.createVNode(Button, {
13914
13987
  "type": "primary",
13915
13988
  "size": "small",
@@ -14637,6 +14710,9 @@ var stdin_default$e = vue.defineComponent({
14637
14710
  if (allowEmpty && value === "") {
14638
14711
  return value;
14639
14712
  }
14713
+ if (typeof value === "number" && String(value).includes("e")) {
14714
+ value = value.toFixed(decimalLength ? +decimalLength : 17);
14715
+ }
14640
14716
  value = formatNumber(String(value), !props2.integer);
14641
14717
  value = value === "" ? 0 : +value;
14642
14718
  value = Number.isNaN(value) ? +min : value;
@@ -14948,6 +15024,11 @@ const swipeCellProps = {
14948
15024
  disabled: Boolean,
14949
15025
  leftWidth: numericProp,
14950
15026
  rightWidth: numericProp,
15027
+ threshold: {
15028
+ type: numericProp,
15029
+ default: 0.15,
15030
+ validator: (value) => +value >= 0 && +value <= 1
15031
+ },
14951
15032
  beforeClose: Function,
14952
15033
  stopPropagation: Boolean
14953
15034
  };
@@ -14996,8 +15077,8 @@ var stdin_default$c = vue.defineComponent({
14996
15077
  };
14997
15078
  const toggle = (side) => {
14998
15079
  const offset = Math.abs(state.offset);
14999
- const THRESHOLD = 0.15;
15000
- const threshold = opened ? 1 - THRESHOLD : THRESHOLD;
15080
+ const thresholdValue = +props2.threshold;
15081
+ const threshold = opened ? 1 - thresholdValue : thresholdValue;
15001
15082
  const width = side === "left" ? leftWidth.value : rightWidth.value;
15002
15083
  if (width && offset > width * threshold) {
15003
15084
  open(side);
@@ -15547,7 +15628,7 @@ var stdin_default$8 = vue.defineComponent({
15547
15628
  return genOptions(+minSecond, +maxSecond, type, formatter, filter, currentValues.value);
15548
15629
  default:
15549
15630
  if (process.env.NODE_ENV !== "production") {
15550
- throw new Error(`[Vant] DatePicker: unsupported columns type: ${type}`);
15631
+ throw new Error(`[Vant] TimePicker: unsupported columns type: ${type}`);
15551
15632
  }
15552
15633
  return [];
15553
15634
  }
@@ -17110,7 +17191,7 @@ const Lazyload = {
17110
17191
  });
17111
17192
  }
17112
17193
  };
17113
- const version = "4.9.21";
17194
+ const version = "4.9.23";
17114
17195
  function install(app) {
17115
17196
  const components = [
17116
17197
  ActionBar,
@@ -17408,6 +17489,7 @@ exports.rollingTextProps = rollingTextProps;
17408
17489
  exports.rowProps = rowProps;
17409
17490
  exports.searchProps = searchProps;
17410
17491
  exports.setDialogDefaultOptions = setDialogDefaultOptions;
17492
+ exports.setGlobalZIndex = setGlobalZIndex;
17411
17493
  exports.setNotifyDefaultOptions = setNotifyDefaultOptions;
17412
17494
  exports.setToastDefaultOptions = setToastDefaultOptions;
17413
17495
  exports.shareSheetProps = shareSheetProps;
@@ -17447,6 +17529,7 @@ exports.treeSelectProps = treeSelectProps;
17447
17529
  exports.uploaderProps = uploaderProps;
17448
17530
  exports.useAllTabStatus = useAllTabStatus;
17449
17531
  exports.useCurrentLang = useCurrentLang;
17532
+ exports.useGlobalZIndex = useGlobalZIndex;
17450
17533
  exports.useTabStatus = useTabStatus;
17451
17534
  exports.version = version;
17452
17535
  exports.watermarkProps = watermarkProps;