vant 4.7.2 → 4.7.3

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 (72) hide show
  1. package/README.md +1 -0
  2. package/es/address-edit/AddressEdit.mjs +1 -1
  3. package/es/cell/Cell.d.ts +17 -5
  4. package/es/cell/Cell.mjs +5 -2
  5. package/es/cell/index.d.ts +9 -3
  6. package/es/collapse-item/CollapseItem.d.ts +13 -4
  7. package/es/collapse-item/index.d.ts +9 -3
  8. package/es/config-provider/types.d.ts +1 -1
  9. package/es/field/Field.d.ts +30 -21
  10. package/es/field/Field.mjs +11 -3
  11. package/es/field/index.css +1 -1
  12. package/es/field/index.d.ts +18 -12
  13. package/es/field/types.d.ts +1 -1
  14. package/es/form/Form.d.ts +3 -0
  15. package/es/form/Form.mjs +1 -0
  16. package/es/form/index.d.ts +2 -0
  17. package/es/index.d.ts +1 -1
  18. package/es/index.mjs +1 -1
  19. package/es/locale/lang/ar-SA.d.ts +63 -0
  20. package/es/locale/lang/ar-SA.mjs +65 -0
  21. package/es/picker-group/PickerGroup.mjs +3 -3
  22. package/es/progress/types.d.ts +1 -4
  23. package/es/search/Search.d.ts +13 -13
  24. package/es/search/Search.mjs +3 -1
  25. package/es/search/index.css +1 -1
  26. package/es/search/index.d.ts +9 -9
  27. package/es/signature/Signature.mjs +16 -3
  28. package/es/signature/index.d.ts +1 -1
  29. package/es/signature/types.d.ts +6 -0
  30. package/es/tabs/Tabs.d.ts +13 -0
  31. package/es/tabs/Tabs.mjs +3 -2
  32. package/es/tabs/index.d.ts +9 -0
  33. package/es/text-ellipsis/index.css +1 -1
  34. package/lib/address-edit/AddressEdit.js +1 -1
  35. package/lib/cell/Cell.d.ts +17 -5
  36. package/lib/cell/Cell.js +5 -2
  37. package/lib/cell/index.d.ts +9 -3
  38. package/lib/collapse-item/CollapseItem.d.ts +13 -4
  39. package/lib/collapse-item/index.d.ts +9 -3
  40. package/lib/config-provider/types.d.ts +1 -1
  41. package/lib/field/Field.d.ts +30 -21
  42. package/lib/field/Field.js +11 -3
  43. package/lib/field/index.css +1 -1
  44. package/lib/field/index.d.ts +18 -12
  45. package/lib/field/types.d.ts +1 -1
  46. package/lib/form/Form.d.ts +3 -0
  47. package/lib/form/Form.js +1 -0
  48. package/lib/form/index.d.ts +2 -0
  49. package/lib/index.css +1 -1
  50. package/lib/index.d.ts +1 -1
  51. package/lib/index.js +1 -1
  52. package/lib/locale/lang/ar-SA.d.ts +63 -0
  53. package/lib/locale/lang/ar-SA.js +84 -0
  54. package/lib/picker-group/PickerGroup.js +2 -2
  55. package/lib/progress/types.d.ts +1 -4
  56. package/lib/search/Search.d.ts +13 -13
  57. package/lib/search/Search.js +3 -1
  58. package/lib/search/index.css +1 -1
  59. package/lib/search/index.d.ts +9 -9
  60. package/lib/signature/Signature.js +14 -1
  61. package/lib/signature/index.d.ts +1 -1
  62. package/lib/signature/types.d.ts +6 -0
  63. package/lib/tabs/Tabs.d.ts +13 -0
  64. package/lib/tabs/Tabs.js +3 -2
  65. package/lib/tabs/index.d.ts +9 -0
  66. package/lib/text-ellipsis/index.css +1 -1
  67. package/lib/vant.cjs.js +40 -13
  68. package/lib/vant.es.js +41 -14
  69. package/lib/vant.js +40 -13
  70. package/lib/vant.min.js +1 -1
  71. package/lib/web-types.json +1 -1
  72. package/package.json +2 -2
