vant 4.9.21 → 4.9.22

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 (94) hide show
  1. package/README.md +2 -2
  2. package/es/action-bar-button/index.css +1 -1
  3. package/es/action-sheet/ActionSheet.d.ts +1 -1
  4. package/es/action-sheet/index.d.ts +1 -1
  5. package/es/address-list/AddressListItem.d.ts +1 -1
  6. package/es/area/Area.d.ts +1 -1
  7. package/es/area/index.d.ts +1 -1
  8. package/es/calendar/index.css +1 -1
  9. package/es/composables/on-popup-reopen.mjs +1 -1
  10. package/es/composables/use-tab-status.mjs +2 -2
  11. package/es/composables/use-touch.mjs +4 -4
  12. package/es/date-picker/DatePicker.d.ts +1 -1
  13. package/es/date-picker/index.d.ts +1 -1
  14. package/es/dialog/Dialog.d.ts +1 -1
  15. package/es/dialog/index.css +1 -1
  16. package/es/dialog/index.d.ts +1 -1
  17. package/es/field/Field.d.ts +5 -5
  18. package/es/field/Field.mjs +3 -3
  19. package/es/field/index.d.ts +3 -3
  20. package/es/field/types.d.ts +1 -0
  21. package/es/floating-panel/FloatingPanel.d.ts +13 -0
  22. package/es/floating-panel/FloatingPanel.mjs +14 -2
  23. package/es/floating-panel/index.d.ts +9 -0
  24. package/es/grid/Grid.d.ts +1 -1
  25. package/es/grid/index.d.ts +1 -1
  26. package/es/index.d.ts +1 -1
  27. package/es/index.mjs +1 -1
  28. package/es/list/List.d.ts +13 -3
  29. package/es/list/List.mjs +5 -2
  30. package/es/list/index.d.ts +9 -2
  31. package/es/picker/Picker.d.ts +1 -1
  32. package/es/picker/index.d.ts +1 -1
  33. package/es/search/Search.d.ts +4 -4
  34. package/es/search/Search.mjs +1 -0
  35. package/es/search/index.d.ts +3 -3
  36. package/es/share-sheet/ShareSheet.d.ts +1 -1
  37. package/es/share-sheet/index.d.ts +1 -1
  38. package/es/stepper/Stepper.mjs +3 -0
  39. package/es/tabs/Tabs.d.ts +1 -1
  40. package/es/tabs/index.d.ts +1 -1
  41. package/es/time-picker/TimePicker.d.ts +1 -1
  42. package/es/time-picker/TimePicker.mjs +1 -1
  43. package/es/time-picker/index.d.ts +1 -1
  44. package/es/utils/constant.mjs +1 -1
  45. package/lib/action-bar-button/index.css +1 -1
  46. package/lib/action-sheet/ActionSheet.d.ts +1 -1
  47. package/lib/action-sheet/index.d.ts +1 -1
  48. package/lib/address-list/AddressListItem.d.ts +1 -1
  49. package/lib/area/Area.d.ts +1 -1
  50. package/lib/area/index.d.ts +1 -1
  51. package/lib/calendar/index.css +1 -1
  52. package/lib/composables/on-popup-reopen.js +1 -1
  53. package/lib/composables/use-tab-status.js +2 -2
  54. package/lib/composables/use-touch.js +4 -4
  55. package/lib/date-picker/DatePicker.d.ts +1 -1
  56. package/lib/date-picker/index.d.ts +1 -1
  57. package/lib/dialog/Dialog.d.ts +1 -1
  58. package/lib/dialog/index.css +1 -1
  59. package/lib/dialog/index.d.ts +1 -1
  60. package/lib/field/Field.d.ts +5 -5
  61. package/lib/field/Field.js +3 -3
  62. package/lib/field/index.d.ts +3 -3
  63. package/lib/field/types.d.ts +1 -0
  64. package/lib/floating-panel/FloatingPanel.d.ts +13 -0
  65. package/lib/floating-panel/FloatingPanel.js +14 -2
  66. package/lib/floating-panel/index.d.ts +9 -0
  67. package/lib/grid/Grid.d.ts +1 -1
  68. package/lib/grid/index.d.ts +1 -1
  69. package/lib/index.css +1 -1
  70. package/lib/index.d.ts +1 -1
  71. package/lib/index.js +1 -1
  72. package/lib/list/List.d.ts +13 -3
  73. package/lib/list/List.js +5 -2
  74. package/lib/list/index.d.ts +9 -2
  75. package/lib/picker/Picker.d.ts +1 -1
  76. package/lib/picker/index.d.ts +1 -1
  77. package/lib/search/Search.d.ts +4 -4
  78. package/lib/search/Search.js +1 -0
  79. package/lib/search/index.d.ts +3 -3
  80. package/lib/share-sheet/ShareSheet.d.ts +1 -1
  81. package/lib/share-sheet/index.d.ts +1 -1
  82. package/lib/stepper/Stepper.js +3 -0
  83. package/lib/tabs/Tabs.d.ts +1 -1
  84. package/lib/tabs/index.d.ts +1 -1
  85. package/lib/time-picker/TimePicker.d.ts +1 -1
  86. package/lib/time-picker/TimePicker.js +1 -1
  87. package/lib/time-picker/index.d.ts +1 -1
  88. package/lib/utils/constant.js +1 -1
  89. package/lib/vant.cjs.js +32 -13
  90. package/lib/vant.es.js +32 -13
  91. package/lib/vant.js +40 -21
  92. package/lib/vant.min.js +3 -3
  93. package/lib/web-types.json +1 -1
  94. package/package.json +14 -14
