vant 4.0.0-rc.4 → 4.0.0-rc.5

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 (42) hide show
  1. package/changelog.generated.md +39 -27
  2. package/es/date-picker/DatePicker.mjs +4 -1
  3. package/es/date-picker/utils.d.ts +1 -0
  4. package/es/date-picker/utils.mjs +11 -0
  5. package/es/field/Field.mjs +3 -3
  6. package/es/field/index.css +1 -1
  7. package/es/field/types.d.ts +1 -1
  8. package/es/index.d.ts +1 -1
  9. package/es/index.mjs +1 -1
  10. package/es/loading/Loading.mjs +8 -4
  11. package/es/nav-bar/NavBar.d.ts +13 -0
  12. package/es/nav-bar/NavBar.mjs +4 -3
  13. package/es/nav-bar/index.d.ts +9 -0
  14. package/es/stepper/Stepper.d.ts +13 -0
  15. package/es/stepper/Stepper.mjs +4 -3
  16. package/es/stepper/index.d.ts +9 -0
  17. package/es/tabs/Tabs.mjs +44 -41
  18. package/es/time-picker/TimePicker.mjs +4 -3
  19. package/lib/date-picker/DatePicker.js +3 -0
  20. package/lib/date-picker/utils.d.ts +1 -0
  21. package/lib/date-picker/utils.js +11 -0
  22. package/lib/field/Field.js +3 -3
  23. package/lib/field/index.css +1 -1
  24. package/lib/field/types.d.ts +1 -1
  25. package/lib/index.css +1 -1
  26. package/lib/index.d.ts +1 -1
  27. package/lib/index.js +1 -1
  28. package/lib/loading/Loading.js +8 -4
  29. package/lib/nav-bar/NavBar.d.ts +13 -0
  30. package/lib/nav-bar/NavBar.js +4 -3
  31. package/lib/nav-bar/index.d.ts +9 -0
  32. package/lib/stepper/Stepper.d.ts +13 -0
  33. package/lib/stepper/Stepper.js +4 -3
  34. package/lib/stepper/index.d.ts +9 -0
  35. package/lib/tabs/Tabs.js +44 -41
  36. package/lib/time-picker/TimePicker.js +3 -2
  37. package/lib/vant.cjs.js +80 -57
  38. package/lib/vant.es.js +80 -57
  39. package/lib/vant.js +80 -57
  40. package/lib/vant.min.js +1 -1
  41. package/lib/web-types.json +336 -312
  42. package/package.json +2 -2
package/lib/index.d.ts CHANGED
@@ -93,4 +93,4 @@ declare namespace _default {
93
93
  }
94
94
  export default _default;
95
95
  export function install(app: any): void;
96
- export const version: "4.0.0-rc.4";
96
+ export const version: "4.0.0-rc.5";
package/lib/index.js CHANGED
@@ -200,7 +200,7 @@ __reExport(stdin_exports, require("./time-picker"), module.exports);
200
200
  __reExport(stdin_exports, require("./toast"), module.exports);
201
201
  __reExport(stdin_exports, require("./tree-select"), module.exports);
202
202
  __reExport(stdin_exports, require("./uploader"), module.exports);
203
- const version = "4.0.0-rc.4";
203
+ const version = "4.0.0-rc.5";
204
204
  function install(app) {
205
205
  const components = [
206
206
  import_action_bar.ActionBar,
@@ -54,6 +54,13 @@ var stdin_default = (0, import_vue2.defineComponent)({
54
54
  const spinnerStyle = (0, import_vue2.computed)(() => (0, import_utils.extend)({
55
55
  color: props.color
56
56
  }, (0, import_utils.getSizeStyle)(props.size)));
57
+ const renderIcon = () => {
58
+ const DefaultIcon = props.type === "spinner" ? SpinIcon : CircularIcon;
59
+ return (0, import_vue.createVNode)("span", {
60
+ "class": bem("spinner", props.type),
61
+ "style": spinnerStyle.value
62
+ }, [slots.icon ? slots.icon() : DefaultIcon]);
63
+ };
57
64
  const renderText = () => {
58
65
  var _a;
59
66
  if (slots.default) {
@@ -77,10 +84,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
77
84
  }]),
78
85
  "aria-live": "polite",
79
86
  "aria-busy": true
80
- }, [(0, import_vue.createVNode)("span", {
81
- "class": bem("spinner", type),
82
- "style": spinnerStyle.value
83
- }, [type === "spinner" ? SpinIcon : CircularIcon]), renderText()]);
87
+ }, [renderIcon(), renderText()]);
84
88
  };
