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
package/lib/index.d.ts CHANGED
@@ -40,6 +40,7 @@ export * from "./floating-panel";
40
40
  export * from "./form";
41
41
  export * from "./grid";
42
42
  export * from "./grid-item";
43
+ export * from "./highlight";
43
44
  export * from "./icon";
44
45
  export * from "./image";
45
46
  export * from "./image-preview";
@@ -105,4 +106,4 @@ declare namespace _default {
105
106
  }
106
107
  export default _default;
107
108
  export function install(app: any): void;
108
- export const version: "4.7.2";
109
+ export const version: "4.8.0";
package/lib/index.js CHANGED
@@ -65,6 +65,7 @@ var import_floating_panel = require("./floating-panel");
65
65
  var import_form = require("./form");
66
66
  var import_grid = require("./grid");
67
67
  var import_grid_item = require("./grid-item");
68
+ var import_highlight = require("./highlight");
68
69
  var import_icon = require("./icon");
69
70
  var import_image = require("./image");
70
71
  var import_image_preview = require("./image-preview");
@@ -165,6 +166,7 @@ __reExport(stdin_exports, require("./floating-panel"), module.exports);
165
166
  __reExport(stdin_exports, require("./form"), module.exports);
166
167
  __reExport(stdin_exports, require("./grid"), module.exports);
167
168
  __reExport(stdin_exports, require("./grid-item"), module.exports);
169
+ __reExport(stdin_exports, require("./highlight"), module.exports);
168
170
  __reExport(stdin_exports, require("./icon"), module.exports);
169
171
  __reExport(stdin_exports, require("./image"), module.exports);
170
172
  __reExport(stdin_exports, require("./image-preview"), module.exports);
@@ -224,7 +226,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
224
226
  __reExport(stdin_exports, require("./tree-select"), module.exports);
225
227
  __reExport(stdin_exports, require("./uploader"), module.exports);
226
228
  __reExport(stdin_exports, require("./watermark"), module.exports);
