vant 4.7.2 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +1 -0
  2. package/es/address-edit/AddressEdit.mjs +1 -1
  3. package/es/calendar/Calendar.mjs +20 -17
  4. package/es/cell/Cell.d.ts +17 -5
  5. package/es/cell/Cell.mjs +5 -2
  6. package/es/cell/index.d.ts +9 -3
  7. package/es/checkbox/Checker.mjs +7 -1
  8. package/es/col/Col.mjs +11 -3
  9. package/es/collapse-item/CollapseItem.d.ts +13 -4
  10. package/es/collapse-item/index.d.ts +9 -3
  11. package/es/config-provider/types.d.ts +1 -1
  12. package/es/field/Field.d.ts +30 -21
  13. package/es/field/Field.mjs +11 -3
  14. package/es/field/index.css +1 -1
  15. package/es/field/index.d.ts +18 -12
  16. package/es/field/types.d.ts +1 -1
  17. package/es/form/Form.d.ts +3 -0
  18. package/es/form/Form.mjs +1 -0
  19. package/es/form/index.d.ts +2 -0
  20. package/es/highlight/Highlight.d.ts +96 -0
  21. package/es/highlight/Highlight.mjs +122 -0
  22. package/es/highlight/index.css +1 -0
  23. package/es/highlight/index.d.ts +73 -0
  24. package/es/highlight/index.mjs +10 -0
  25. package/es/highlight/style/index.d.ts +1 -0
  26. package/es/highlight/style/index.mjs +2 -0
  27. package/es/highlight/types.d.ts +3 -0
  28. package/es/highlight/types.mjs +0 -0
  29. package/es/image-preview/ImagePreview.mjs +10 -0
  30. package/es/image-preview/ImagePreviewItem.d.ts +27 -1
  31. package/es/image-preview/ImagePreviewItem.mjs +17 -12
  32. package/es/image-preview/types.d.ts +7 -0
  33. package/es/index.d.ts +2 -1
  34. package/es/index.mjs +4 -1
  35. package/es/locale/lang/ar-SA.d.ts +63 -0
  36. package/es/locale/lang/ar-SA.mjs +65 -0
  37. package/es/picker-group/PickerGroup.mjs +3 -3
  38. package/es/progress/types.d.ts +1 -4
  39. package/es/row/Row.d.ts +8 -4
  40. package/es/row/Row.mjs +35 -4
  41. package/es/row/index.d.ts +3 -3
  42. package/es/search/Search.d.ts +13 -13
  43. package/es/search/Search.mjs +3 -1
  44. package/es/search/index.css +1 -1
  45. package/es/search/index.d.ts +9 -9
  46. package/es/signature/Signature.mjs +16 -3
  47. package/es/signature/index.d.ts +1 -1
  48. package/es/signature/types.d.ts +6 -0
  49. package/es/tabs/Tabs.d.ts +13 -0
  50. package/es/tabs/Tabs.mjs +3 -2
  51. package/es/tabs/index.d.ts +9 -0
  52. package/es/text-ellipsis/index.css +1 -1
  53. package/lib/address-edit/AddressEdit.js +1 -1
  54. package/lib/calendar/Calendar.js +20 -17
  55. package/lib/cell/Cell.d.ts +17 -5
  56. package/lib/cell/Cell.js +5 -2
  57. package/lib/cell/index.d.ts +9 -3
  58. package/lib/checkbox/Checker.js +7 -1
  59. package/lib/col/Col.js +10 -2
  60. package/lib/collapse-item/CollapseItem.d.ts +13 -4
  61. package/lib/collapse-item/index.d.ts +9 -3
  62. package/lib/config-provider/types.d.ts +1 -1
  63. package/lib/field/Field.d.ts +30 -21
  64. package/lib/field/Field.js +11 -3
  65. package/lib/field/index.css +1 -1
  66. package/lib/field/index.d.ts +18 -12
  67. package/lib/field/types.d.ts +1 -1
  68. package/lib/form/Form.d.ts +3 -0
  69. package/lib/form/Form.js +1 -0
  70. package/lib/form/index.d.ts +2 -0
  71. package/lib/highlight/Highlight.d.ts +96 -0
  72. package/lib/highlight/Highlight.js +141 -0
  73. package/lib/highlight/index.css +1 -0
  74. package/lib/highlight/index.d.ts +73 -0
  75. package/lib/highlight/index.js +39 -0
  76. package/lib/highlight/style/index.d.ts +1 -0
  77. package/lib/highlight/style/index.js +2 -0
  78. package/lib/highlight/types.d.ts +3 -0
  79. package/lib/highlight/types.js +15 -0
  80. package/lib/image-preview/ImagePreview.js +10 -0
  81. package/lib/image-preview/ImagePreviewItem.d.ts +27 -1
  82. package/lib/image-preview/ImagePreviewItem.js +17 -12
  83. package/lib/image-preview/types.d.ts +7 -0
  84. package/lib/index.css +1 -1
  85. package/lib/index.d.ts +2 -1
  86. package/lib/index.js +4 -1
  87. package/lib/locale/lang/ar-SA.d.ts +63 -0
  88. package/lib/locale/lang/ar-SA.js +84 -0
  89. package/lib/picker-group/PickerGroup.js +2 -2
  90. package/lib/progress/types.d.ts +1 -4
  91. package/lib/row/Row.d.ts +8 -4
  92. package/lib/row/Row.js +34 -3
  93. package/lib/row/index.d.ts +3 -3
  94. package/lib/search/Search.d.ts +13 -13
  95. package/lib/search/Search.js +3 -1
  96. package/lib/search/index.css +1 -1
  97. package/lib/search/index.d.ts +9 -9
  98. package/lib/signature/Signature.js +14 -1
  99. package/lib/signature/index.d.ts +1 -1
  100. package/lib/signature/types.d.ts +6 -0
  101. package/lib/tabs/Tabs.d.ts +13 -0
  102. package/lib/tabs/Tabs.js +3 -2
  103. package/lib/tabs/index.d.ts +9 -0
  104. package/lib/text-ellipsis/index.css +1 -1
  105. package/lib/vant.cjs.js +813 -605
  106. package/lib/vant.es.js +814 -606
  107. package/lib/vant.js +813 -605
  108. package/lib/vant.min.js +1 -1
  109. package/lib/web-types.json +1 -1
  110. package/package.json +2 -2