85
89
  }
86
90
  });
@@ -12,6 +12,10 @@ export declare const navBarProps: {
12
12
  leftArrow: BooleanConstructor;
13
13
  placeholder: BooleanConstructor;
14
14
  safeAreaInsetTop: BooleanConstructor;
15
+ clickable: {
16
+ type: BooleanConstructor;
17
+ default: true;
18
+ };
15
19
  };
16
20
  export declare type NavBarProps = ExtractPropTypes<typeof navBarProps>;
17
21
  declare const _default: import("vue").DefineComponent<{
@@ -27,6 +31,10 @@ declare const _default: import("vue").DefineComponent<{
27
31
  leftArrow: BooleanConstructor;
28
32
  placeholder: BooleanConstructor;
29
33
  safeAreaInsetTop: BooleanConstructor;
34
+ clickable: {
35
+ type: BooleanConstructor;
36
+ default: true;
37
+ };
30
38
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickLeft" | "clickRight")[], "clickLeft" | "clickRight", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
31
39
  title: StringConstructor;
32
40
  fixed: BooleanConstructor;
@@ -40,12 +48,17 @@ declare const _default: import("vue").DefineComponent<{
40
48
  leftArrow: BooleanConstructor;
41
49
  placeholder: BooleanConstructor;
42
50
  safeAreaInsetTop: BooleanConstructor;
51
+ clickable: {
52
+ type: BooleanConstructor;
53
+ default: true;
54
+ };
43
55
  }>> & {
44
56
  onClickLeft?: ((...args: any[]) => any) | undefined;
45
57
  onClickRight?: ((...args: any[]) => any) | undefined;
46
58
  }, {
47
59
  fixed: boolean;
48
60
  border: boolean;
61
+ clickable: boolean;
49
62
  placeholder: boolean;
50
63
  safeAreaInsetTop: boolean;
51
64
  leftArrow: boolean;
@@ -36,7 +36,8 @@ const navBarProps = {
36
36
  rightText: String,
37
37
  leftArrow: Boolean,
38
38
  placeholder: Boolean,
39
- safeAreaInsetTop: Boolean
39
+ safeAreaInsetTop: Boolean,
40
+ clickable: import_utils.truthProp
40
41
  };
41
42
  var stdin_default = (0, import_vue2.defineComponent)({
42
43
  name,
@@ -91,12 +92,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
91
92
  }, [(0, import_vue.createVNode)("div", {
92
93
  "class": bem("content")
93
94
  }, [hasLeft && (0, import_vue.createVNode)("div", {
94
- "class": [bem("left"), import_utils.HAPTICS_FEEDBACK],
95
+ "class": [bem("left"), props.clickable ? import_utils.HAPTICS_FEEDBACK : ""],
95
96
  "onClick": onClickLeft
96
97
  }, [renderLeft()]), (0, import_vue.createVNode)("div", {
97
98
  "class": [bem("title"), "van-ellipsis"]
98
99
  }, [slots.title ? slots.title() : title]), hasRight && (0, import_vue.createVNode)("div", {
99
- "class": [bem("right"), import_utils.HAPTICS_FEEDBACK],
100
+ "class": [bem("right"), props.clickable ? import_utils.HAPTICS_FEEDBACK : ""],
100
101
  "onClick": onClickRight
101
102
  }, [renderRight()])])]);
102
103
  };
@@ -11,6 +11,10 @@ export declare const NavBar: import("../utils").WithInstall<import("vue").Define
11
11
  leftArrow: BooleanConstructor;
12
12
  placeholder: BooleanConstructor;
13
13
  safeAreaInsetTop: BooleanConstructor;
14
+ clickable: {
15
+ type: BooleanConstructor;
16
+ default: true;
17
+ };
14
18
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickLeft" | "clickRight")[], "clickLeft" | "clickRight", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
19
  title: StringConstructor;
16
20
  fixed: BooleanConstructor;
@@ -24,12 +28,17 @@ export declare const NavBar: import("../utils").WithInstall<import("vue").Define
24
28
  leftArrow: BooleanConstructor;
25
29
  placeholder: BooleanConstructor;
26
30
  safeAreaInsetTop: BooleanConstructor;
31
+ clickable: {
32
+ type: BooleanConstructor;
33
+ default: true;
34
+ };
27
35
  }>> & {
28
36
  onClickLeft?: ((...args: any[]) => any) | undefined;
29
37
  onClickRight?: ((...args: any[]) => any) | undefined;
30
38
  }, {
31
39
  fixed: boolean;
32
40
  border: boolean;
41
+ clickable: boolean;
33
42
  placeholder: boolean;
34
43
  safeAreaInsetTop: boolean;
35
44
  leftArrow: boolean;
@@ -37,6 +37,10 @@ export declare const stepperProps: {
37
37
  type: BooleanConstructor;
38
38
  default: true;
39
39
  };
40
+ autoFixed: {
41
+ type: BooleanConstructor;
42
+ default: true;
43
+ };
40
44
  allowEmpty: BooleanConstructor;
41
45
  modelValue: (NumberConstructor | StringConstructor)[];
42
46
  inputWidth: (NumberConstructor | StringConstructor)[];
@@ -89,6 +93,10 @@ declare const _default: import("vue").DefineComponent<{
89
93
  type: BooleanConstructor;
90
94
  default: true;
91
95
  };
96
+ autoFixed: {
97
+ type: BooleanConstructor;
98
+ default: true;
99
+ };
92
100
  allowEmpty: BooleanConstructor;
93
101
  modelValue: (NumberConstructor | StringConstructor)[];
94
102
  inputWidth: (NumberConstructor | StringConstructor)[];
@@ -139,6 +147,10 @@ declare const _default: import("vue").DefineComponent<{
139
147
  type: BooleanConstructor;
140
148
  default: true;
141
149
  };
150
+ autoFixed: {
151
+ type: BooleanConstructor;
152
+ default: true;
153
+ };
142
154
  allowEmpty: BooleanConstructor;
143
155
  modelValue: (NumberConstructor | StringConstructor)[];
144
156
  inputWidth: (NumberConstructor | StringConstructor)[];
@@ -172,6 +184,7 @@ declare const _default: import("vue").DefineComponent<{
172
184
  showMinus: boolean;
173
185
  showInput: boolean;
174
186
  longPress: boolean;
187
+ autoFixed: boolean;
175
188
  allowEmpty: boolean;
176
189
  disablePlus: boolean;
177
190
  disableMinus: boolean;
@@ -41,6 +41,7 @@ const stepperProps = {
41
41
  showMinus: import_utils.truthProp,
42
42
  showInput: import_utils.truthProp,
43
43
  longPress: import_utils.truthProp,
44
+ autoFixed: import_utils.truthProp,
44
45
  allowEmpty: Boolean,
45
46
  modelValue: import_utils.numericProp,
46
47
  inputWidth: import_utils.numericProp,
@@ -60,7 +61,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
60
61
  setup(props, {
61
62
  emit
62
63
  }) {
63
- const format = (value) => {
64
+ const format = (value, autoFixed = true) => {
64
65
  const {
65
66
  min,
66
67
  max,
@@ -73,7 +74,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
73
74
  value = (0, import_utils.formatNumber)(String(value), !props.integer);
74
75
  value = value === "" ? 0 : +value;
75
76
  value = Number.isNaN(value) ? +min : value;
76
- value = Math.max(Math.min(+max, value), +min);
77
+ value = autoFixed ? Math.max(Math.min(+max, value), +min) : value;
77
78
  if ((0, import_utils.isDef)(decimalLength)) {
78
79
  value = value.toFixed(+decimalLength);
79
80
  }
@@ -157,7 +158,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
157
158
  };
158
159
  const onBlur = (event) => {
159
160
  const input = event.target;
160
- const value = format(input.value);
161
+ const value = format(input.value, props.autoFixed);
161
162
  input.value = String(value);
162
163
  current.value = value;
163
164
  (0, import_vue2.nextTick)(() => {
@@ -34,6 +34,10 @@ export declare const Stepper: import("../utils").WithInstall<import("vue").Defin
34
34
  type: BooleanConstructor;
35
35
  default: true;
36
36
  };
37
+ autoFixed: {
38
+ type: BooleanConstructor;
39
+ default: true;
40
+ };
37
41
  allowEmpty: BooleanConstructor;
38
42
  modelValue: (NumberConstructor | StringConstructor)[];
39
43
  inputWidth: (NumberConstructor | StringConstructor)[];
@@ -84,6 +88,10 @@ export declare const Stepper: import("../utils").WithInstall<import("vue").Defin
84
88
  type: BooleanConstructor;
85
89
  default: true;
86
90
  };
91
+ autoFixed: {
92
+ type: BooleanConstructor;
93
+ default: true;
94
+ };
87
95
  allowEmpty: BooleanConstructor;
88
96
  modelValue: (NumberConstructor | StringConstructor)[];
89
97
  inputWidth: (NumberConstructor | StringConstructor)[];
@@ -117,6 +125,7 @@ export declare const Stepper: import("../utils").WithInstall<import("vue").Defin
117
125
  showMinus: boolean;
118
126
  showInput: boolean;
119
127
  longPress: boolean;
128
+ autoFixed: boolean;
120
129
  allowEmpty: boolean;
121
130
  disablePlus: boolean;
122
131
  disableMinus: boolean;
package/lib/tabs/Tabs.js CHANGED
@@ -171,17 +171,19 @@ var stdin_default = (0, import_vue2.defineComponent)({
171
171
  const newTab = children[newIndex];
172
172
  const newName = getTabName(newTab, newIndex);
173
173
  const shouldEmitChange = state.currentIndex !== null;
174
- state.currentIndex = newIndex;
174
+ if (state.currentIndex !== newIndex) {
175
+ state.currentIndex = newIndex;
176
+ if (!skipScrollIntoView) {
177
+ scrollIntoView();
178
+ }
179
+ setLine();
180
+ }
175
181
  if (newName !== props.active) {
176
182
  emit("update:active", newName);
177
183
  if (shouldEmitChange) {
178
184
  emit("change", newName, newTab.title);
179
185
  }
180
186
  }
181
- if (!skipScrollIntoView) {
182
- scrollIntoView();
183
- }
184
- setLine();
185
187
  if (stickyFixed && !props.scrollspy) {
186
188
  (0, import_utils.setRootScrollTop)(Math.ceil((0, import_utils.getElementTop)(root.value) - offsetTopPx.value));
187
189
  }
@@ -280,13 +282,14 @@ var stdin_default = (0, import_vue2.defineComponent)({
280
282
  }
281
283
  };
282
284
  const renderHeader = () => {
283
- var _a, _b;
285
+ var _a, _b, _c;
284
286
  const {
285
287
  type,
286
- border
288
+ border,
289
+ sticky
287
290
  } = props;
288
- return (0, import_vue.createVNode)("div", {
289
- "ref": wrapRef,
291
+ const Header = [(0, import_vue.createVNode)("div", {
292
+ "ref": sticky ? void 0 : wrapRef,
290
293
  "class": [bem("wrap"), {
291
294
  [import_utils.BORDER_TOP_BOTTOM]: type === "line" && border
292
295
  }]
@@ -299,7 +302,13 @@ var stdin_default = (0, import_vue2.defineComponent)({
299
302
  }]),
300
303
  "style": navStyle.value,
301
304
  "aria-orientation": "horizontal"
302
- }, [(_a = slots["nav-left"]) == null ? void 0 : _a.call(slots), renderNav(), renderLine(), (_b = slots["nav-right"]) == null ? void 0 : _b.call(slots)])]);
305
+ }, [(_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)];
306
+ if (sticky) {
307
+ return (0, import_vue.createVNode)("div", {
308
+ "ref": wrapRef
309
+ }, [Header]);
310
+ }
311
+ return Header;
303
312
  };
304
313
  (0, import_vue2.watch)([() => props.color, import_utils.windowWidth], setLine);
305
314
  (0, import_vue2.watch)(() => props.active, (value) => {
@@ -353,36 +362,30 @@ var stdin_default = (0, import_vue2.defineComponent)({
353
362
  currentName,
354
363
  scrollIntoView
355
364
  });
356
- return () => {
357
- var _a;
358
- return (0, import_vue.createVNode)("div", {
359
- "ref": root,
360
- "class": bem([props.type])
361
- }, [props.sticky ? (0, import_vue.createVNode)(import_sticky.Sticky, {
362
- "container": root.value,
363
- "offsetTop": offsetTopPx.value,
364
- "onScroll": onStickyScroll
365
- }, {
366
- default: () => {
367
- var _a2;
368
- return [renderHeader(), (_a2 = slots["nav-bottom"]) == null ? void 0 : _a2.call(slots)];
369
- }
370
- }) : [renderHeader(), (_a = slots["nav-bottom"]) == null ? void 0 : _a.call(slots)], (0, import_vue.createVNode)(import_TabsContent.default, {
371
- "ref": contentRef,
372
- "count": children.length,
373
- "inited": state.inited,
374
- "animated": props.animated,
375
- "duration": props.duration,
376
- "swipeable": props.swipeable,
377
- "lazyRender": props.lazyRender,
378
- "currentIndex": state.currentIndex,
379
- "onChange": setCurrentIndex
380
- }, {
381
- default: () => {
382
- var _a2;
383
- return [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)];
384
- }
385
- })]);
386
- };
365
+ return () => (0, import_vue.createVNode)("div", {
366
+ "ref": root,
367
+ "class": bem([props.type])
368
+ }, [props.sticky ? (0, import_vue.createVNode)(import_sticky.Sticky, {
369
+ "container": root.value,
370
+ "offsetTop": offsetTopPx.value,
371
+ "onScroll": onStickyScroll
372
+ }, {
373
+ default: () => [renderHeader()]
374
+ }) : renderHeader(), (0, import_vue.createVNode)(import_TabsContent.default, {
375
+ "ref": contentRef,
376
+ "count": children.length,
377
+ "inited": state.inited,
378
+ "animated": props.animated,
379
+ "duration": props.duration,
380
+ "swipeable": props.swipeable,
381
+ "lazyRender": props.lazyRender,
382
+ "currentIndex": state.currentIndex,
383
+ "onChange": setCurrentIndex
384
+ }, {
385
+ default: () => {
386
+ var _a;
387
+ return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
388
+ }
389
+ })]);
387
390
  }
388
391
  });
@@ -68,13 +68,14 @@ var stdin_default = (0, import_vue2.defineComponent)({
68
68
  if (!(0, import_utils.isSameValue)(newValues, props.modelValue)) {
69
69
  emit("update:modelValue", newValues);
70
70
  }
71
- }, {
72
- immediate: true
73
71
  });
74
72
  (0, import_vue2.watch)(() => props.modelValue, (newValues) => {
73
+ newValues = (0, import_utils2.formatValueRange)(newValues, columns.value);
75
74
  if (!(0, import_utils.isSameValue)(newValues, currentValues.value)) {
76
75
  currentValues.value = newValues;
77
76
  }
77
+ }, {
78
+ immediate: true
78
79
  });
79
80
  const onChange = (...args) => emit("change", ...args);
80
81
  const onCancel = (...args) => emit("cancel", ...args);
package/lib/vant.cjs.js CHANGED
@@ -739,6 +739,13 @@ var stdin_default$1z = vue.defineComponent({
739
739
  const spinnerStyle = vue.computed(() => extend({
740
740
  color: props.color
741
741
  }, getSizeStyle(props.size)));
742
+ const renderIcon = () => {
743
+ const DefaultIcon = props.type === "spinner" ? SpinIcon : CircularIcon;
744
+ return vue.createVNode("span", {
745
+ "class": bem$1n("spinner", props.type),
746
+ "style": spinnerStyle.value
747
+ }, [slots.icon ? slots.icon() : DefaultIcon]);
748
+ };
742
749
  const renderText = () => {
743
750
  var _a;
744
751
  if (slots.default) {
@@ -762,10 +769,7 @@ var stdin_default$1z = vue.defineComponent({
762
769
  }]),
763
770
  "aria-live": "polite",
764
771
  "aria-busy": true
765
- }, [vue.createVNode("span", {
766
- "class": bem$1n("spinner", type),
767
- "style": spinnerStyle.value
768
- }, [type === "spinner" ? SpinIcon : CircularIcon]), renderText()]);
772
+ }, [renderIcon(), renderText()]);
769
773
  };
770
774
  }
771
775
  });
@@ -2643,17 +2647,19 @@ var stdin_default$1m = vue.defineComponent({
2643
2647
  const newTab = children[newIndex];
2644
2648
  const newName = getTabName(newTab, newIndex);
2645
2649
  const shouldEmitChange = state.currentIndex !== null;
2646
- state.currentIndex = newIndex;
2650
+ if (state.currentIndex !== newIndex) {
2651
+ state.currentIndex = newIndex;
2652
+ if (!skipScrollIntoView) {
2653
+ scrollIntoView();
2654
+ }
2655
+ setLine();
2656
+ }
2647
2657
  if (newName !== props.active) {
2648
2658
  emit("update:active", newName);
2649
2659
  if (shouldEmitChange) {
2650
2660
  emit("change", newName, newTab.title);
2651
2661
  }
2652
2662
  }
2653
- if (!skipScrollIntoView) {
2654
- scrollIntoView();
2655
- }
2656
- setLine();
2657
2663
  if (stickyFixed && !props.scrollspy) {
2658
2664
  setRootScrollTop(Math.ceil(getElementTop(root.value) - offsetTopPx.value));
2659
2665
  }
@@ -2752,13 +2758,14 @@ var stdin_default$1m = vue.defineComponent({
2752
2758
  }
2753
2759
  };
2754
2760
  const renderHeader = () => {
2755
- var _a, _b;
2761
+ var _a, _b, _c;
2756
2762
  const {
2757
2763
  type,
2758
- border
2764
+ border,
2765
+ sticky
2759
2766
  } = props;
2760
- return vue.createVNode("div", {
2761
- "ref": wrapRef,
2767
+ const Header = [vue.createVNode("div", {
2768
+ "ref": sticky ? void 0 : wrapRef,
2762
2769
  "class": [bem$1a("wrap"), {
2763
2770
  [BORDER_TOP_BOTTOM]: type === "line" && border
2764
2771
  }]
@@ -2771,7 +2778,13 @@ var stdin_default$1m = vue.defineComponent({
2771
2778
  }]),
2772
2779
  "style": navStyle.value,
2773
2780
  "aria-orientation": "horizontal"
2774
- }, [(_a = slots["nav-left"]) == null ? void 0 : _a.call(slots), renderNav(), renderLine(), (_b = slots["nav-right"]) == null ? void 0 : _b.call(slots)])]);
2781
+ }, [(_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)];
2782
+ if (sticky) {
2783
+ return vue.createVNode("div", {
2784
+ "ref": wrapRef
2785
+ }, [Header]);
2786
+ }
2787
+ return Header;
2775
2788
  };
2776
2789
  vue.watch([() => props.color, windowWidth], setLine);
2777
2790
  vue.watch(() => props.active, (value) => {
@@ -2825,37 +2838,31 @@ var stdin_default$1m = vue.defineComponent({
2825
2838
  currentName,
2826
2839
  scrollIntoView
2827
2840
  });
2828
- return () => {
2829
- var _a;
2830
- return vue.createVNode("div", {
2831
- "ref": root,
2832
- "class": bem$1a([props.type])
2833
- }, [props.sticky ? vue.createVNode(Sticky, {
2834
- "container": root.value,
2835
- "offsetTop": offsetTopPx.value,
2836
- "onScroll": onStickyScroll
2837
- }, {
2838
- default: () => {
2839
- var _a2;
2840
- return [renderHeader(), (_a2 = slots["nav-bottom"]) == null ? void 0 : _a2.call(slots)];
2841
- }
2842
- }) : [renderHeader(), (_a = slots["nav-bottom"]) == null ? void 0 : _a.call(slots)], vue.createVNode(stdin_default$1n, {
2843
- "ref": contentRef,
2844
- "count": children.length,
2845
- "inited": state.inited,
2846
- "animated": props.animated,
2847
- "duration": props.duration,
2848
- "swipeable": props.swipeable,
2849
- "lazyRender": props.lazyRender,
2850
- "currentIndex": state.currentIndex,
2851
- "onChange": setCurrentIndex
2852
- }, {
2853
- default: () => {
2854
- var _a2;
2855
- return [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)];
2856
- }
2857
- })]);
2858
- };
2841
+ return () => vue.createVNode("div", {
2842
+ "ref": root,
2843
+ "class": bem$1a([props.type])
2844
+ }, [props.sticky ? vue.createVNode(Sticky, {
2845
+ "container": root.value,
2846
+ "offsetTop": offsetTopPx.value,
2847
+ "onScroll": onStickyScroll
2848
+ }, {
2849
+ default: () => [renderHeader()]
2850
+ }) : renderHeader(), vue.createVNode(stdin_default$1n, {
2851
+ "ref": contentRef,
2852
+ "count": children.length,
2853
+ "inited": state.inited,
2854
+ "animated": props.animated,
2855
+ "duration": props.duration,
2856
+ "swipeable": props.swipeable,
2857
+ "lazyRender": props.lazyRender,
2858
+ "currentIndex": state.currentIndex,
2859
+ "onChange": setCurrentIndex
2860
+ }, {
2861
+ default: () => {
2862
+ var _a;
2863
+ return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
2864
+ }
2865
+ })]);
2859
2866
  }
2860
2867
  });
2861
2868
  const TAB_STATUS_KEY = Symbol();
@@ -4191,9 +4198,9 @@ var stdin_default$1e = vue.defineComponent({
4191
4198
  const labelAlign = getProp("labelAlign");
4192
4199
  const Label = renderLabel();
4193
4200
  const LeftIcon = renderLeftIcon();
4201
+ const renderTitle = () => labelAlign === "top" ? [LeftIcon, Label] : Label;
4194
4202
  return vue.createVNode(Cell, {
4195
4203
  "size": props.size,
4196
- "icon": props.leftIcon,
4197
4204
  "class": bem$13({
4198
4205
  error: showError.value,
4199
4206
  disabled,
@@ -4210,8 +4217,8 @@ var stdin_default$1e = vue.defineComponent({
4210
4217
  }]), props.labelClass],
4211
4218
  "arrowDirection": props.arrowDirection
4212
4219
  }, {
4213
- icon: LeftIcon ? () => LeftIcon : null,
4214
- title: Label ? () => Label : null,
4220
+ icon: LeftIcon && labelAlign !== "top" ? () => LeftIcon : null,
4221
+ title: Label || labelAlign === "top" ? renderTitle : null,
4215
4222
  value: renderFieldBody,
4216
4223
  extra: slots.extra
4217
4224
  });
@@ -5399,6 +5406,16 @@ const genOptions = (min, max, type, formatter, filter) => {
5399
5406
  });
5400
5407
  return filter ? filter(type, options) : options;
5401
5408
  };
5409
+ const formatValueRange = (values, columns) => values.map((value, index) => {
5410
+ const column = columns[index];
5411
+ if (column.length) {
5412
+ const maxValue = +column[column.length - 1].value;
5413
+ if (+value > maxValue) {
5414
+ return String(maxValue);
5415
+ }
5416
+ }
5417
+ return value;
5418
+ });
5402
5419
  const [name$Y] = createNamespace("calendar-day");
5403
5420
  var stdin_default$13 = vue.defineComponent({
5404
5421
  name: name$Y,
@@ -8334,9 +8351,12 @@ var stdin_default$I = vue.defineComponent({
8334
8351
  }
8335
8352
  });
8336
8353
  vue.watch(() => props.modelValue, (newValues) => {
8354
+ newValues = formatValueRange(newValues, columns.value);
8337
8355
  if (!isSameValue(newValues, currentValues.value)) {
8338
8356
  currentValues.value = newValues;
8339
8357
  }
8358
+ }, {
8359
+ immediate: true
8340
8360
  });
8341
8361
  const onChange = (...args) => emit("change", ...args);
8342
8362
  const onCancel = (...args) => emit("cancel", ...args);
@@ -10017,7 +10037,8 @@ const navBarProps = {
10017
10037
  rightText: String,
10018
10038
  leftArrow: Boolean,
10019
10039
  placeholder: Boolean,
10020
- safeAreaInsetTop: Boolean
10040
+ safeAreaInsetTop: Boolean,
10041
+ clickable: truthProp
10021
10042
  };
10022
10043
  var stdin_default$w = vue.defineComponent({
10023
10044
  name: name$r,
@@ -10072,12 +10093,12 @@ var stdin_default$w = vue.defineComponent({
10072
10093
  }, [vue.createVNode("div", {
10073
10094
  "class": bem$q("content")
10074
10095
  }, [hasLeft && vue.createVNode("div", {
10075
- "class": [bem$q("left"), HAPTICS_FEEDBACK],
10096
+ "class": [bem$q("left"), props.clickable ? HAPTICS_FEEDBACK : ""],
10076
10097
  "onClick": onClickLeft
10077
10098
  }, [renderLeft()]), vue.createVNode("div", {
10078
10099
  "class": [bem$q("title"), "van-ellipsis"]
10079
10100
  }, [slots.title ? slots.title() : title]), hasRight && vue.createVNode("div", {
10080
- "class": [bem$q("right"), HAPTICS_FEEDBACK],
10101
+ "class": [bem$q("right"), props.clickable ? HAPTICS_FEEDBACK : ""],
10081
10102
  "onClick": onClickRight
10082
10103
  }, [renderRight()])])]);
10083
10104
  };
@@ -12410,6 +12431,7 @@ const stepperProps = {
12410
12431
  showMinus: truthProp,
12411
12432
  showInput: truthProp,
12412
12433
  longPress: truthProp,
12434
+ autoFixed: truthProp,
12413
12435
  allowEmpty: Boolean,
12414
12436
  modelValue: numericProp,
12415
12437
  inputWidth: numericProp,
@@ -12429,7 +12451,7 @@ var stdin_default$c = vue.defineComponent({
12429
12451
  setup(props, {
12430
12452
  emit
12431
12453
  }) {
12432
- const format2 = (value) => {
12454
+ const format2 = (value, autoFixed = true) => {
12433
12455
  const {
12434
12456
  min,
12435
12457
  max,
@@ -12442,7 +12464,7 @@ var stdin_default$c = vue.defineComponent({
12442
12464
  value = formatNumber(String(value), !props.integer);
12443
12465
  value = value === "" ? 0 : +value;
12444
12466
  value = Number.isNaN(value) ? +min : value;
12445
- value = Math.max(Math.min(+max, value), +min);
12467
+ value = autoFixed ? Math.max(Math.min(+max, value), +min) : value;
12446
12468
  if (isDef(decimalLength)) {
12447
12469
  value = value.toFixed(+decimalLength);
12448
12470
  }
@@ -12526,7 +12548,7 @@ var stdin_default$c = vue.defineComponent({
12526
12548
  };
12527
12549
  const onBlur = (event) => {
12528
12550
  const input = event.target;
12529
- const value = format2(input.value);
12551
+ const value = format2(input.value, props.autoFixed);
12530
12552
  input.value = String(value);
12531
12553
  current2.value = value;
12532
12554
  vue.nextTick(() => {
@@ -13125,13 +13147,14 @@ var stdin_default$7 = vue.defineComponent({
13125
13147
  if (!isSameValue(newValues, props.modelValue)) {
13126
13148
  emit("update:modelValue", newValues);
13127
13149
  }
13128
- }, {
13129
- immediate: true
13130
13150
  });
13131
13151
  vue.watch(() => props.modelValue, (newValues) => {
13152
+ newValues = formatValueRange(newValues, columns.value);
13132
13153
  if (!isSameValue(newValues, currentValues.value)) {
13133
13154
  currentValues.value = newValues;
13134
13155
  }
13156
+ }, {
13157
+ immediate: true
13135
13158
  });
13136
13159
  const onChange = (...args) => emit("change", ...args);
13137
13160
  const onCancel = (...args) => emit("cancel", ...args);
@@ -14552,7 +14575,7 @@ const Lazyload = {
14552
14575
  });
14553
14576
  }
14554
14577
  };
14555
- const version = "4.0.0-rc.4";
14578
+ const version = "4.0.0-rc.5";
14556
14579
  function install(app) {
14557
14580
  const components = [
14558
14581
  ActionBar,