227
- const version = "4.7.2";
229
+ const version = "4.8.0";
228
230
  function install(app) {
229
231
  const components = [
230
232
  import_action_bar.ActionBar,
@@ -269,6 +271,7 @@ function install(app) {
269
271
  import_form.Form,
270
272
  import_grid.Grid,
271
273
  import_grid_item.GridItem,
274
+ import_highlight.Highlight,
272
275
  import_icon.Icon,
273
276
  import_image.Image,
274
277
  import_image_preview.ImagePreview,
@@ -0,0 +1,63 @@
1
+ declare const _default: {
2
+ name: string;
3
+ tel: string;
4
+ save: string;
5
+ clear: string;
6
+ cancel: string;
7
+ confirm: string;
8
+ delete: string;
9
+ loading: string;
10
+ noCoupon: string;
11
+ nameEmpty: string;
12
+ addContact: string;
13
+ telInvalid: string;
14
+ vanCalendar: {
15
+ end: string;
16
+ start: string;
17
+ title: string;
18
+ weekdays: string[];
19
+ monthTitle: (year: number, month: number) => string;
20
+ rangePrompt: (maxRange: number) => string;
21
+ };
22
+ vanCascader: {
23
+ select: string;
24
+ };
25
+ vanPagination: {
26
+ prev: string;
27
+ next: string;
28
+ };
29
+ vanPullRefresh: {
30
+ pulling: string;
31
+ loosing: string;
32
+ };
33
+ vanSubmitBar: {
34
+ label: string;
35
+ };
36
+ vanCoupon: {
37
+ unlimited: string;
38
+ discount: (discount: number) => string;
39
+ condition: (condition: number) => string;
40
+ };
41
+ vanCouponCell: {
42
+ title: string;
43
+ count: (count: number) => string;
44
+ };
45
+ vanCouponList: {
46
+ exchange: string;
47
+ close: string;
48
+ enable: string;
49
+ disabled: string;
50
+ placeholder: string;
51
+ };
52
+ vanAddressEdit: {
53
+ area: string;
54
+ areaEmpty: string;
55
+ addressEmpty: string;
56
+ addressDetail: string;
57
+ defaultAddress: string;
58
+ };
59
+ vanAddressList: {
60
+ add: string;
61
+ };
62
+ };
63
+ export default _default;
@@ -0,0 +1,84 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var stdin_exports = {};
19
+ __export(stdin_exports, {
20
+ default: () => stdin_default
21
+ });
22
+ module.exports = __toCommonJS(stdin_exports);
23
+ var stdin_default = {
24
+ name: "\u0627\u0644\u0627\u0633\u0645",
25
+ tel: "\u0627\u0644\u0647\u0627\u062A\u0641",
26
+ save: "\u062D\u0641\u0638",
27
+ clear: "\u0645\u0633\u062D",
28
+ cancel: "\u0625\u0644\u063A\u0627\u0621",
29
+ confirm: "\u062A\u0623\u0643\u064A\u062F",
30
+ delete: "\u062D\u0630\u0641",
31
+ loading: "\u062C\u0627\u0631 \u0627\u0644\u062A\u062D\u0645\u064A\u0644...",
32
+ noCoupon: "\u0644\u0627 \u064A\u0648\u062C\u062F \u0643\u0648\u0628\u0648\u0646\u0627\u062A",
33
+ nameEmpty: "\u064A\u0631\u062C\u0649 \u0645\u0644\u0621 \u0627\u0644\u0627\u0633\u0645",
34
+ addContact: "\u0625\u0636\u0627\u0641\u0629 \u062C\u0647\u0629 \u0627\u062A\u0635\u0627\u0644",
35
+ telInvalid: "\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641 \u063A\u064A\u0631 \u0635\u062D\u064A\u062D",
36
+ vanCalendar: {
37
+ end: "\u0646\u0647\u0627\u064A\u0629",
38
+ start: "\u0628\u062F\u0627\u064A\u0629",
39
+ title: "\u0627\u0644\u062A\u0642\u0648\u064A\u0645",
40
+ weekdays: ["\u0627\u0644\u0623\u062D\u062F", "\u0627\u0644\u0627\u062B\u0646\u064A\u0646", "\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621", "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", "\u0627\u0644\u062E\u0645\u064A\u0633", "\u0627\u0644\u062C\u0645\u0639\u0629", "\u0627\u0644\u0633\u0628\u062A"],
41
+ monthTitle: (year, month) => `${year}/${month}`,
42
+ rangePrompt: (maxRange) => `\u0627\u062E\u062A\u0631 \u0644\u0627 \u064A\u0632\u064A\u062F \u0639\u0646 ${maxRange} \u0623\u064A\u0627\u0645`
43
+ },
44
+ vanCascader: {
45
+ select: "\u0627\u062E\u062A\u0631"
46
+ },
47
+ vanPagination: {
48
+ prev: "\u0627\u0644\u0633\u0627\u0628\u0642",
49
+ next: "\u0627\u0644\u062A\u0627\u0644\u064A"
50
+ },
51
+ vanPullRefresh: {
52
+ pulling: "\u0627\u0633\u062D\u0628 \u0644\u0644\u062A\u062D\u062F\u064A\u062B...",
53
+ loosing: "\u0623\u0641\u0644\u062A \u0644\u0644\u062A\u062D\u062F\u064A\u062B..."
54
+ },
55
+ vanSubmitBar: {
56
+ label: "\u0627\u0644\u0645\u062C\u0645\u0648\u0639:"
57
+ },
58
+ vanCoupon: {
59
+ unlimited: "\u063A\u064A\u0631 \u0645\u062D\u062F\u0648\u062F",
60
+ discount: (discount) => `${discount * 10}% \u062E\u0635\u0645`,
61
+ condition: (condition) => `\u0639\u0644\u0649 \u0627\u0644\u0623\u0642\u0644 ${condition}`
62
+ },
63
+ vanCouponCell: {
64
+ title: "\u0643\u0648\u0628\u0648\u0646",
65
+ count: (count) => `\u0644\u062F\u064A\u0643 ${count} \u0643\u0648\u0628\u0648\u0646\u0627\u062A`
66
+ },
67
+ vanCouponList: {
68
+ exchange: "\u0627\u0633\u062A\u0628\u062F\u0627\u0644",
69
+ close: "\u0625\u063A\u0644\u0627\u0642",
70
+ enable: "\u0645\u062A\u0627\u062D",
71
+ disabled: "\u063A\u064A\u0631 \u0645\u062A\u0627\u062D",
72
+ placeholder: "\u0643\u0648\u062F \u0627\u0644\u0643\u0648\u0628\u0648\u0646"
73
+ },
74
+ vanAddressEdit: {
75
+ area: "\u0627\u0644\u0645\u0646\u0637\u0642\u0629",
76
+ areaEmpty: "\u064A\u0631\u062C\u0649 \u0627\u062E\u062A\u064A\u0627\u0631 \u0645\u0646\u0637\u0642\u0629 \u0627\u0633\u062A\u0642\u0628\u0627\u0644",
77
+ addressEmpty: "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0644\u0627 \u064A\u0645\u0643\u0646 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0641\u0627\u0631\u063A\u064B\u0627",
78
+ addressDetail: "\u0627\u0644\u0639\u0646\u0648\u0627\u0646",
79
+ defaultAddress: "\u062A\u0639\u064A\u064A\u0646 \u0643\u0639\u0646\u0648\u0627\u0646 \u0627\u0641\u062A\u0631\u0627\u0636\u064A"
80
+ },
81
+ vanAddressList: {
82
+ add: "\u0625\u0636\u0627\u0641\u0629 \u0639\u0646\u0648\u0627\u0646 \u062C\u062F\u064A\u062F"
83
+ }
84
+ };
@@ -71,8 +71,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
71
71
  };
72
72
  const onCancel = () => emit("cancel");
73
73
  return () => {
74
- var _a;
75
- const childNodes = (_a = slots.default) == null ? void 0 : _a.call(slots);
74
+ var _a, _b;
75
+ const childNodes = (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b.filter((node) => node.type !== import_vue2.Comment);
76
76
  const confirmButtonText = showNextButton() ? props.nextStepText : props.confirmButtonText;
77
77
  return (0, import_vue.createVNode)("div", {
78
78
  "class": bem()
@@ -1,9 +1,6 @@
1
1
  import type { ComponentPublicInstance } from 'vue';
2
2
  import type { ProgressProps } from './Progress';
3
- export type ProgressExpose = {
4
- resize: () => void;
5
- };
6
- export type ProgressInstance = ComponentPublicInstance<ProgressProps, ProgressExpose>;
3
+ export type ProgressInstance = ComponentPublicInstance<ProgressProps>;
7
4
  export type ProgressThemeVars = {
8
5
  progressHeight?: string;
9
6
  progressColor?: string;
package/lib/row/Row.d.ts CHANGED
@@ -3,8 +3,12 @@ export type RowSpaces = {
3
3
  left?: number;
4
4
  right: number;
5
5
  }[];
6
+ export type VerticalSpaces = {
7
+ bottom?: number;
8
+ }[];
6
9
  export type RowProvide = {
7
10
  spaces: ComputedRef<RowSpaces>;
11
+ verticalSpaces: ComputedRef<VerticalSpaces>;
8
12
  };
9
13
  export declare const ROW_KEY: InjectionKey<RowProvide>;
10
14
  export type RowAlign = 'top' | 'center' | 'bottom';
@@ -20,7 +24,7 @@ export declare const rowProps: {
20
24
  };
21
25
  align: PropType<RowAlign>;
22
26
  gutter: {
23
- type: (NumberConstructor | StringConstructor)[];
27
+ type: PropType<string | number | (string | number)[]>;
24
28
  default: number;
25
29
  };
26
30
  justify: PropType<RowJustify>;
@@ -37,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
37
41
  };
38
42
  align: PropType<RowAlign>;
39
43
  gutter: {
40
- type: (NumberConstructor | StringConstructor)[];
44
+ type: PropType<string | number | (string | number)[]>;
41
45
  default: number;
42
46
  };
43
47
  justify: PropType<RowJustify>;
@@ -52,13 +56,13 @@ declare const _default: import("vue").DefineComponent<{
52
56
  };
53
57
  align: PropType<RowAlign>;
54
58
  gutter: {
55
- type: (NumberConstructor | StringConstructor)[];
59
+ type: PropType<string | number | (string | number)[]>;
56
60
  default: number;
57
61
  };
58
62
  justify: PropType<RowJustify>;
59
63
  }>>, {
60
64
  tag: keyof HTMLElementTagNameMap;
61
65
  wrap: boolean;
62
- gutter: string | number;
66
+ gutter: string | number | (string | number)[];
63
67
  }, {}>;
64
68
  export default _default;
package/lib/row/Row.js CHANGED
@@ -32,7 +32,10 @@ const rowProps = {
32
32
  tag: (0, import_utils.makeStringProp)("div"),
33
33
  wrap: import_utils.truthProp,
34
34
  align: String,
35
- gutter: (0, import_utils.makeNumericProp)(0),
35
+ gutter: {
36
+ type: [String, Number, Array],
37
+ default: 0
38
+ },
36
39
  justify: String
37
40
  };
38
41
  var stdin_default = (0, import_vue2.defineComponent)({
@@ -60,7 +63,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
60
63
  return groups2;
61
64
  });
62
65
  const spaces = (0, import_vue2.computed)(() => {
63
- const gutter = Number(props.gutter);
66
+ let gutter = 0;
67
+ if (Array.isArray(props.gutter)) {
68
+ gutter = Number(props.gutter[0]) || 0;
69
+ } else {
70
+ gutter = Number(props.gutter);
71
+ }
64
72
  const spaces2 = [];
65
73
  if (!gutter) {
66
74
  return spaces2;
@@ -84,8 +92,31 @@ var stdin_default = (0, import_vue2.defineComponent)({
84
92
  });
85
93
  return spaces2;
86
94
  });
95
+ const verticalSpaces = (0, import_vue2.computed)(() => {
96
+ const {
97
+ gutter
98
+ } = props;
99
+ const spaces2 = [];
100
+ if (Array.isArray(gutter) && gutter.length > 1) {
101
+ const bottom = Number(gutter[1]) || 0;
102
+ if (bottom <= 0) {
103
+ return spaces2;
104
+ }
105
+ groups.value.forEach((group, index) => {
106
+ if (index === groups.value.length - 1)
107
+ return;
108
+ group.forEach(() => {
109
+ spaces2.push({
110
+ bottom
111
+ });
112
+ });
113
+ });
114
+ }
115
+ return spaces2;
116
+ });
87
117
  linkChildren({
88
- spaces
118
+ spaces,
119
+ verticalSpaces
89
120
  });
90
121
  return () => {
91
122
  const {
@@ -9,7 +9,7 @@ export declare const Row: import("../utils").WithInstall<import("vue").DefineCom
9
9
  };
10
10
  align: import("vue").PropType<import("./Row").RowAlign>;
11
11
  gutter: {
12
- type: (NumberConstructor | StringConstructor)[];
12
+ type: import("vue").PropType<string | number | (string | number)[]>;
13
13
  default: number;
14
14
  };
15
15
  justify: import("vue").PropType<import("./Row").RowJustify>;
@@ -24,14 +24,14 @@ export declare const Row: import("../utils").WithInstall<import("vue").DefineCom
24
24
  };
25
25
  align: import("vue").PropType<import("./Row").RowAlign>;
26
26
  gutter: {
27
- type: (NumberConstructor | StringConstructor)[];
27
+ type: import("vue").PropType<string | number | (string | number)[]>;
28
28
  default: number;
29
29
  };
30
30
  justify: import("vue").PropType<import("./Row").RowJustify>;
31
31
  }>>, {
32
32
  tag: keyof HTMLElementTagNameMap;
33
33
  wrap: boolean;
34
- gutter: string | number;
34
+ gutter: string | number | (string | number)[];
35
35
  }, {}>>;
36
36
  export default Row;
37
37
  export { rowProps } from './Row';
@@ -24,10 +24,6 @@ export declare const searchProps: {
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: import("vue").PropType<import("../field").FieldClearTrigger>;
33
29
  default: import("../field").FieldClearTrigger;
@@ -36,6 +32,10 @@ export declare const searchProps: {
36
32
  type: import("vue").PropType<import("../field").FieldFormatTrigger>;
37
33
  default: import("../field").FieldFormatTrigger;
38
34
  };
35
+ spellcheck: {
36
+ type: BooleanConstructor;
37
+ default: null;
38
+ };
39
39
  error: {
40
40
  type: BooleanConstructor;
41
41
  default: null;
@@ -91,10 +91,6 @@ declare const _default: import("vue").DefineComponent<{
91
91
  autocorrect: StringConstructor;
92
92
  errorMessage: StringConstructor;
93
93
  enterkeyhint: StringConstructor;
94
- spellcheck: {
95
- type: BooleanConstructor;
96
- default: null;
97
- };
98
94
  clearTrigger: {
99
95
  type: import("vue").PropType<import("../field").FieldClearTrigger>;
100
96
  default: import("../field").FieldClearTrigger;
@@ -103,6 +99,10 @@ declare const _default: import("vue").DefineComponent<{
103
99
  type: import("vue").PropType<import("../field").FieldFormatTrigger>;
104
100
  default: import("../field").FieldFormatTrigger;
105
101
  };
102
+ spellcheck: {
103
+ type: BooleanConstructor;
104
+ default: null;
105
+ };
106
106
  error: {
107
107
  type: BooleanConstructor;
108
108
  default: null;
@@ -156,10 +156,6 @@ declare const _default: import("vue").DefineComponent<{
156
156
  autocorrect: StringConstructor;
157
157
  errorMessage: StringConstructor;
158
158
  enterkeyhint: StringConstructor;
159
- spellcheck: {
160
- type: BooleanConstructor;
161
- default: null;
162
- };
163
159
  clearTrigger: {
164
160
  type: import("vue").PropType<import("../field").FieldClearTrigger>;
165
161
  default: import("../field").FieldClearTrigger;
@@ -168,6 +164,10 @@ declare const _default: import("vue").DefineComponent<{
168
164
  type: import("vue").PropType<import("../field").FieldFormatTrigger>;
169
165
  default: import("../field").FieldFormatTrigger;
170
166
  };
167
+ spellcheck: {
168
+ type: BooleanConstructor;
169
+ default: null;
170
+ };
171
171
  error: {
172
172
  type: BooleanConstructor;
173
173
  default: null;
@@ -215,9 +215,9 @@ declare const _default: import("vue").DefineComponent<{
215
215
  clearable: boolean;
216
216
  clearIcon: string;
217
217
  modelValue: string | number;
218
- spellcheck: boolean;
219
218
  clearTrigger: import("../field").FieldClearTrigger;
220
219
  formatTrigger: import("../field").FieldFormatTrigger;
220
+ spellcheck: boolean;
221
221
  error: boolean;
222
222
  readonly: boolean;
223
223
  showAction: boolean;
@@ -105,7 +105,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
105
105
  return (0, import_vue.createVNode)(import_field.Field, (0, import_vue.mergeProps)({
106
106
  "ref": fieldRef,
107
107
  "type": "search",
108
- "class": bem("field"),
108
+ "class": bem("field", {
109
+ "with-message": fieldAttrs.errorMessage
110
+ }),
109
111
  "border": false,
110
112
  "onBlur": onBlur,
111
113
  "onFocus": onFocus,
@@ -1 +1 @@
1
- :root{--van-search-padding: 10px var(--van-padding-sm);--van-search-background: var(--van-background-2);--van-search-content-background: var(--van-background);--van-search-input-height: 34px;--van-search-label-padding: 0 5px;--van-search-label-color: var(--van-text-color);--van-search-label-font-size: var(--van-font-size-md);--van-search-left-icon-color: var(--van-gray-6);--van-search-action-padding: 0 var(--van-padding-xs);--van-search-action-text-color: var(--van-text-color);--van-search-action-font-size: var(--van-font-size-md)}.van-search{display:flex;align-items:center;box-sizing:border-box;padding:var(--van-search-padding);background:var(--van-search-background)}.van-search__content{display:flex;flex:1;padding-left:var(--van-padding-sm);background:var(--van-search-content-background);border-radius:var(--van-radius-sm)}.van-search__content--round{border-radius:var(--van-radius-max)}.van-search__label{padding:var(--van-search-label-padding);color:var(--van-search-label-color);font-size:var(--van-search-label-font-size);line-height:var(--van-search-input-height)}.van-search__field{flex:1;align-items:center;padding:0 var(--van-padding-xs) 0 0;height:var(--van-search-input-height);background-color:transparent}.van-search__field .van-field__left-icon{color:var(--van-search-left-icon-color)}.van-search--show-action{padding-right:0}.van-search input::-webkit-search-decoration,.van-search input::-webkit-search-cancel-button,.van-search input::-webkit-search-results-button,.van-search input::-webkit-search-results-decoration{display:none}.van-search__action{padding:var(--van-search-action-padding);color:var(--van-search-action-text-color);font-size:var(--van-search-action-font-size);line-height:var(--van-search-input-height);cursor:pointer;-webkit-user-select:none;user-select:none}.van-search__action:active{background-color:var(--van-active-color)}
1
+ :root{--van-search-padding: 10px var(--van-padding-sm);--van-search-background: var(--van-background-2);--van-search-content-background: var(--van-background);--van-search-input-height: 34px;--van-search-label-padding: 0 5px;--van-search-label-color: var(--van-text-color);--van-search-label-font-size: var(--van-font-size-md);--van-search-left-icon-color: var(--van-gray-6);--van-search-action-padding: 0 var(--van-padding-xs);--van-search-action-text-color: var(--van-text-color);--van-search-action-font-size: var(--van-font-size-md)}.van-search{display:flex;align-items:center;box-sizing:border-box;padding:var(--van-search-padding);background:var(--van-search-background)}.van-search__content{display:flex;flex:1;padding-left:var(--van-padding-sm);background:var(--van-search-content-background);border-radius:var(--van-radius-sm)}.van-search__content--round{border-radius:var(--van-radius-max)}.van-search__label{padding:var(--van-search-label-padding);color:var(--van-search-label-color);font-size:var(--van-search-label-font-size);line-height:var(--van-search-input-height)}.van-search__field{flex:1;align-items:center;padding:0 var(--van-padding-xs) 0 0;height:var(--van-search-input-height);background-color:transparent}.van-search__field .van-field__left-icon{color:var(--van-search-left-icon-color)}.van-search__field--with-message{height:auto;align-items:flex-start;padding-top:5px;padding-bottom:5px}.van-search--show-action{padding-right:0}.van-search input::-webkit-search-decoration,.van-search input::-webkit-search-cancel-button,.van-search input::-webkit-search-results-button,.van-search input::-webkit-search-results-decoration{display:none}.van-search__action{padding:var(--van-search-action-padding);color:var(--van-search-action-text-color);font-size:var(--van-search-action-font-size);line-height:var(--van-search-input-height);cursor:pointer;-webkit-user-select:none;user-select:none}.van-search__action:active{background-color:var(--van-active-color)}
@@ -23,10 +23,6 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
23
23
  autocorrect: StringConstructor;
24
24
  errorMessage: StringConstructor;
25
25
  enterkeyhint: StringConstructor;
26
- spellcheck: {
27
- type: BooleanConstructor;
28
- default: null;
29
- };
30
26
  clearTrigger: {
31
27
  type: import("vue").PropType<import("..").FieldClearTrigger>;
32
28
  default: import("..").FieldClearTrigger;
@@ -35,6 +31,10 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
35
31
  type: import("vue").PropType<import("..").FieldFormatTrigger>;
36
32
  default: import("..").FieldFormatTrigger;
37
33
  };
34
+ spellcheck: {
35
+ type: BooleanConstructor;
36
+ default: null;
37
+ };
38
38
  error: {
39
39
  type: BooleanConstructor;
40
40
  default: null;
@@ -88,10 +88,6 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
88
88
  autocorrect: StringConstructor;
89
89
  errorMessage: StringConstructor;
90
90
  enterkeyhint: StringConstructor;
91
- spellcheck: {
92
- type: BooleanConstructor;
93
- default: null;
94
- };
95
91
  clearTrigger: {
96
92
  type: import("vue").PropType<import("..").FieldClearTrigger>;
97
93
  default: import("..").FieldClearTrigger;
@@ -100,6 +96,10 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
100
96
  type: import("vue").PropType<import("..").FieldFormatTrigger>;
101
97
  default: import("..").FieldFormatTrigger;
102
98
  };
99
+ spellcheck: {
100
+ type: BooleanConstructor;
101
+ default: null;
102
+ };
103
103
  error: {
104
104
  type: BooleanConstructor;
105
105
  default: null;
@@ -147,9 +147,9 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
147
147
  clearable: boolean;
148
148
  clearIcon: string;
149
149
  modelValue: string | number;
150
- spellcheck: boolean;
151
150
  clearTrigger: import("..").FieldClearTrigger;
152
151
  formatTrigger: import("..").FieldFormatTrigger;
152
+ spellcheck: boolean;
153
153
  error: boolean;
154
154
  readonly: boolean;
155
155
  showAction: boolean;
@@ -25,6 +25,7 @@ var import_vue = require("vue");
25
25
  var import_vue2 = require("vue");
26
26
  var import_utils = require("../utils");
27
27
  var import_use = require("@vant/use");
28
+ var import_use_expose = require("../composables/use-expose");
28
29
  var import_button = require("../button");
29
30
  const [name, bem, t] = (0, import_utils.createNamespace)("signature");
30
31
  const signatureProps = {
@@ -127,7 +128,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
127
128
  }
128
129
  emit("clear");
129
130
  };
130
- (0, import_vue2.onMounted)(() => {
131
+ const initialize = () => {
131
132
  var _a, _b, _c;
132
133
  if (isRenderCanvas && canvasRef.value) {
133
134
  const canvas = canvasRef.value;
@@ -137,6 +138,18 @@ var stdin_default = (0, import_vue2.defineComponent)({
137
138
  (_c = ctx.value) == null ? void 0 : _c.scale(dpr, dpr);
138
139
  setCanvasBgColor(ctx.value);
139
140
  }
141
+ };
142
+ const resize = () => {
143
+ if (ctx.value) {
144
+ const data = ctx.value.getImageData(0, 0, canvasWidth, canvasHeight);
145
+ initialize();
146
+ ctx.value.putImageData(data, 0, 0);
147
+ }
148
+ };
149
+ (0, import_vue2.watch)(import_utils.windowWidth, resize);
150
+ (0, import_vue2.onMounted)(initialize);
151
+ (0, import_use_expose.useExpose)({
152
+ resize
140
153
  });
141
154
  return () => (0, import_vue.createVNode)("div", {
142
155
  "class": bem()
@@ -52,7 +52,7 @@ export declare const Signature: import("../utils").WithInstall<import("vue").Def
52
52
  }, {}>>;
53
53
  export default Signature;
54
54
  export type { SignatureProps } from './Signature';
55
- export type { SignatureThemeVars } from './types';
55
+ export type { SignatureInstance, SignatureThemeVars } from './types';
56
56
  declare module 'vue' {
57
57
  interface GlobalComponents {
58
58
  Signature: typeof Signature;
@@ -1,3 +1,9 @@
1
+ import type { ComponentPublicInstance } from 'vue';
2
+ import type { SignatureProps } from './Signature';
3
+ export type SignatureExpose = {
4
+ resize: () => void;
5
+ };
6
+ export type SignatureInstance = ComponentPublicInstance<SignatureProps, SignatureExpose>;
1
7
  export type SignatureThemeVars = {
2
8
  signaturePadding?: string;
3
9
  signatureContentHeight?: string;
@@ -34,6 +34,10 @@ export declare const tabsProps: {
34
34
  type: BooleanConstructor;
35
35
  default: true;
36
36
  };
37
+ showHeader: {
38
+ type: BooleanConstructor;
39
+ default: true;
40
+ };
37
41
  lineWidth: (NumberConstructor | StringConstructor)[];
38
42
  lineHeight: (NumberConstructor | StringConstructor)[];
39
43
  beforeChange: PropType<Interceptor>;
@@ -79,6 +83,10 @@ declare const _default: import("vue").DefineComponent<{
79
83
  type: BooleanConstructor;
80
84
  default: true;
81
85
  };
86
+ showHeader: {
87
+ type: BooleanConstructor;
88
+ default: true;
89
+ };
82
90
  lineWidth: (NumberConstructor | StringConstructor)[];
83
91
  lineHeight: (NumberConstructor | StringConstructor)[];
84
92
  beforeChange: PropType<Interceptor>;
@@ -121,6 +129,10 @@ declare const _default: import("vue").DefineComponent<{
121
129
  type: BooleanConstructor;
122
130
  default: true;
123
131
  };
132
+ showHeader: {
133
+ type: BooleanConstructor;
134
+ default: true;
135
+ };
124
136
  lineWidth: (NumberConstructor | StringConstructor)[];
125
137
  lineHeight: (NumberConstructor | StringConstructor)[];
126
138
  beforeChange: PropType<Interceptor>;
@@ -149,6 +161,7 @@ declare const _default: import("vue").DefineComponent<{
149
161
  swipeable: boolean;
150
162
  shrink: boolean;
151
163
  scrollspy: boolean;
164
+ showHeader: boolean;
152
165
  swipeThreshold: string | number;
153
166
  }, {}>;
154
167
  export default _default;
package/lib/tabs/Tabs.js CHANGED
@@ -61,6 +61,7 @@ const tabsProps = {
61
61
  offsetTop: (0, import_utils.makeNumericProp)(0),
62
62
  background: String,
63
63
  lazyRender: import_utils.truthProp,
64
+ showHeader: import_utils.truthProp,
64
65
  lineWidth: import_utils.numericProp,
65
66
  lineHeight: import_utils.numericProp,
66
67
  beforeChange: Function,
@@ -362,13 +363,13 @@ var stdin_default = (0, import_vue2.defineComponent)({
362
363
  return () => (0, import_vue.createVNode)("div", {
363
364
  "ref": root,
364
365
  "class": bem([props.type])
365
- }, [props.sticky ? (0, import_vue.createVNode)(import_sticky.Sticky, {
366
+ }, [props.showHeader ? props.sticky ? (0, import_vue.createVNode)(import_sticky.Sticky, {
366
367
  "container": root.value,
367
368
  "offsetTop": offsetTopPx.value,
368
369
  "onScroll": onStickyScroll
369
370
  }, {
370
371
  default: () => [renderHeader()]
371
- }) : renderHeader(), (0, import_vue.createVNode)(import_TabsContent.default, {
372
+ }) : renderHeader() : null, (0, import_vue.createVNode)(import_TabsContent.default, {
372
373
  "ref": contentRef,
373
374
  "count": children.length,
374
375
  "inited": state.inited,
@@ -32,6 +32,10 @@ export declare const Tabs: import("../utils").WithInstall<import("vue").DefineCo
32
32
  type: BooleanConstructor;
33
33
  default: true;
34
34
  };
35
+ showHeader: {
36
+ type: BooleanConstructor;
37
+ default: true;
38
+ };
35
39
  lineWidth: (NumberConstructor | StringConstructor)[];
36
40
  lineHeight: (NumberConstructor | StringConstructor)[];
37
41
  beforeChange: import("vue").PropType<import("../utils").Interceptor>;
@@ -74,6 +78,10 @@ export declare const Tabs: import("../utils").WithInstall<import("vue").DefineCo
74
78
  type: BooleanConstructor;
75
79
  default: true;
76
80
  };
81
+ showHeader: {
82
+ type: BooleanConstructor;
83
+ default: true;
84
+ };
77
85
  lineWidth: (NumberConstructor | StringConstructor)[];
78
86
  lineHeight: (NumberConstructor | StringConstructor)[];
79
87
  beforeChange: import("vue").PropType<import("../utils").Interceptor>;
@@ -102,6 +110,7 @@ export declare const Tabs: import("../utils").WithInstall<import("vue").DefineCo
102
110
  swipeable: boolean;
103
111
  shrink: boolean;
104
112
  scrollspy: boolean;
113
+ showHeader: boolean;
105
114
  swipeThreshold: string | number;
106
115
  }, {}>>;
107
116
  export default Tabs;
@@ -1 +1 @@
1
- :root{--van-text-ellipsis-line-height: 1.6;--van-text-ellipsis-action-color: var(--van-blue)}.van-text-ellipsis{line-height:var(--van-text-ellipsis-line-height);white-space:pre-wrap;word-break:break-word}.van-text-ellipsis__action{cursor:pointer;color:var(--van-text-ellipsis-action-color)}.van-text-ellipsis__action:active{opacity:var(--van-active-opacity)}
1
+ :root{--van-text-ellipsis-line-height: 1.6;--van-text-ellipsis-action-color: var(--van-blue)}.van-text-ellipsis{line-height:var(--van-text-ellipsis-line-height);white-space:pre-wrap;overflow-wrap:break-word}.van-text-ellipsis__action{cursor:pointer;color:var(--van-text-ellipsis-action-color)}.van-text-ellipsis__action:active{opacity:var(--van-active-opacity)}