@@ -140,7 +140,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
140
140
  let bodyHeight;
141
141
  const bodyRef = (0, import_vue2.ref)();
142
142
  const subtitle = (0, import_vue2.ref)({
143
- text: "",
143
+ textFn: () => "",
144
144
  date: void 0
145
145
  });
146
146
  const currentDate = (0, import_vue2.ref)(getInitialDate());
@@ -204,7 +204,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
204
204
  });
205
205
  if (currentMonth) {
206
206
  subtitle.value = {
207
- text: currentMonth.getTitle(),
207
+ textFn: currentMonth.getTitle,
208
208
  date: currentMonth.date
209
209
  };
210
210
  }
@@ -394,21 +394,24 @@ var stdin_default = (0, import_vue2.defineComponent)({
394
394
  "van-safe-area-bottom": props.safeAreaInsetBottom
395
395
  }]
396
396
  }, [renderFooterButton()]);
397
- const renderCalendar = () => (0, import_vue.createVNode)("div", {
398
- "class": (0, import_utils2.bem)()
399
- }, [(0, import_vue.createVNode)(import_CalendarHeader.default, {
400
- "date": subtitle.value.date,
401
- "title": props.title,
402
- "subtitle": subtitle.value.text,
403
- "showTitle": props.showTitle,
404
- "showSubtitle": props.showSubtitle,
405
- "firstDayOfWeek": dayOffset.value,
406
- "onClickSubtitle": (event) => emit("clickSubtitle", event)
407
- }, (0, import_utils.pick)(slots, ["title", "subtitle"])), (0, import_vue.createVNode)("div", {
408
- "ref": bodyRef,
409
- "class": (0, import_utils2.bem)("body"),
410
- "onScroll": onScroll
411
- }, [months.value.map(renderMonth)]), renderFooter()]);
397
+ const renderCalendar = () => {
398
+ const subTitle = subtitle.value.textFn();
399
+ return (0, import_vue.createVNode)("div", {
400
+ "class": (0, import_utils2.bem)()
401
+ }, [(0, import_vue.createVNode)(import_CalendarHeader.default, {
402
+ "date": subtitle.value.date,
403
+ "title": props.title,
404
+ "subtitle": subTitle,
405
+ "showTitle": props.showTitle,
406
+ "showSubtitle": props.showSubtitle,
407
+ "firstDayOfWeek": dayOffset.value,
408
+ "onClickSubtitle": (event) => emit("clickSubtitle", event)
409
+ }, (0, import_utils.pick)(slots, ["title", "subtitle"])), (0, import_vue.createVNode)("div", {
410
+ "ref": bodyRef,
411
+ "class": (0, import_utils2.bem)("body"),
412
+ "onScroll": onScroll
413
+ }, [months.value.map(renderMonth)]), renderFooter()]);
414
+ };
412
415
  (0, import_vue2.watch)(() => props.show, init);
413
416
  (0, import_vue2.watch)(() => [props.type, props.minDate, props.maxDate], () => reset(getInitialDate(currentDate.value)));