package/lib/index.d.ts CHANGED
@@ -106,4 +106,4 @@ declare namespace _default {
106
106
  }
107
107
  export default _default;
108
108
  export function install(app: any): void;
109
- export const version: "4.9.21";
109
+ export const version: "4.9.22";
package/lib/index.js CHANGED
@@ -226,7 +226,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
226
226
  __reExport(stdin_exports, require("./tree-select"), module.exports);
227
227
  __reExport(stdin_exports, require("./uploader"), module.exports);
228
228
  __reExport(stdin_exports, require("./watermark"), module.exports);
229
- const version = "4.9.21";
229
+ const version = "4.9.22";
230
230
  function install(app) {
231
231
  const components = [
232
232
  import_action_bar.ActionBar,
@@ -15,7 +15,10 @@ export declare const listProps: {
15
15
  type: PropType<ListDirection>;
16
16
  default: ListDirection;
17
17
  };
18
- loadingText: StringConstructor;
18
+ loadingText: {
19
+ type: PropType<string | null>;
20
+ default: string;
21
+ };
19
22
  finishedText: StringConstructor;
20
23
  immediateCheck: {
21
24
  type: BooleanConstructor;
@@ -38,7 +41,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
38
41
  type: PropType<ListDirection>;
39
42
  default: ListDirection;
40
43
  };
41
- loadingText: StringConstructor;
44
+ loadingText: {
45
+ type: PropType<string | null>;
46
+ default: string;
47
+ };
42
48
  finishedText: StringConstructor;
43
49
  immediateCheck: {
44
50
  type: BooleanConstructor;
@@ -59,7 +65,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
59
65
  type: PropType<ListDirection>;
60
66
  default: ListDirection;
61
67
  };
62
- loadingText: StringConstructor;
68
+ loadingText: {
69
+ type: PropType<string | null>;
70
+ default: string;
71
+ };
63
72
  finishedText: StringConstructor;
64
73
  immediateCheck: {
65
74
  type: BooleanConstructor;
@@ -74,6 +83,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
74
83
  disabled: boolean;
75
84
  error: boolean;
76
85
  loading: boolean;
86
+ loadingText: string | null;
77
87
  direction: ListDirection;
78
88
  finished: boolean;
79
89
  immediateCheck: boolean;
package/lib/list/List.js CHANGED
@@ -37,7 +37,10 @@ const listProps = {
37
37
  scroller: Object,
38
38
  errorText: String,
39
39
  direction: (0, import_utils.makeStringProp)("down"),
40
- loadingText: String,
40
+ loadingText: {
41
+ type: String,
42
+ default: ""
43
+ },
41
44
  finishedText: String,
42
45
  immediateCheck: import_utils.truthProp
43
46
  };
@@ -114,7 +117,7 @@ var stdin_default = (0, import_vue.defineComponent)({
114
117
  if (loading.value && !props.finished && !props.disabled) {
115
118
  return (0, import_vue.createVNode)("div", {
116
119
  "class": bem("loading")
117
- }, [slots.loading ? slots.loading() : (0, import_vue.createVNode)(import_loading.Loading, {
120
+ }, [slots.loading ? slots.loading() : props.loadingText != null && (0, import_vue.createVNode)(import_loading.Loading, {
118
121
  "class": bem("loading-icon")
119
122
  }, {
120
123
  default: () => [props.loadingText || t("loading")]
@@ -14,7 +14,10 @@ export declare const List: import("../utils").WithInstall<import("vue").DefineCo
14
14
  type: import("vue").PropType<import("./types").ListDirection>;
15
15
  default: import("./types").ListDirection;
16
16
  };
17
- loadingText: StringConstructor;
17
+ loadingText: {
18
+ type: import("vue").PropType<string | null>;
19
+ default: string;
20
+ };
18
21
  finishedText: StringConstructor;
19
22
  immediateCheck: {
20
23
  type: BooleanConstructor;
@@ -35,7 +38,10 @@ export declare const List: import("../utils").WithInstall<import("vue").DefineCo
35
38
  type: import("vue").PropType<import("./types").ListDirection>;
36
39
  default: import("./types").ListDirection;
37
40
  };
38
- loadingText: StringConstructor;
41
+ loadingText: {
42
+ type: import("vue").PropType<string | null>;
43
+ default: string;
44
+ };
39
45
  finishedText: StringConstructor;
40
46
  immediateCheck: {
41
47
  type: BooleanConstructor;
@@ -50,6 +56,7 @@ export declare const List: import("../utils").WithInstall<import("vue").DefineCo
50
56
  disabled: boolean;
51
57
  error: boolean;
52
58
  loading: boolean;
59
+ loadingText: string | null;
53
60
  direction: import("./types").ListDirection;
54
61
  finished: boolean;
55
62
  immediateCheck: boolean;
@@ -144,8 +144,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
144
144
  columnsFieldNames: PropType<PickerFieldNames>;
145
145
  }>> & Readonly<{
146
146
  onChange?: ((...args: any[]) => any) | undefined;
147
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
148
147
  onCancel?: ((...args: any[]) => any) | undefined;
148
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
149
149
  onClickOption?: ((...args: any[]) => any) | undefined;
150
150
  onScrollInto?: ((...args: any[]) => any) | undefined;
151
151
  onConfirm?: ((...args: any[]) => any) | undefined;
@@ -77,8 +77,8 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
77
77
  columnsFieldNames: import("vue").PropType<import("./types").PickerFieldNames>;
78
78
  }>> & Readonly<{
79
79
  onChange?: ((...args: any[]) => any) | undefined;
80
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
81
80
  onCancel?: ((...args: any[]) => any) | undefined;
81
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
82
82
  onClickOption?: ((...args: any[]) => any) | undefined;
83
83
  onScrollInto?: ((...args: any[]) => any) | undefined;
84
84
  onConfirm?: ((...args: any[]) => any) | undefined;
@@ -25,7 +25,7 @@ export declare const searchProps: {
25
25
  autocapitalize: StringConstructor;
26
26
  autocorrect: StringConstructor;
27
27
  errorMessage: StringConstructor;
28
- enterkeyhint: StringConstructor;
28
+ enterkeyhint: import("vue").PropType<import("../field").FieldEnterKeyHint>;
29
29
  clearTrigger: {
30
30
  type: import("vue").PropType<import("../field").FieldClearTrigger>;
31
31
  default: import("../field").FieldClearTrigger;
@@ -95,7 +95,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
95
95
  autocapitalize: StringConstructor;
96
96
  autocorrect: StringConstructor;
97
97
  errorMessage: StringConstructor;
98
- enterkeyhint: StringConstructor;
98
+ enterkeyhint: import("vue").PropType<import("../field").FieldEnterKeyHint>;
99
99
  clearTrigger: {
100
100
  type: import("vue").PropType<import("../field").FieldClearTrigger>;
101
101
  default: import("../field").FieldClearTrigger;
@@ -163,7 +163,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
163
163
  autocapitalize: StringConstructor;
164
164
  autocorrect: StringConstructor;
165
165
  errorMessage: StringConstructor;
166
- enterkeyhint: StringConstructor;
166
+ enterkeyhint: import("vue").PropType<import("../field").FieldEnterKeyHint>;
167
167
  clearTrigger: {
168
168
  type: import("vue").PropType<import("../field").FieldClearTrigger>;
169
169
  default: import("../field").FieldClearTrigger;
@@ -209,12 +209,12 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
209
209
  }>> & Readonly<{
210
210
  onFocus?: ((...args: any[]) => any) | undefined;
211
211
  onBlur?: ((...args: any[]) => any) | undefined;
212
+ onCancel?: ((...args: any[]) => any) | undefined;
212
213
  onClear?: ((...args: any[]) => any) | undefined;
213
214
  onClickInput?: ((...args: any[]) => any) | undefined;
214
215
  onClickLeftIcon?: ((...args: any[]) => any) | undefined;
215
216
  onClickRightIcon?: ((...args: any[]) => any) | undefined;
216
217
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
217
- onCancel?: ((...args: any[]) => any) | undefined;
218
218
  onSearch?: ((...args: any[]) => any) | undefined;
219
219
  }>, {
220
220
  autofocus: boolean;
@@ -109,6 +109,7 @@ var stdin_default = (0, import_vue.defineComponent)({
109
109
  "with-message": fieldAttrs.errorMessage
110
110
  }),
111
111
  "border": false,
112
+ "labelAlign": "left",
112
113
  "onBlur": onBlur,
113
114
  "onFocus": onFocus,
114
115
  "onClear": onClear,
@@ -24,7 +24,7 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
24
24
  autocapitalize: StringConstructor;
25
25
  autocorrect: StringConstructor;
26
26
  errorMessage: StringConstructor;
27
- enterkeyhint: StringConstructor;
27
+ enterkeyhint: import("vue").PropType<import("..").FieldEnterKeyHint>;
28
28
  clearTrigger: {
29
29
  type: import("vue").PropType<import("..").FieldClearTrigger>;
30
30
  default: import("..").FieldClearTrigger;
@@ -92,7 +92,7 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
92
92
  autocapitalize: StringConstructor;
93
93
  autocorrect: StringConstructor;
94
94
  errorMessage: StringConstructor;
95
- enterkeyhint: StringConstructor;
95
+ enterkeyhint: import("vue").PropType<import("..").FieldEnterKeyHint>;
96
96
  clearTrigger: {
97
97
  type: import("vue").PropType<import("..").FieldClearTrigger>;
98
98
  default: import("..").FieldClearTrigger;
@@ -138,12 +138,12 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
138
138
  }>> & Readonly<{
139
139
  onFocus?: ((...args: any[]) => any) | undefined;
140
140
  onBlur?: ((...args: any[]) => any) | undefined;
141
+ onCancel?: ((...args: any[]) => any) | undefined;
141
142
  onClear?: ((...args: any[]) => any) | undefined;
142
143
  onClickInput?: ((...args: any[]) => any) | undefined;
143
144
  onClickLeftIcon?: ((...args: any[]) => any) | undefined;
144
145
  onClickRightIcon?: ((...args: any[]) => any) | undefined;
145
146
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
146
- onCancel?: ((...args: any[]) => any) | undefined;
147
147
  onSearch?: ((...args: any[]) => any) | undefined;
148
148
  }>, {
149
149
  autofocus: boolean;
@@ -148,8 +148,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
148
148
  };
149
149
  }>> & Readonly<{
150
150
  onSelect?: ((...args: any[]) => any) | undefined;
151
- "onUpdate:show"?: ((...args: any[]) => any) | undefined;
152
151
  onCancel?: ((...args: any[]) => any) | undefined;
152
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
153
153
  }>, {
154
154
  round: boolean;
155
155
  overlay: boolean;
@@ -92,8 +92,8 @@ export declare const ShareSheet: import("../utils").WithInstall<import("vue").De
92
92
  };
93
93
  }>> & Readonly<{
94
94
  onSelect?: ((...args: any[]) => any) | undefined;
95
- "onUpdate:show"?: ((...args: any[]) => any) | undefined;
96
95
  onCancel?: ((...args: any[]) => any) | undefined;
96
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
97
97
  }>, {
98
98
  round: boolean;
99
99
  overlay: boolean;
@@ -69,6 +69,9 @@ var stdin_default = (0, import_vue.defineComponent)({
69
69
  if (allowEmpty && value === "") {
70
70
  return value;
71
71
  }
72
+ if (typeof value === "number" && String(value).includes("e")) {
73
+ value = value.toFixed(decimalLength ? +decimalLength : 17);
74
+ }
72
75
  value = (0, import_utils.formatNumber)(String(value), !props.integer);
73
76
  value = value === "" ? 0 : +value;
74
77
  value = Number.isNaN(value) ? +min : value;
@@ -150,8 +150,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
150
150
  "onUpdate:active"?: ((...args: any[]) => any) | undefined;
151
151
  }>, {
152
152
  type: TabsType;
153
- ellipsis: boolean;
154
153
  sticky: boolean;
154
+ ellipsis: boolean;
155
155
  border: boolean;
156
156
  active: string | number;
157
157
  duration: string | number;
@@ -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
@@ -391,7 +391,7 @@ const BORDER_SURROUND = `${BORDER}--surround`;
391
391
  const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
392
392
  const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
393
393
  const HAPTICS_FEEDBACK = "van-haptics-feedback";
394
- const FORM_KEY = Symbol("van-form");
394
+ const FORM_KEY = /* @__PURE__ */ Symbol("van-form");
395
395
  const LONG_PRESS_START_TIME = 500;
396
396
  const TAP_OFFSET = 5;
397
397
  function callInterceptor(interceptor, {
@@ -434,7 +434,7 @@ function closest(arr, target) {
434
434
  (pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur
435
435
  );
436
436
  }
437
- const POPUP_TOGGLE_KEY = Symbol();
437
+ const POPUP_TOGGLE_KEY = /* @__PURE__ */ Symbol();
438
438
  function onPopupReopen(callback) {
439
439
  const popupToggleStatus = vue.inject(POPUP_TOGGLE_KEY, null);
440
440
  if (popupToggleStatus) {
@@ -2985,8 +2985,8 @@ var stdin_default$1D = vue.defineComponent({
2985
2985
  })]);
2986
2986
  }
2987
2987
  });
2988
- const TAB_STATUS_KEY = Symbol();
2989
- const ALL_TAB_STATUS_KEY = Symbol();
2988
+ const TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
2989
+ const ALL_TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
2990
2990
  const useTabStatus = () => vue.inject(TAB_STATUS_KEY, null);
2991
2991
  const useAllTabStatus = () => vue.inject(ALL_TAB_STATUS_KEY, null);
2992
2992
  const useProvideTabStatus = (status) => {
@@ -4306,7 +4306,7 @@ var stdin_default$1v = vue.defineComponent({
4306
4306
  var _a, _b;
4307
4307
  const originalValue = value;
4308
4308
  value = limitValueLength(value);
4309
- const limitDiffLen = getStringLength(originalValue) - getStringLength(value);
4309
+ const limitDiffLen = originalValue.length - value.length;
4310
4310
  if (props2.type === "number" || props2.type === "digit") {
4311
4311
  const isNumber = props2.type === "number";
4312
4312
  value = formatNumber(value, isNumber, isNumber);
@@ -4332,7 +4332,7 @@ var stdin_default$1v = vue.defineComponent({
4332
4332
  selectionEnd
4333
4333
  } = inputRef.value;
4334
4334
  const bcoVal = cutString(originalValue, selectionEnd);
4335
- formatterDiffLen = getStringLength(formatter(bcoVal)) - getStringLength(bcoVal);
4335
+ formatterDiffLen = formatter(bcoVal).length - bcoVal.length;
4336
4336
  }
4337
4337
  }
4338
4338
  if (inputRef.value && inputRef.value.value !== value) {
@@ -4343,7 +4343,7 @@ var stdin_default$1v = vue.defineComponent({
4343
4343
  } = inputRef.value;
4344
4344
  inputRef.value.value = value;
4345
4345
  if (isDef(selectionStart) && isDef(selectionEnd)) {
4346
- const valueLen = getStringLength(value);
4346
+ const valueLen = value.length;
4347
4347
  if (limitDiffLen) {
4348
4348
  selectionStart -= limitDiffLen;
4349
4349
  selectionEnd -= limitDiffLen;
@@ -10342,6 +10342,7 @@ const floatingPanelProps = {
10342
10342
  height: makeNumericProp(0),
10343
10343
  anchors: makeArrayProp(),
10344
10344
  duration: makeNumericProp(0.3),
10345
+ magnetic: truthProp,
10345
10346
  contentDraggable: truthProp,
10346
10347
  lockScroll: Boolean,
10347
10348
  safeAreaInsetBottom: truthProp
@@ -10418,7 +10419,15 @@ var stdin_default$R = vue.defineComponent({
10418
10419
  const onTouchend = () => {
10419
10420
  maxScroll = -1;
10420
10421
  dragging.value = false;
10421
- height.value = closest(anchors.value, height.value);
10422
+ if (props2.magnetic) {
10423
+ height.value = closest(anchors.value, height.value);
10424
+ } else {
10425
+ const {
10426
+ min,
10427
+ max
10428
+ } = boundary.value;
10429
+ height.value = Math.max(min, Math.min(max, height.value));
10430
+ }
10422
10431
  if (height.value !== -startY) {
10423
10432
  emit("heightChange", {
10424
10433
  height: height.value
@@ -10457,7 +10466,10 @@ var stdin_default$R = vue.defineComponent({
10457
10466
  "onTouchcancel": onTouchend
10458
10467
  }, [renderHeader(), vue.createVNode("div", {
10459
10468
  "class": bem$I("content"),
10460
- "ref": contentRef
10469
+ "ref": contentRef,
10470
+ "style": {
10471
+ paddingBottom: addUnit(boundary.value.max - height.value)
10472
+ }
10461
10473
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
10462
10474
  };
10463
10475
  }
@@ -11645,7 +11657,10 @@ const listProps = {
11645
11657
  scroller: Object,
11646
11658
  errorText: String,
11647
11659
  direction: makeStringProp("down"),
11648
- loadingText: String,
11660
+ loadingText: {
11661
+ type: String,
11662
+ default: ""
11663
+ },
11649
11664
  finishedText: String,
11650
11665
  immediateCheck: truthProp
11651
11666
  };
@@ -11722,7 +11737,7 @@ var stdin_default$J = vue.defineComponent({
11722
11737
  if (loading.value && !props2.finished && !props2.disabled) {
11723
11738
  return vue.createVNode("div", {
11724
11739
  "class": bem$A("loading")
11725
- }, [slots.loading ? slots.loading() : vue.createVNode(Loading, {
11740
+ }, [slots.loading ? slots.loading() : props2.loadingText != null && vue.createVNode(Loading, {
11726
11741
  "class": bem$A("loading-icon")
11727
11742
  }, {
11728
11743
  default: () => [props2.loadingText || t$7("loading")]
@@ -13522,6 +13537,7 @@ var stdin_default$v = vue.defineComponent({
13522
13537
  "with-message": fieldAttrs.errorMessage
13523
13538
  }),
13524
13539
  "border": false,
13540
+ "labelAlign": "left",
13525
13541
  "onBlur": onBlur,
13526
13542
  "onFocus": onFocus,
13527
13543
  "onClear": onClear,
@@ -14637,6 +14653,9 @@ var stdin_default$e = vue.defineComponent({
14637
14653
  if (allowEmpty && value === "") {
14638
14654
  return value;
14639
14655
  }
14656
+ if (typeof value === "number" && String(value).includes("e")) {
14657
+ value = value.toFixed(decimalLength ? +decimalLength : 17);
14658
+ }
14640
14659
  value = formatNumber(String(value), !props2.integer);
14641
14660
  value = value === "" ? 0 : +value;
14642
14661
  value = Number.isNaN(value) ? +min : value;
@@ -15547,7 +15566,7 @@ var stdin_default$8 = vue.defineComponent({
15547
15566
  return genOptions(+minSecond, +maxSecond, type, formatter, filter, currentValues.value);
15548
15567
  default:
15549
15568
  if (process.env.NODE_ENV !== "production") {
15550
- throw new Error(`[Vant] DatePicker: unsupported columns type: ${type}`);
15569
+ throw new Error(`[Vant] TimePicker: unsupported columns type: ${type}`);
15551
15570
  }
15552
15571
  return [];
15553
15572
  }
@@ -17110,7 +17129,7 @@ const Lazyload = {
17110
17129
  });
17111
17130
  }
17112
17131
  };
17113
- const version = "4.9.21";
17132
+ const version = "4.9.22";
17114
17133
  function install(app) {
17115
17134
  const components = [
17116
17135
  ActionBar,
package/lib/vant.es.js CHANGED
@@ -389,7 +389,7 @@ const BORDER_SURROUND = `${BORDER}--surround`;
389
389
  const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
390
390
  const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
391
391
  const HAPTICS_FEEDBACK = "van-haptics-feedback";
392
- const FORM_KEY = Symbol("van-form");
392
+ const FORM_KEY = /* @__PURE__ */ Symbol("van-form");
393
393
  const LONG_PRESS_START_TIME = 500;
394
394
  const TAP_OFFSET = 5;
395
395
  function callInterceptor(interceptor, {
@@ -432,7 +432,7 @@ function closest(arr, target) {
432
432
  (pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur
433
433
  );
434
434
  }
435
- const POPUP_TOGGLE_KEY = Symbol();
435
+ const POPUP_TOGGLE_KEY = /* @__PURE__ */ Symbol();
436
436
  function onPopupReopen(callback) {
437
437
  const popupToggleStatus = inject(POPUP_TOGGLE_KEY, null);
438
438
  if (popupToggleStatus) {
@@ -2983,8 +2983,8 @@ var stdin_default$1D = defineComponent({
2983
2983
  })]);
2984
2984
  }
2985
2985
  });
2986
- const TAB_STATUS_KEY = Symbol();
2987
- const ALL_TAB_STATUS_KEY = Symbol();
2986
+ const TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
2987
+ const ALL_TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
2988
2988
  const useTabStatus = () => inject(TAB_STATUS_KEY, null);
2989
2989
  const useAllTabStatus = () => inject(ALL_TAB_STATUS_KEY, null);
2990
2990
  const useProvideTabStatus = (status) => {
@@ -4304,7 +4304,7 @@ var stdin_default$1v = defineComponent({
4304
4304
  var _a, _b;
4305
4305
  const originalValue = value;
4306
4306
  value = limitValueLength(value);
4307
- const limitDiffLen = getStringLength(originalValue) - getStringLength(value);
4307
+ const limitDiffLen = originalValue.length - value.length;
4308
4308
  if (props2.type === "number" || props2.type === "digit") {
4309
4309
  const isNumber = props2.type === "number";
4310
4310
  value = formatNumber(value, isNumber, isNumber);
@@ -4330,7 +4330,7 @@ var stdin_default$1v = defineComponent({
4330
4330
  selectionEnd
4331
4331
  } = inputRef.value;
4332
4332
  const bcoVal = cutString(originalValue, selectionEnd);
4333
- formatterDiffLen = getStringLength(formatter(bcoVal)) - getStringLength(bcoVal);
4333
+ formatterDiffLen = formatter(bcoVal).length - bcoVal.length;
4334
4334
  }
4335
4335
  }
4336
4336
  if (inputRef.value && inputRef.value.value !== value) {
@@ -4341,7 +4341,7 @@ var stdin_default$1v = defineComponent({
4341
4341
  } = inputRef.value;
4342
4342
  inputRef.value.value = value;
4343
4343
  if (isDef(selectionStart) && isDef(selectionEnd)) {
4344
- const valueLen = getStringLength(value);
4344
+ const valueLen = value.length;
4345
4345
  if (limitDiffLen) {
4346
4346
  selectionStart -= limitDiffLen;
4347
4347
  selectionEnd -= limitDiffLen;
@@ -10340,6 +10340,7 @@ const floatingPanelProps = {
10340
10340
  height: makeNumericProp(0),
10341
10341
  anchors: makeArrayProp(),
10342
10342
  duration: makeNumericProp(0.3),
10343
+ magnetic: truthProp,
10343
10344
  contentDraggable: truthProp,
10344
10345
  lockScroll: Boolean,
10345
10346
  safeAreaInsetBottom: truthProp
@@ -10416,7 +10417,15 @@ var stdin_default$R = defineComponent({
10416
10417
  const onTouchend = () => {
10417
10418
  maxScroll = -1;
10418
10419
  dragging.value = false;
10419
- height.value = closest(anchors.value, height.value);
10420
+ if (props2.magnetic) {
10421
+ height.value = closest(anchors.value, height.value);
10422
+ } else {
10423
+ const {
10424
+ min,
10425
+ max
10426
+ } = boundary.value;
10427
+ height.value = Math.max(min, Math.min(max, height.value));
10428
+ }
10420
10429
  if (height.value !== -startY) {
10421
10430
  emit("heightChange", {
10422
10431
  height: height.value
@@ -10455,7 +10464,10 @@ var stdin_default$R = defineComponent({
10455
10464
  "onTouchcancel": onTouchend
10456
10465
  }, [renderHeader(), createVNode("div", {
10457
10466
  "class": bem$I("content"),
10458
- "ref": contentRef
10467
+ "ref": contentRef,
10468
+ "style": {
10469
+ paddingBottom: addUnit(boundary.value.max - height.value)
10470
+ }
10459
10471
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
10460
10472
  };
10461
10473
  }
@@ -11643,7 +11655,10 @@ const listProps = {
11643
11655
  scroller: Object,
11644
11656
  errorText: String,
11645
11657
  direction: makeStringProp("down"),
11646
- loadingText: String,
11658
+ loadingText: {
11659
+ type: String,
11660
+ default: ""
11661
+ },
11647
11662
  finishedText: String,
11648
11663
  immediateCheck: truthProp
11649
11664
  };
@@ -11720,7 +11735,7 @@ var stdin_default$J = defineComponent({
11720
11735
  if (loading.value && !props2.finished && !props2.disabled) {
11721
11736
  return createVNode("div", {
11722
11737
  "class": bem$A("loading")
11723
- }, [slots.loading ? slots.loading() : createVNode(Loading, {
11738
+ }, [slots.loading ? slots.loading() : props2.loadingText != null && createVNode(Loading, {
11724
11739
  "class": bem$A("loading-icon")
11725
11740
  }, {
11726
11741
  default: () => [props2.loadingText || t$7("loading")]
@@ -13520,6 +13535,7 @@ var stdin_default$v = defineComponent({
13520
13535
  "with-message": fieldAttrs.errorMessage
13521
13536
  }),
13522
13537
  "border": false,
13538
+ "labelAlign": "left",
13523
13539
  "onBlur": onBlur,
13524
13540
  "onFocus": onFocus,
13525
13541
  "onClear": onClear,
@@ -14635,6 +14651,9 @@ var stdin_default$e = defineComponent({
14635
14651
  if (allowEmpty && value === "") {
14636
14652
  return value;
14637
14653
  }
14654
+ if (typeof value === "number" && String(value).includes("e")) {
14655
+ value = value.toFixed(decimalLength ? +decimalLength : 17);
14656
+ }
14638
14657
  value = formatNumber(String(value), !props2.integer);
14639
14658
  value = value === "" ? 0 : +value;
14640
14659
  value = Number.isNaN(value) ? +min : value;
@@ -15545,7 +15564,7 @@ var stdin_default$8 = defineComponent({
15545
15564
  return genOptions(+minSecond, +maxSecond, type, formatter, filter, currentValues.value);
15546
15565
  default:
15547
15566
  if (process.env.NODE_ENV !== "production") {
15548
- throw new Error(`[Vant] DatePicker: unsupported columns type: ${type}`);
15567
+ throw new Error(`[Vant] TimePicker: unsupported columns type: ${type}`);
15549
15568
  }
15550
15569
  return [];
15551
15570
  }
@@ -17108,7 +17127,7 @@ const Lazyload = {
17108
17127
  });
17109
17128
  }
17110
17129
  };
17111
- const version = "4.9.21";
17130
+ const version = "4.9.22";
17112
17131
  function install(app) {
17113
17132
  const components = [
17114
17133
  ActionBar,