@@ -3,6 +3,7 @@ export declare const Form: import("../utils").WithInstall<import("vue").DefineCo
3
3
  colon: BooleanConstructor;
4
4
  disabled: BooleanConstructor;
5
5
  readonly: BooleanConstructor;
6
+ required: import("vue").PropType<boolean | "auto">;
6
7
  showError: BooleanConstructor;
7
8
  labelWidth: (NumberConstructor | StringConstructor)[];
8
9
  labelAlign: import("vue").PropType<import("..").FieldTextAlign>;
@@ -26,6 +27,7 @@ export declare const Form: import("../utils").WithInstall<import("vue").DefineCo
26
27
  colon: BooleanConstructor;
27
28
  disabled: BooleanConstructor;
28
29
  readonly: BooleanConstructor;
30
+ required: import("vue").PropType<boolean | "auto">;
29
31
  showError: BooleanConstructor;
30
32
  labelWidth: (NumberConstructor | StringConstructor)[];
31
33
  labelAlign: import("vue").PropType<import("..").FieldTextAlign>;
package/es/index.d.ts CHANGED
@@ -105,4 +105,4 @@ declare namespace _default {
105
105
  }
106
106
  export default _default;
107
107
  export function install(app: any): void;
108
- export const version: "4.7.2";
108
+ export const version: "4.7.3";
package/es/index.mjs CHANGED
@@ -98,7 +98,7 @@ import { Toast } from "./toast/index.mjs";
98
98
  import { TreeSelect } from "./tree-select/index.mjs";
99
99
  import { Uploader } from "./uploader/index.mjs";
100
100
  import { Watermark } from "./watermark/index.mjs";