414
417
  (0, import_vue2.watch)(() => props.defaultDate, (value = null) => {
@@ -17,13 +17,16 @@ export declare const cellSharedProps: {
17
17
  type: BooleanConstructor;
18
18
  default: true;
19
19
  };
20
- required: BooleanConstructor;
21
20
  iconPrefix: StringConstructor;
22
21
  valueClass: PropType<unknown>;
23
22
  labelClass: PropType<unknown>;
24
23
  titleClass: PropType<unknown>;
25
24
  titleStyle: PropType<string | CSSProperties>;
26
25
  arrowDirection: PropType<CellArrowDirection>;
26
+ required: {
27
+ type: PropType<boolean | "auto">;
28
+ default: null;
29
+ };
27
30
  clickable: {
28
31
  type: PropType<boolean | null>;
29
32
  default: null;
@@ -45,13 +48,16 @@ export declare const cellProps: {
45
48
  type: BooleanConstructor;
46
49
  default: true;
47
50
  };
48
- required: BooleanConstructor;
49
51
  iconPrefix: StringConstructor;
50
52
  valueClass: PropType<unknown>;
51
53
  labelClass: PropType<unknown>;
52
54
  titleClass: PropType<unknown>;
53
55
  titleStyle: PropType<string | CSSProperties>;
54
56
  arrowDirection: PropType<CellArrowDirection>;
57
+ required: {
58
+ type: PropType<boolean | "auto">;
59
+ default: null;
60
+ };
55
61
  clickable: {
56
62
  type: PropType<boolean | null>;
57
63
  default: null;
@@ -78,13 +84,16 @@ declare const _default: import("vue").DefineComponent<{
78
84
  type: BooleanConstructor;
79
85
  default: true;
80
86
  };
81
- required: BooleanConstructor;
82
87
  iconPrefix: StringConstructor;
83
88
  valueClass: PropType<unknown>;
84
89
  labelClass: PropType<unknown>;
85
90
  titleClass: PropType<unknown>;
86
91
  titleStyle: PropType<string | CSSProperties>;
87
92
  arrowDirection: PropType<CellArrowDirection>;
93
+ required: {
94
+ type: PropType<boolean | "auto">;
95
+ default: null;
96
+ };
88
97
  clickable: {
89
98
  type: PropType<boolean | null>;
90
99
  default: null;
@@ -109,13 +118,16 @@ declare const _default: import("vue").DefineComponent<{
109
118
  type: BooleanConstructor;
110
119
  default: true;
111
120
  };
112
- required: BooleanConstructor;
113
121
  iconPrefix: StringConstructor;
114
122
  valueClass: PropType<unknown>;
115
123
  labelClass: PropType<unknown>;
116
124
  titleClass: PropType<unknown>;
117
125
  titleStyle: PropType<string | CSSProperties>;
118
126
  arrowDirection: PropType<CellArrowDirection>;
127
+ required: {
128
+ type: PropType<boolean | "auto">;
129
+ default: null;
130
+ };
119
131
  clickable: {
120
132
  type: PropType<boolean | null>;
121
133
  default: null;
@@ -130,7 +142,7 @@ declare const _default: import("vue").DefineComponent<{
130
142
  center: boolean;
131
143
  border: boolean;
132
144
  isLink: boolean;
133
- required: boolean;
145
+ required: boolean | "auto";
134
146
  clickable: boolean | null;
135
147
  }, {}>;
136
148
  export default _default;
package/lib/cell/Cell.js CHANGED
@@ -38,13 +38,16 @@ const cellSharedProps = {
38
38
  center: Boolean,
39
39
  isLink: Boolean,
40
40
  border: import_utils.truthProp,
41
- required: Boolean,
42
41
  iconPrefix: String,
43
42
  valueClass: import_utils.unknownProp,
44
43
  labelClass: import_utils.unknownProp,
45
44
  titleClass: import_utils.unknownProp,
46
45
  titleStyle: null,
47
46
  arrowDirection: String,
47
+ required: {
48
+ type: [Boolean, String],
49
+ default: null
50
+ },
48
51
  clickable: {
49
52
  type: Boolean,
50
53
  default: null
@@ -125,7 +128,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
125
128
  const clickable = (_a = props.clickable) != null ? _a : isLink;
126
129
  const classes = {
127
130
  center,
128
- required,
131
+ required: !!required,
129
132
  clickable,
130
133
  borderless: !border
131
134
  };
@@ -14,13 +14,16 @@ export declare const Cell: import("../utils").WithInstall<import("vue").DefineCo
14
14
  type: BooleanConstructor;
15
15
  default: true;
16
16
  };
17
- required: BooleanConstructor;
18
17
  iconPrefix: StringConstructor;
19
18
  valueClass: import("vue").PropType<unknown>;
20
19
  labelClass: import("vue").PropType<unknown>;
21
20
  titleClass: import("vue").PropType<unknown>;
22
21
  titleStyle: import("vue").PropType<string | import("vue").CSSProperties>;
23
22
  arrowDirection: import("vue").PropType<import("./Cell").CellArrowDirection>;
23
+ required: {
24
+ type: import("vue").PropType<boolean | "auto">;
25
+ default: null;
26
+ };
24
27
  clickable: {
25
28
  type: import("vue").PropType<boolean | null>;
26
29
  default: null;
@@ -45,13 +48,16 @@ export declare const Cell: import("../utils").WithInstall<import("vue").DefineCo
45
48
  type: BooleanConstructor;
46
49
  default: true;
47
50
  };
48
- required: BooleanConstructor;
49
51
  iconPrefix: StringConstructor;
50
52
  valueClass: import("vue").PropType<unknown>;
51
53
  labelClass: import("vue").PropType<unknown>;
52
54
  titleClass: import("vue").PropType<unknown>;
53
55
  titleStyle: import("vue").PropType<string | import("vue").CSSProperties>;
54
56
  arrowDirection: import("vue").PropType<import("./Cell").CellArrowDirection>;
57
+ required: {
58
+ type: import("vue").PropType<boolean | "auto">;
59
+ default: null;
60
+ };
55
61
  clickable: {
56
62
  type: import("vue").PropType<boolean | null>;
57
63
  default: null;
@@ -66,7 +72,7 @@ export declare const Cell: import("../utils").WithInstall<import("vue").DefineCo
66
72
  center: boolean;
67
73
  border: boolean;
68
74
  isLink: boolean;
69
- required: boolean;
75
+ required: boolean | "auto";
70
76
  clickable: boolean | null;
71
77
  }, {}>>;
72
78
  export default Cell;
@@ -131,12 +131,18 @@ var stdin_default = (0, import_vue2.defineComponent)({
131
131
  }, null)]);
132
132
  };
133
133
  const renderLabel = () => {
134
+ const {
135
+ checked
136
+ } = props;
134
137
  if (slots.default) {
135
138
  return (0, import_vue.createVNode)("span", {
136
139
  "class": props.bem("label", [props.labelPosition, {
137
140
  disabled: disabled.value
138
141
  }])
139
- }, [slots.default()]);
142
+ }, [slots.default({
143
+ checked,
144
+ disabled: disabled.value
145
+ })]);
140
146
  }
141
147
  };
142
148
  return () => {
package/lib/col/Col.js CHANGED
@@ -47,18 +47,26 @@ var stdin_default = (0, import_vue2.defineComponent)({
47
47
  return;
48
48
  }
49
49
  const {
50
- spaces
50
+ spaces,
51
+ verticalSpaces
51
52
  } = parent;
53
+ let styles = {};
52
54
  if (spaces && spaces.value && spaces.value[index.value]) {
53
55
  const {
54
56
  left,
55
57
  right
56
58
  } = spaces.value[index.value];
57
- return {
59
+ styles = {
58
60
  paddingLeft: left ? `${left}px` : null,
59
61
  paddingRight: right ? `${right}px` : null
60
62
  };
61
63
  }
64
+ const {
65
+ bottom
66
+ } = verticalSpaces.value[index.value] || {};
67
+ return (0, import_utils.extend)(styles, {
68
+ marginBottom: bottom ? `${bottom}px` : null
69
+ });
62
70
  });
63
71
  return () => {
64
72
  const {
@@ -15,13 +15,16 @@ export declare const collapseItemProps: {
15
15
  type: BooleanConstructor;
16
16
  default: true;
17
17
  };
18
- required: BooleanConstructor;
19
18
  iconPrefix: StringConstructor;
20
19
  valueClass: import("vue").PropType<unknown>;
21
20
  labelClass: import("vue").PropType<unknown>;
22
21
  titleClass: import("vue").PropType<unknown>;
23
22
  titleStyle: import("vue").PropType<string | import("vue").CSSProperties>;
24
23
  arrowDirection: import("vue").PropType<import("../cell").CellArrowDirection>;
24
+ required: {
25
+ type: import("vue").PropType<boolean | "auto">;
26
+ default: null;
27
+ };
25
28
  clickable: {
26
29
  type: import("vue").PropType<boolean | null>;
27
30
  default: null;
@@ -56,13 +59,16 @@ declare const _default: import("vue").DefineComponent<{
56
59
  type: BooleanConstructor;
57
60
  default: true;
58
61
  };
59
- required: BooleanConstructor;
60
62
  iconPrefix: StringConstructor;
61
63
  valueClass: import("vue").PropType<unknown>;
62
64
  labelClass: import("vue").PropType<unknown>;
63
65
  titleClass: import("vue").PropType<unknown>;
64
66
  titleStyle: import("vue").PropType<string | import("vue").CSSProperties>;
65
67
  arrowDirection: import("vue").PropType<import("../cell").CellArrowDirection>;
68
+ required: {
69
+ type: import("vue").PropType<boolean | "auto">;
70
+ default: null;
71
+ };
66
72
  clickable: {
67
73
  type: import("vue").PropType<boolean | null>;
68
74
  default: null;
@@ -95,13 +101,16 @@ declare const _default: import("vue").DefineComponent<{
95
101
  type: BooleanConstructor;
96
102
  default: true;
97
103
  };
98
- required: BooleanConstructor;
99
104
  iconPrefix: StringConstructor;
100
105
  valueClass: import("vue").PropType<unknown>;
101
106
  labelClass: import("vue").PropType<unknown>;
102
107
  titleClass: import("vue").PropType<unknown>;
103
108
  titleStyle: import("vue").PropType<string | import("vue").CSSProperties>;
104
109
  arrowDirection: import("vue").PropType<import("../cell").CellArrowDirection>;
110
+ required: {
111
+ type: import("vue").PropType<boolean | "auto">;
112
+ default: null;
113
+ };
105
114
  clickable: {
106
115
  type: import("vue").PropType<boolean | null>;
107
116
  default: null;
@@ -124,7 +133,7 @@ declare const _default: import("vue").DefineComponent<{
124
133
  disabled: boolean;
125
134
  border: boolean;
126
135
  isLink: boolean;
127
- required: boolean;
136
+ required: boolean | "auto";
128
137
  clickable: boolean | null;
129
138
  readonly: boolean;
130
139
  lazyRender: boolean;
@@ -14,13 +14,16 @@ export declare const CollapseItem: import("../utils").WithInstall<import("vue").
14
14
  type: BooleanConstructor;
15
15
  default: true;
16
16
  };
17
- required: BooleanConstructor;
18
17
  iconPrefix: StringConstructor;
19
18
  valueClass: import("vue").PropType<unknown>;
20
19
  labelClass: import("vue").PropType<unknown>;
21
20
  titleClass: import("vue").PropType<unknown>;
22
21
  titleStyle: import("vue").PropType<string | import("vue").CSSProperties>;
23
22
  arrowDirection: import("vue").PropType<import("..").CellArrowDirection>;
23
+ required: {
24
+ type: import("vue").PropType<boolean | "auto">;
25
+ default: null;
26
+ };
24
27
  clickable: {
25
28
  type: import("vue").PropType<boolean | null>;
26
29
  default: null;
@@ -53,13 +56,16 @@ export declare const CollapseItem: import("../utils").WithInstall<import("vue").
53
56
  type: BooleanConstructor;
54
57
  default: true;
55
58
  };
56
- required: BooleanConstructor;
57
59
  iconPrefix: StringConstructor;
58
60
  valueClass: import("vue").PropType<unknown>;
59
61
  labelClass: import("vue").PropType<unknown>;
60
62
  titleClass: import("vue").PropType<unknown>;
61
63
  titleStyle: import("vue").PropType<string | import("vue").CSSProperties>;
62
64
  arrowDirection: import("vue").PropType<import("..").CellArrowDirection>;
65
+ required: {
66
+ type: import("vue").PropType<boolean | "auto">;
67
+ default: null;
68
+ };
63
69
  clickable: {
64
70
  type: import("vue").PropType<boolean | null>;
65
71
  default: null;
@@ -82,7 +88,7 @@ export declare const CollapseItem: import("../utils").WithInstall<import("vue").
82
88
  disabled: boolean;
83
89
  border: boolean;
84
90
  isLink: boolean;
85
- required: boolean;
91
+ required: boolean | "auto";
86
92
  clickable: boolean | null;
87
93
  readonly: boolean;
88
94
  lazyRender: boolean;
@@ -57,5 +57,5 @@ type BaseThemeVars = {
57
57
  radiusLg?: string;
58
58
  radiusMax?: string;
59
59
  };
60
- export type ConfigProviderThemeVars = BaseThemeVars & import('../action-bar').ActionBarThemeVars & import('../action-bar-button').ActionBarButtonThemeVars & import('../action-bar-icon').ActionBarIconThemeVars & import('../action-sheet').ActionSheetThemeVars & import('../address-edit').AddressEditThemeVars & import('../address-list').AddressListThemeVars & import('../badge').BadgeThemeVars & import('../barrage').BarrageThemeVars & import('../button').ButtonThemeVars & import('../calendar').CalendarThemeVars & import('../card').CardThemeVars & import('../cascader').CascaderThemeVars & import('../cell').CellThemeVars & import('../cell-group').CellGroupThemeVars & import('../checkbox').CheckboxThemeVars & import('../circle').CircleThemeVars & import('../collapse-item').CollapseItemThemeVars & import('../contact-card').ContactCardThemeVars & import('../contact-edit').ContactEditThemeVars & import('../contact-list').ContactListThemeVars & import('../count-down').CountDownThemeVars & import('../coupon').CouponThemeVars & import('../coupon-cell').CouponCellThemeVars & import('../coupon-list').CouponListThemeVars & import('../dialog').DialogThemeVars & import('../divider').DividerThemeVars & import('../dropdown-item').DropdownItemThemeVars & import('../dropdown-menu').DropdownMenuThemeVars & import('../empty').EmptyThemeVars & import('../field').FieldThemeVars & import('../floating-bubble').FloatingBubbleThemeVars & import('../floating-panel').FloatingPanelThemeVars & import('../grid-item').GridItemThemeVars & import('../image').ImageThemeVars & import('../image-preview').ImagePreviewThemeVars & import('../index-anchor').IndexAnchorThemeVars & import('../index-bar').IndexBarThemeVars & import('../list').ListThemeVars & import('../loading').LoadingThemeVars & import('../nav-bar').NavBarThemeVars & import('../notice-bar').NoticeBarThemeVars & import('../notify').NotifyThemeVars & import('../number-keyboard').NumberKeyboardThemeVars & import('../overlay').OverlayThemeVars & import('../pagination').PaginationThemeVars & import('../password-input').PasswordInputThemeVars & import('../picker').PickerThemeVars & import('../picker-group').PickerGroupThemeVars & import('../popover').PopoverThemeVars & import('../popup').PopupThemeVars & import('../progress').ProgressThemeVars & import('../pull-refresh').PullRefreshThemeVars & import('../radio').RadioThemeVars & import('../rate').RateThemeVars & import('../rolling-text').RollingTextThemeVars & import('../search').SearchThemeVars & import('../share-sheet').ShareSheetThemeVars & import('../sidebar').SidebarThemeVars & import('../sidebar-item').SidebarItemThemeVars & import('../signature').SignatureThemeVars & import('../skeleton').SkeletonThemeVars & import('../slider').SliderThemeVars & import('../step').StepThemeVars & import('../stepper').StepperThemeVars & import('../steps').StepsThemeVars & import('../sticky').StickyThemeVars & import('../submit-bar').SubmitBarThemeVars & import('../swipe').SwipeThemeVars & import('../switch').SwitchThemeVars & import('../tabbar').TabbarThemeVars & import('../tabbar-item').TabbarItemThemeVars & import('../tabs').TabsThemeVars & import('../tag').TagThemeVars & import('../toast').ToastThemeVars & import('../tree-select').TreeSelectThemeVars & import('../uploader').UploaderThemeVars & import('../watermark').WatermarkThemeVars;
60
+ export type ConfigProviderThemeVars = BaseThemeVars & import('../action-bar').ActionBarThemeVars & import('../action-bar-button').ActionBarButtonThemeVars & import('../action-bar-icon').ActionBarIconThemeVars & import('../action-sheet').ActionSheetThemeVars & import('../address-edit').AddressEditThemeVars & import('../address-list').AddressListThemeVars & import('../back-top').BackTopThemeVars & import('../badge').BadgeThemeVars & import('../barrage').BarrageThemeVars & import('../button').ButtonThemeVars & import('../calendar').CalendarThemeVars & import('../card').CardThemeVars & import('../cascader').CascaderThemeVars & import('../cell').CellThemeVars & import('../cell-group').CellGroupThemeVars & import('../checkbox').CheckboxThemeVars & import('../circle').CircleThemeVars & import('../collapse-item').CollapseItemThemeVars & import('../contact-card').ContactCardThemeVars & import('../contact-edit').ContactEditThemeVars & import('../contact-list').ContactListThemeVars & import('../count-down').CountDownThemeVars & import('../coupon').CouponThemeVars & import('../coupon-cell').CouponCellThemeVars & import('../coupon-list').CouponListThemeVars & import('../dialog').DialogThemeVars & import('../divider').DividerThemeVars & import('../dropdown-item').DropdownItemThemeVars & import('../dropdown-menu').DropdownMenuThemeVars & import('../empty').EmptyThemeVars & import('../highlight').HighlightThemeVars & import('../field').FieldThemeVars & import('../floating-bubble').FloatingBubbleThemeVars & import('../floating-panel').FloatingPanelThemeVars & import('../grid-item').GridItemThemeVars & import('../image').ImageThemeVars & import('../image-preview').ImagePreviewThemeVars & import('../index-anchor').IndexAnchorThemeVars & import('../index-bar').IndexBarThemeVars & import('../list').ListThemeVars & import('../loading').LoadingThemeVars & import('../nav-bar').NavBarThemeVars & import('../notice-bar').NoticeBarThemeVars & import('../notify').NotifyThemeVars & import('../number-keyboard').NumberKeyboardThemeVars & import('../overlay').OverlayThemeVars & import('../pagination').PaginationThemeVars & import('../password-input').PasswordInputThemeVars & import('../picker').PickerThemeVars & import('../picker-group').PickerGroupThemeVars & import('../popover').PopoverThemeVars & import('../popup').PopupThemeVars & import('../progress').ProgressThemeVars & import('../pull-refresh').PullRefreshThemeVars & import('../radio').RadioThemeVars & import('../rate').RateThemeVars & import('../rolling-text').RollingTextThemeVars & import('../search').SearchThemeVars & import('../share-sheet').ShareSheetThemeVars & import('../sidebar').SidebarThemeVars & import('../sidebar-item').SidebarItemThemeVars & import('../signature').SignatureThemeVars & import('../skeleton').SkeletonThemeVars & import('../slider').SliderThemeVars & import('../step').StepThemeVars & import('../stepper').StepperThemeVars & import('../steps').StepsThemeVars & import('../sticky').StickyThemeVars & import('../submit-bar').SubmitBarThemeVars & import('../swipe').SwipeThemeVars & import('../switch').SwitchThemeVars & import('../tabbar').TabbarThemeVars & import('../tabbar-item').TabbarItemThemeVars & import('../tabs').TabsThemeVars & import('../tag').TagThemeVars & import('../toast').ToastThemeVars & import('../tree-select').TreeSelectThemeVars & import('../uploader').UploaderThemeVars & import('../watermark').WatermarkThemeVars;
61
61
  export {};
@@ -24,10 +24,6 @@ export declare const fieldSharedProps: {
24
24
  autocorrect: StringConstructor;
25
25
  errorMessage: StringConstructor;
26
26
  enterkeyhint: StringConstructor;
27
- spellcheck: {
28
- type: BooleanConstructor;
29
- default: null;
30
- };
31
27
  clearTrigger: {
32
28
  type: PropType<FieldClearTrigger>;
33
29
  default: FieldClearTrigger;
@@ -36,6 +32,10 @@ export declare const fieldSharedProps: {
36
32
  type: PropType<FieldFormatTrigger>;
37
33
  default: FieldFormatTrigger;
38
34
  };
35
+ spellcheck: {
36
+ type: BooleanConstructor;
37
+ default: null;
38
+ };
39
39
  error: {
40
40
  type: BooleanConstructor;
41
41
  default: null;
@@ -65,13 +65,16 @@ export declare const fieldProps: {
65
65
  type: BooleanConstructor;
66
66
  default: true;
67
67
  };
68
- required: BooleanConstructor;
69
68
  iconPrefix: StringConstructor;
70
69
  valueClass: PropType<unknown>;
71
70
  labelClass: PropType<unknown>;
72
71
  titleClass: PropType<unknown>;
73
72
  titleStyle: PropType<string | import("vue").CSSProperties>;
74
73
  arrowDirection: PropType<import("../cell").CellArrowDirection>;
74
+ required: {
75
+ type: PropType<boolean | "auto">;
76
+ default: null;
77
+ };
75
78
  clickable: {
76
79
  type: PropType<boolean | null>;
77
80
  default: null;
@@ -100,10 +103,6 @@ export declare const fieldProps: {
100
103
  autocorrect: StringConstructor;
101
104
  errorMessage: StringConstructor;
102
105
  enterkeyhint: StringConstructor;
103
- spellcheck: {
104
- type: BooleanConstructor;
105
- default: null;
106
- };
107
106
  clearTrigger: {
108
107
  type: PropType<FieldClearTrigger>;
109
108
  default: FieldClearTrigger;
@@ -112,6 +111,10 @@ export declare const fieldProps: {
112
111
  type: PropType<FieldFormatTrigger>;
113
112
  default: FieldFormatTrigger;
114
113
  };
114
+ spellcheck: {
115
+ type: BooleanConstructor;
116
+ default: null;
117
+ };
115
118
  error: {
116
119
  type: BooleanConstructor;
117
120
  default: null;
@@ -159,13 +162,16 @@ declare const _default: import("vue").DefineComponent<{
159
162
  type: BooleanConstructor;
160
163
  default: true;
161
164
  };
162
- required: BooleanConstructor;
163
165
  iconPrefix: StringConstructor;
164
166
  valueClass: PropType<unknown>;
165
167
  labelClass: PropType<unknown>;
166
168
  titleClass: PropType<unknown>;
167
169
  titleStyle: PropType<string | import("vue").CSSProperties>;
168
170
  arrowDirection: PropType<import("../cell").CellArrowDirection>;
171
+ required: {
172
+ type: PropType<boolean | "auto">;
173
+ default: null;
174
+ };
169
175
  clickable: {
170
176
  type: PropType<boolean | null>;
171
177
  default: null;
@@ -194,10 +200,6 @@ declare const _default: import("vue").DefineComponent<{
194
200
  autocorrect: StringConstructor;
195
201
  errorMessage: StringConstructor;
196
202
  enterkeyhint: StringConstructor;
197
- spellcheck: {
198
- type: BooleanConstructor;
199
- default: null;
200
- };
201
203
  clearTrigger: {
202
204
  type: PropType<FieldClearTrigger>;
203
205
  default: FieldClearTrigger;
@@ -206,6 +208,10 @@ declare const _default: import("vue").DefineComponent<{
206
208
  type: PropType<FieldFormatTrigger>;
207
209
  default: FieldFormatTrigger;
208
210
  };
211
+ spellcheck: {
212
+ type: BooleanConstructor;
213
+ default: null;
214
+ };
209
215
  error: {
210
216
  type: BooleanConstructor;
211
217
  default: null;
@@ -251,13 +257,16 @@ declare const _default: import("vue").DefineComponent<{
251
257
  type: BooleanConstructor;
252
258
  default: true;
253
259
  };
254
- required: BooleanConstructor;
255
260
  iconPrefix: StringConstructor;
256
261
  valueClass: PropType<unknown>;
257
262
  labelClass: PropType<unknown>;
258
263
  titleClass: PropType<unknown>;
259
264
  titleStyle: PropType<string | import("vue").CSSProperties>;
260
265
  arrowDirection: PropType<import("../cell").CellArrowDirection>;
266
+ required: {
267
+ type: PropType<boolean | "auto">;
268
+ default: null;
269
+ };
261
270
  clickable: {
262
271
  type: PropType<boolean | null>;
263
272
  default: null;
@@ -286,10 +295,6 @@ declare const _default: import("vue").DefineComponent<{
286
295
  autocorrect: StringConstructor;
287
296
  errorMessage: StringConstructor;
288
297
  enterkeyhint: StringConstructor;
289
- spellcheck: {
290
- type: BooleanConstructor;
291
- default: null;
292
- };
293
298
  clearTrigger: {
294
299
  type: PropType<FieldClearTrigger>;
295
300
  default: FieldClearTrigger;
@@ -298,6 +303,10 @@ declare const _default: import("vue").DefineComponent<{
298
303
  type: PropType<FieldFormatTrigger>;
299
304
  default: FieldFormatTrigger;
300
305
  };
306
+ spellcheck: {
307
+ type: BooleanConstructor;
308
+ default: null;
309
+ };
301
310
  error: {
302
311
  type: BooleanConstructor;
303
312
  default: null;
@@ -346,14 +355,14 @@ declare const _default: import("vue").DefineComponent<{
346
355
  disabled: boolean;
347
356
  border: boolean;
348
357
  isLink: boolean;
349
- required: boolean;
358
+ required: boolean | "auto";
350
359
  clickable: boolean | null;
351
360
  clearable: boolean;
352
361
  clearIcon: string;
353
362
  modelValue: string | number;
354
- spellcheck: boolean;
355
363
  clearTrigger: FieldClearTrigger;
356
364
  formatTrigger: FieldFormatTrigger;
365
+ spellcheck: boolean;
357
366
  error: boolean;
358
367
  readonly: boolean;
359
368
  showWordLimit: boolean;
@@ -51,12 +51,12 @@ const fieldSharedProps = {
51
51
  autocorrect: String,
52
52
  errorMessage: String,
53
53
  enterkeyhint: String,
54
+ clearTrigger: (0, import_utils.makeStringProp)("focus"),
55
+ formatTrigger: (0, import_utils.makeStringProp)("onChange"),
54
56
  spellcheck: {
55
57
  type: Boolean,
56
58
  default: null
57
59
  },
58
- clearTrigger: (0, import_utils.makeStringProp)("focus"),
59
- formatTrigger: (0, import_utils.makeStringProp)("onChange"),
60
60
  error: {
61
61
  type: Boolean,
62
62
  default: null
@@ -132,6 +132,14 @@ var stdin_default = (0, import_vue2.defineComponent)({
132
132
  }
133
133
  return props.modelValue;
134
134
  });
135
+ const showRequiredMark = (0, import_vue2.computed)(() => {
136
+ var _a;
137
+ const required = getProp("required");
138
+ if (required === "auto") {
139
+ return (_a = props.rules) == null ? void 0 : _a.some((rule) => rule.required);
140
+ }
141
+ return required;
142
+ });
135
143
  const runRules = (rules) => rules.reduce((promise, rule) => promise.then(() => {
136
144
  if (state.status === "failed") {
137
145
  return;
@@ -534,7 +542,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
534
542
  "titleStyle": labelStyle.value,
535
543
  "valueClass": bem("value"),
536
544
  "titleClass": [bem("label", [labelAlign, {
537
- required: props.required
545
+ required: showRequiredMark.value
538
546
  }]), props.labelClass],
539
547
  "arrowDirection": props.arrowDirection
540
548
  }, {
@@ -1 +1 @@
1
- :root{--van-field-label-width: 6.2em;--van-field-label-color: var(--van-text-color);--van-field-label-margin-right: var(--van-padding-sm);--van-field-input-text-color: var(--van-text-color);--van-field-input-error-text-color: var(--van-danger-color);--van-field-input-disabled-text-color: var(--van-text-color-3);--van-field-placeholder-text-color: var(--van-text-color-3);--van-field-icon-size: 18px;--van-field-clear-icon-size: 18px;--van-field-clear-icon-color: var(--van-gray-5);--van-field-right-icon-color: var(--van-gray-6);--van-field-error-message-color: var(--van-danger-color);--van-field-error-message-font-size: 12px;--van-field-text-area-min-height: 60px;--van-field-word-limit-color: var(--van-gray-7);--van-field-word-limit-font-size: var(--van-font-size-sm);--van-field-word-limit-line-height: 16px;--van-field-disabled-text-color: var(--van-text-color-3);--van-field-required-mark-color: var(--van-red)}.van-field{flex-wrap:wrap}.van-field__label{flex:none;box-sizing:border-box;width:var(--van-field-label-width);margin-right:var(--van-field-label-margin-right);color:var(--van-field-label-color);text-align:left;word-wrap:break-word}.van-field__label--center{text-align:center}.van-field__label--right{text-align:right}.van-field__label--top{display:flex;width:100%;text-align:left;margin-bottom:var(--van-padding-base);word-break:break-word}.van-field__label--required:before{margin-right:2px;color:var(--van-field-required-mark-color);content:"*"}.van-field--disabled .van-field__label{color:var(--van-field-disabled-text-color)}.van-field__value{overflow:visible}.van-field__body{display:flex;align-items:center}.van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--van-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;user-select:auto}.van-field__control::-webkit-input-placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control::placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control:read-only{cursor:default}.van-field__control:disabled{color:var(--van-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--van-field-input-disabled-text-color)}.van-field__control--center{justify-content:center;text-align:center}.van-field__control--right{justify-content:flex-end;text-align:right}.van-field__control--custom{display:flex;align-items:center;min-height:var(--van-cell-line-height)}.van-field__control--error::-webkit-input-placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--error,.van-field__control--error::placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--min-height{min-height:var(--van-field-text-area-min-height)}.van-field__control[type=date],.van-field__control[type=time],.van-field__control[type=datetime-local]{min-height:var(--van-cell-line-height)}.van-field__control[type=search]{-webkit-appearance:none}.van-field__clear,.van-field__icon,.van-field__button,.van-field__right-icon{flex-shrink:0}.van-field__clear,.van-field__right-icon{margin-right:calc(var(--van-padding-xs) * -1);padding:0 var(--van-padding-xs);line-height:inherit}.van-field__clear{color:var(--van-field-clear-icon-color);font-size:var(--van-field-clear-icon-size);cursor:pointer}.van-field__left-icon .van-icon,.van-field__right-icon .van-icon{display:block;font-size:var(--van-field-icon-size);line-height:inherit}.van-field__left-icon{margin-right:var(--van-padding-base)}.van-field__right-icon{color:var(--van-field-right-icon-color)}.van-field__button{padding-left:var(--van-padding-xs)}.van-field__error-message{color:var(--van-field-error-message-color);font-size:var(--van-field-error-message-font-size);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{margin-top:var(--van-padding-base);color:var(--van-field-word-limit-color);font-size:var(--van-field-word-limit-font-size);line-height:var(--van-field-word-limit-line-height);text-align:right}
1
+ :root{--van-field-label-width: 6.2em;--van-field-label-color: var(--van-text-color);--van-field-label-margin-right: var(--van-padding-sm);--van-field-input-text-color: var(--van-text-color);--van-field-input-error-text-color: var(--van-danger-color);--van-field-input-disabled-text-color: var(--van-text-color-3);--van-field-placeholder-text-color: var(--van-text-color-3);--van-field-icon-size: 18px;--van-field-clear-icon-size: 18px;--van-field-clear-icon-color: var(--van-gray-5);--van-field-right-icon-color: var(--van-gray-6);--van-field-error-message-color: var(--van-danger-color);--van-field-error-message-font-size: 12px;--van-field-text-area-min-height: 60px;--van-field-word-limit-color: var(--van-gray-7);--van-field-word-limit-font-size: var(--van-font-size-sm);--van-field-word-limit-line-height: 16px;--van-field-disabled-text-color: var(--van-text-color-3);--van-field-required-mark-color: var(--van-red)}.van-field{flex-wrap:wrap}.van-field__label{flex:none;box-sizing:border-box;width:var(--van-field-label-width);margin-right:var(--van-field-label-margin-right);color:var(--van-field-label-color);text-align:left;word-wrap:break-word}.van-field__label--center{text-align:center}.van-field__label--right{text-align:right}.van-field__label--top{display:flex;width:100%;text-align:left;margin-bottom:var(--van-padding-base);overflow-wrap:break-word}.van-field__label--required:before{margin-right:2px;color:var(--van-field-required-mark-color);content:"*"}.van-field--disabled .van-field__label{color:var(--van-field-disabled-text-color)}.van-field__value{overflow:visible}.van-field__body{display:flex;align-items:center}.van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--van-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;user-select:auto}.van-field__control::-webkit-input-placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control::placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control:read-only{cursor:default}.van-field__control:disabled{color:var(--van-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--van-field-input-disabled-text-color)}.van-field__control--center{justify-content:center;text-align:center}.van-field__control--right{justify-content:flex-end;text-align:right}.van-field__control--custom{display:flex;align-items:center;min-height:var(--van-cell-line-height)}.van-field__control--error::-webkit-input-placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--error,.van-field__control--error::placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--min-height{min-height:var(--van-field-text-area-min-height)}.van-field__control[type=date],.van-field__control[type=time],.van-field__control[type=datetime-local]{min-height:var(--van-cell-line-height)}.van-field__control[type=search]{-webkit-appearance:none}.van-field__clear,.van-field__icon,.van-field__button,.van-field__right-icon{flex-shrink:0}.van-field__clear,.van-field__right-icon{margin-right:calc(var(--van-padding-xs) * -1);padding:0 var(--van-padding-xs);line-height:inherit}.van-field__clear{color:var(--van-field-clear-icon-color);font-size:var(--van-field-clear-icon-size);cursor:pointer}.van-field__left-icon .van-icon,.van-field__right-icon .van-icon{display:block;font-size:var(--van-field-icon-size);line-height:inherit}.van-field__left-icon{margin-right:var(--van-padding-base)}.van-field__right-icon{color:var(--van-field-right-icon-color)}.van-field__button{padding-left:var(--van-padding-xs)}.van-field__error-message{color:var(--van-field-error-message-color);font-size:var(--van-field-error-message-font-size);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{margin-top:var(--van-padding-base);color:var(--van-field-word-limit-color);font-size:var(--van-field-word-limit-font-size);line-height:var(--van-field-word-limit-line-height);text-align:right}