101
- const version = "4.7.2";
101
+ const version = "4.7.3";
102
102
  function install(app) {
103
103
  const components = [
104
104
  ActionBar,
@@ -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,65 @@
1
+ var stdin_default = {
2
+ name: "\u0627\u0644\u0627\u0633\u0645",
3
+ tel: "\u0627\u0644\u0647\u0627\u062A\u0641",
4
+ save: "\u062D\u0641\u0638",
5
+ clear: "\u0645\u0633\u062D",
6
+ cancel: "\u0625\u0644\u063A\u0627\u0621",
7
+ confirm: "\u062A\u0623\u0643\u064A\u062F",
8
+ delete: "\u062D\u0630\u0641",
9
+ loading: "\u062C\u0627\u0631 \u0627\u0644\u062A\u062D\u0645\u064A\u0644...",
10
+ noCoupon: "\u0644\u0627 \u064A\u0648\u062C\u062F \u0643\u0648\u0628\u0648\u0646\u0627\u062A",
11
+ nameEmpty: "\u064A\u0631\u062C\u0649 \u0645\u0644\u0621 \u0627\u0644\u0627\u0633\u0645",
12
+ addContact: "\u0625\u0636\u0627\u0641\u0629 \u062C\u0647\u0629 \u0627\u062A\u0635\u0627\u0644",
13
+ telInvalid: "\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641 \u063A\u064A\u0631 \u0635\u062D\u064A\u062D",
14
+ vanCalendar: {
15
+ end: "\u0646\u0647\u0627\u064A\u0629",
16
+ start: "\u0628\u062F\u0627\u064A\u0629",
17
+ title: "\u0627\u0644\u062A\u0642\u0648\u064A\u0645",
18
+ 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"],
19
+ monthTitle: (year, month) => `${year}/${month}`,
20
+ rangePrompt: (maxRange) => `\u0627\u062E\u062A\u0631 \u0644\u0627 \u064A\u0632\u064A\u062F \u0639\u0646 ${maxRange} \u0623\u064A\u0627\u0645`
21
+ },
22
+ vanCascader: {
23
+ select: "\u0627\u062E\u062A\u0631"
24
+ },
25
+ vanPagination: {
26
+ prev: "\u0627\u0644\u0633\u0627\u0628\u0642",
27
+ next: "\u0627\u0644\u062A\u0627\u0644\u064A"
28
+ },
29
+ vanPullRefresh: {
30
+ pulling: "\u0627\u0633\u062D\u0628 \u0644\u0644\u062A\u062D\u062F\u064A\u062B...",
31
+ loosing: "\u0623\u0641\u0644\u062A \u0644\u0644\u062A\u062D\u062F\u064A\u062B..."
32
+ },
33
+ vanSubmitBar: {
34
+ label: "\u0627\u0644\u0645\u062C\u0645\u0648\u0639:"
35
+ },
36
+ vanCoupon: {
37
+ unlimited: "\u063A\u064A\u0631 \u0645\u062D\u062F\u0648\u062F",
38
+ discount: (discount) => `${discount * 10}% \u062E\u0635\u0645`,
39
+ condition: (condition) => `\u0639\u0644\u0649 \u0627\u0644\u0623\u0642\u0644 ${condition}`
40
+ },
41
+ vanCouponCell: {
42
+ title: "\u0643\u0648\u0628\u0648\u0646",
43
+ count: (count) => `\u0644\u062F\u064A\u0643 ${count} \u0643\u0648\u0628\u0648\u0646\u0627\u062A`
44
+ },
45
+ vanCouponList: {
46
+ exchange: "\u0627\u0633\u062A\u0628\u062F\u0627\u0644",
47
+ close: "\u0625\u063A\u0644\u0627\u0642",
48
+ enable: "\u0645\u062A\u0627\u062D",
49
+ disabled: "\u063A\u064A\u0631 \u0645\u062A\u0627\u062D",
50
+ placeholder: "\u0643\u0648\u062F \u0627\u0644\u0643\u0648\u0628\u0648\u0646"
51
+ },
52
+ vanAddressEdit: {
53
+ area: "\u0627\u0644\u0645\u0646\u0637\u0642\u0629",
54
+ areaEmpty: "\u064A\u0631\u062C\u0649 \u0627\u062E\u062A\u064A\u0627\u0631 \u0645\u0646\u0637\u0642\u0629 \u0627\u0633\u062A\u0642\u0628\u0627\u0644",
55
+ 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",
56
+ addressDetail: "\u0627\u0644\u0639\u0646\u0648\u0627\u0646",
57
+ defaultAddress: "\u062A\u0639\u064A\u064A\u0646 \u0643\u0639\u0646\u0648\u0627\u0646 \u0627\u0641\u062A\u0631\u0627\u0636\u064A"
58
+ },
59
+ vanAddressList: {
60
+ add: "\u0625\u0636\u0627\u0641\u0629 \u0639\u0646\u0648\u0627\u0646 \u062C\u062F\u064A\u062F"
61
+ }
62
+ };
63
+ export {
64
+ stdin_default as default
65
+ };
@@ -1,5 +1,5 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
- import { defineComponent } from "vue";
2
+ import { defineComponent, Comment } from "vue";
3
3
  import { pick, extend, makeArrayProp, makeNumericProp, createNamespace } from "../utils/index.mjs";
4
4
  import { useChildren } from "@vant/use";
5
5
  import { useSyncPropRef } from "../composables/use-sync-prop-ref.mjs";
@@ -37,8 +37,8 @@ var stdin_default = defineComponent({
37
37
  };
38
38
  const onCancel = () => emit("cancel");
39
39
  return () => {
40
- var _a;
41
- const childNodes = (_a = slots.default) == null ? void 0 : _a.call(slots);
40
+ var _a, _b;
41
+ const childNodes = (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b.filter((node) => node.type !== Comment);
42
42
  const confirmButtonText = showNextButton() ? props.nextStepText : props.confirmButtonText;
43
43
  return _createVNode("div", {
44
44
  "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;
@@ -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;
@@ -82,7 +82,9 @@ var stdin_default = defineComponent({
82
82
  return _createVNode(Field, _mergeProps({
83
83
  "ref": fieldRef,
84
84
  "type": "search",
85
- "class": bem("field"),
85
+ "class": bem("field", {
86
+ "with-message": fieldAttrs.errorMessage
87
+ }),
86
88
  "border": false,
87
89
  "onBlur": onBlur,
88
90
  "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;
@@ -1,7 +1,8 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
- import { computed, ref, onMounted, defineComponent } from "vue";
3
- import { inBrowser, makeNumberProp, makeStringProp, createNamespace, preventDefault } from "../utils/index.mjs";
2
+ import { computed, ref, onMounted, defineComponent, watch } from "vue";
3
+ import { inBrowser, makeNumberProp, makeStringProp, createNamespace, preventDefault, windowWidth } from "../utils/index.mjs";
4
4
  import { useRect } from "@vant/use";
5
+ import { useExpose } from "../composables/use-expose.mjs";
5
6
  import { Button } from "../button/index.mjs";
6
7
  const [name, bem, t] = createNamespace("signature");
7
8
  const signatureProps = {
@@ -104,7 +105,7 @@ var stdin_default = defineComponent({
104
105
  }
105
106
  emit("clear");
106
107
  };
107
- onMounted(() => {
108
+ const initialize = () => {
108
109
  var _a, _b, _c;
109
110
  if (isRenderCanvas && canvasRef.value) {
110
111
  const canvas = canvasRef.value;
@@ -114,6 +115,18 @@ var stdin_default = defineComponent({
114
115
  (_c = ctx.value) == null ? void 0 : _c.scale(dpr, dpr);
115
116
  setCanvasBgColor(ctx.value);
116
117
  }
118
+ };
119
+ const resize = () => {
120
+ if (ctx.value) {
121
+ const data = ctx.value.getImageData(0, 0, canvasWidth, canvasHeight);
122
+ initialize();
123
+ ctx.value.putImageData(data, 0, 0);
124
+ }
125
+ };
126
+ watch(windowWidth, resize);
127
+ onMounted(initialize);
128
+ useExpose({
129
+ resize
117
130
  });
118
131
  return () => _createVNode("div", {
119
132
  "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;
package/es/tabs/Tabs.d.ts CHANGED
@@ -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/es/tabs/Tabs.mjs CHANGED
@@ -27,6 +27,7 @@ const tabsProps = {
27
27
  offsetTop: makeNumericProp(0),
28
28
  background: String,
29
29
  lazyRender: truthProp,
30
+ showHeader: truthProp,
30
31
  lineWidth: numericProp,
31
32
  lineHeight: numericProp,
32
33
  beforeChange: Function,
@@ -328,13 +329,13 @@ var stdin_default = defineComponent({
328
329
  return () => _createVNode("div", {
329
330
  "ref": root,
330
331
  "class": bem([props.type])
331
- }, [props.sticky ? _createVNode(Sticky, {
332
+ }, [props.showHeader ? props.sticky ? _createVNode(Sticky, {
332
333
  "container": root.value,
333
334
  "offsetTop": offsetTopPx.value,
334
335
  "onScroll": onStickyScroll
335
336
  }, {
336
337
  default: () => [renderHeader()]
337
- }) : renderHeader(), _createVNode(TabsContent, {
338
+ }) : renderHeader() : null, _createVNode(TabsContent, {
338
339
  "ref": contentRef,
339
340
  "count": children.length,
340
341
  "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)}
@@ -260,7 +260,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
260
260
  "label": t("area"),
261
261
  "is-link": !disableArea,
262
262
  "modelValue": areaText.value,
263
- "rules": rules.value.areaCode,
263
+ "rules": props.showArea ? rules.value.areaCode : void 0,
264
264
  "placeholder": props.areaPlaceholder || t("area"),
265
265
  "onFocus": () => onFocus("areaCode"),
266
266
  "onClick": () => {
@@ -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;