vant 3.2.3 → 3.2.4

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 (130) hide show
  1. package/changelog.generated.md +90 -45
  2. package/es/address-edit/index.d.ts +2 -0
  3. package/es/area/index.d.ts +2 -0
  4. package/es/calendar/index.d.ts +2 -0
  5. package/es/checkbox/Checker.js +1 -1
  6. package/es/checkbox/index.d.ts +2 -0
  7. package/es/checkbox-group/index.d.ts +2 -0
  8. package/es/collapse-item/CollapseItem.js +3 -1
  9. package/es/collapse-item/index.d.ts +2 -0
  10. package/es/count-down/CountDown.d.ts +2 -10
  11. package/es/count-down/index.d.ts +3 -1
  12. package/es/count-down/types.d.ts +11 -0
  13. package/es/count-down/types.js +1 -0
  14. package/es/coupon-list/CouponList.js +4 -11
  15. package/es/coupon-list/index.css +1 -1
  16. package/es/coupon-list/index.less +6 -1
  17. package/es/datetime-picker/index.d.ts +2 -0
  18. package/es/dialog/Dialog.d.ts +1 -4
  19. package/es/dialog/Dialog.js +2 -1
  20. package/es/dialog/function-call.d.ts +12 -37
  21. package/es/dialog/index.d.ts +2 -3
  22. package/es/dialog/types.d.ts +36 -0
  23. package/es/dialog/types.js +1 -0
  24. package/es/dropdown-item/index.d.ts +2 -0
  25. package/es/dropdown-menu/index.d.ts +2 -0
  26. package/es/field/Field.d.ts +8 -6
  27. package/es/field/Field.js +2 -2
  28. package/es/field/index.d.ts +6 -4
  29. package/es/form/index.d.ts +2 -0
  30. package/es/icon/index.css +1 -1
  31. package/es/image/Image.js +1 -2
  32. package/es/image-preview/index.d.ts +2 -0
  33. package/es/index-bar/index.d.ts +2 -0
  34. package/es/index.d.ts +1 -1
  35. package/es/index.js +1 -1
  36. package/es/list/index.d.ts +2 -0
  37. package/es/notice-bar/index.d.ts +2 -0
  38. package/es/notify/Notify.d.ts +1 -1
  39. package/es/notify/function-call.d.ts +4 -17
  40. package/es/notify/index.d.ts +2 -3
  41. package/es/notify/types.d.ts +20 -0
  42. package/es/notify/types.js +1 -0
  43. package/es/picker/index.d.ts +2 -0
  44. package/es/popover/Popover.d.ts +1 -0
  45. package/es/progress/index.d.ts +2 -0
  46. package/es/search/Search.d.ts +8 -0
  47. package/es/search/index.d.ts +8 -0
  48. package/es/submit-bar/index.css +1 -1
  49. package/es/submit-bar/index.less +1 -1
  50. package/es/swipe/index.d.ts +2 -0
  51. package/es/swipe-cell/index.d.ts +2 -0
  52. package/es/tabs/index.d.ts +2 -0
  53. package/es/tabs/utils.js +2 -4
  54. package/es/toast/Toast.d.ts +1 -2
  55. package/es/toast/Toast.js +2 -1
  56. package/es/toast/function-call.d.ts +2 -25
  57. package/es/toast/index.d.ts +2 -3
  58. package/es/toast/types.d.ts +32 -0
  59. package/es/toast/types.js +1 -0
  60. package/es/uploader/index.css +1 -1
  61. package/es/uploader/index.d.ts +2 -0
  62. package/es/uploader/index.less +0 -1
  63. package/lib/address-edit/index.d.ts +2 -0
  64. package/lib/area/index.d.ts +2 -0
  65. package/lib/calendar/index.d.ts +2 -0
  66. package/lib/checkbox/Checker.js +1 -1
  67. package/lib/checkbox/index.d.ts +2 -0
  68. package/lib/checkbox-group/index.d.ts +2 -0
  69. package/lib/collapse-item/CollapseItem.js +3 -1
  70. package/lib/collapse-item/index.d.ts +2 -0
  71. package/lib/count-down/CountDown.d.ts +2 -10
  72. package/lib/count-down/index.d.ts +3 -1
  73. package/lib/count-down/types.d.ts +11 -0
  74. package/lib/count-down/types.js +3 -0
  75. package/lib/coupon-list/CouponList.js +4 -12
  76. package/lib/coupon-list/index.css +1 -1
  77. package/lib/coupon-list/index.less +6 -1
  78. package/lib/datetime-picker/index.d.ts +2 -0
  79. package/lib/dialog/Dialog.d.ts +1 -4
  80. package/lib/dialog/function-call.d.ts +12 -37
  81. package/lib/dialog/index.d.ts +2 -3
  82. package/lib/dialog/types.d.ts +36 -0
  83. package/lib/dialog/types.js +3 -0
  84. package/lib/dropdown-item/index.d.ts +2 -0
  85. package/lib/dropdown-menu/index.d.ts +2 -0
  86. package/lib/field/Field.d.ts +8 -6
  87. package/lib/field/Field.js +2 -2
  88. package/lib/field/index.d.ts +6 -4
  89. package/lib/form/index.d.ts +2 -0
  90. package/lib/icon/index.css +1 -1
  91. package/lib/image/Image.js +1 -2
  92. package/lib/image-preview/index.d.ts +2 -0
  93. package/lib/index-bar/index.d.ts +2 -0
  94. package/lib/index.css +1 -1
  95. package/lib/index.d.ts +1 -1
  96. package/lib/index.js +1 -1
  97. package/lib/list/index.d.ts +2 -0
  98. package/lib/notice-bar/index.d.ts +2 -0
  99. package/lib/notify/Notify.d.ts +1 -1
  100. package/lib/notify/function-call.d.ts +4 -17
  101. package/lib/notify/index.d.ts +2 -3
  102. package/lib/notify/types.d.ts +20 -0
  103. package/lib/notify/types.js +3 -0
  104. package/lib/picker/index.d.ts +2 -0
  105. package/lib/popover/Popover.d.ts +1 -0
  106. package/lib/progress/index.d.ts +2 -0
  107. package/lib/search/Search.d.ts +8 -0
  108. package/lib/search/index.d.ts +8 -0
  109. package/lib/submit-bar/index.css +1 -1
  110. package/lib/submit-bar/index.less +1 -1
  111. package/lib/swipe/index.d.ts +2 -0
  112. package/lib/swipe-cell/index.d.ts +2 -0
  113. package/lib/tabs/index.d.ts +2 -0
  114. package/lib/tabs/utils.js +1 -4
  115. package/lib/toast/Toast.d.ts +1 -2
  116. package/lib/toast/function-call.d.ts +2 -25
  117. package/lib/toast/index.d.ts +2 -3
  118. package/lib/toast/types.d.ts +32 -0
  119. package/lib/toast/types.js +3 -0
  120. package/lib/uploader/index.css +1 -1
  121. package/lib/uploader/index.d.ts +2 -0
  122. package/lib/uploader/index.less +0 -1
  123. package/lib/vant.es.js +225 -269
  124. package/lib/vant.es.min.js +1 -1
  125. package/lib/vant.js +227 -271
  126. package/lib/vant.min.js +1 -1
  127. package/package.json +9 -9
  128. package/vetur/attributes.json +743 -731
  129. package/vetur/tags.json +234 -231
  130. package/vetur/web-types.json +2263 -2233
@@ -1,3 +1,92 @@
1
+ ### [v3.2.4](https://github.com/youzan/vant/compare/v3.2.3...v3.2.4)
2
+
3
+ `2021-09-26`
4
+
5
+ **Bug Fixes**
6
+
7
+ - @vant/cli: shoud scroll to top after routing [#9465](https://github.com/youzan/vant/issues/9465)
8
+ - 更新海南省三沙市地区数据信息 [#9493](https://github.com/youzan/vant/issues/9493)
9
+ - Collapse: wrapperRef may be undefined [#9505](https://github.com/youzan/vant/issues/9505)
10
+ - CouponList: fix scroll issue [#9480](https://github.com/youzan/vant/issues/9480)
11
+ - Radio: icon ref may be undefined [#9503](https://github.com/youzan/vant/issues/9503)
12
+ - Tabs: failed to scroll into view when rendering multiple tabs [#9543](https://github.com/youzan/vant/issues/9543)
13
+
14
+ **build**
15
+
16
+ - deps-dev: bump @types/lodash from 4.14.172 to 4.14.173 [#9486](https://github.com/youzan/vant/issues/9486)
17
+ - deps-dev: bump @vant/area-data from 1.1.1 to 1.1.3 [#9520](https://github.com/youzan/vant/issues/9520)
18
+ - deps-dev: bump @vue/compiler-sfc from 3.2.11 to 3.2.12 [#9526](https://github.com/youzan/vant/issues/9526)
19
+ - deps-dev: bump vue from 3.2.11 to 3.2.12 [#9525](https://github.com/youzan/vant/issues/9525)
20
+ - deps: bump @typescript-eslint/eslint-plugin from 4.31.0 to 4.31.1 [#9467](https://github.com/youzan/vant/issues/9467)
21
+ - deps: bump @typescript-eslint/parser from 4.31.0 to 4.31.1 [#9466](https://github.com/youzan/vant/issues/9466)
22
+ - deps: bump @vitejs/plugin-vue from 1.6.2 to 1.8.1 [#9523](https://github.com/youzan/vant/issues/9523)
23
+ - deps: bump @vitejs/plugin-vue from 1.8.1 to 1.9.0 [#9537](https://github.com/youzan/vant/issues/9537)
24
+ - deps: bump babel-jest from 27.1.1 to 27.2.0 [#9471](https://github.com/youzan/vant/issues/9471)
25
+ - deps: bump babel-jest from 27.2.0 to 27.2.1 [#9535](https://github.com/youzan/vant/issues/9535)
26
+ - deps: bump commander from 8.1.0 to 8.2.0 [#9459](https://github.com/youzan/vant/issues/9459)
27
+ - deps: bump eslint-plugin-markdown from 2.2.0 to 2.2.1 [#9458](https://github.com/youzan/vant/issues/9458)
28
+ - deps: bump eslint-plugin-vue from 7.17.0 to 7.18.0 [#9522](https://github.com/youzan/vant/issues/9522)
29
+ - deps: bump ini from 1.3.5 to 1.3.8 in /packages/vant-lazyload [#9558](https://github.com/youzan/vant/issues/9558)
30
+ - deps: bump jest from 27.1.1 to 27.2.0 [#9469](https://github.com/youzan/vant/issues/9469)
31
+ - deps: bump jest from 27.2.0 to 27.2.1 [#9534](https://github.com/youzan/vant/issues/9534)
32
+ - deps: bump markdown-it-anchor from 8.3.0 to 8.3.1 [#9519](https://github.com/youzan/vant/issues/9519)
33
+ - deps: bump path-parse in /packages/vant-lazyload [#9559](https://github.com/youzan/vant/issues/9559)
34
+ - deps: bump prettier from 2.4.0 to 2.4.1 [#9495](https://github.com/youzan/vant/issues/9495)
35
+ - deps: bump typescript from 4.4.2 to 4.4.3 [#9460](https://github.com/youzan/vant/issues/9460)
36
+ - deps: bump vite from 2.5.6 to 2.5.7 [#9468](https://github.com/youzan/vant/issues/9468)
37
+ - deps: bump vite from 2.5.7 to 2.5.8 [#9496](https://github.com/youzan/vant/issues/9496)
38
+ - deps: bump vite from 2.5.8 to 2.5.10 [#9524](https://github.com/youzan/vant/issues/9524)
39
+ - deps: bump vite-plugin-md from 0.11.0 to 0.11.1 [#9521](https://github.com/youzan/vant/issues/9521)
40
+ - fix deploy site action [#9555](https://github.com/youzan/vant/issues/9555)
41
+
42
+ **Document**
43
+
44
+ - @vant/icons: changelog 1.7.1 [ddecb3](https://github.com/youzan/vant/commit/ddecb3a2d047037a18f6cf666389b5edcec51141)
45
+ - @vant/use: changelog v1.3.1 [70eec2](https://github.com/youzan/vant/commit/70eec20d25098e86a768983a94658d56ee0ab21c)
46
+ - add faq links [#9548](https://github.com/youzan/vant/issues/9548)
47
+ - add iOS :active pseudo faq [#9547](https://github.com/youzan/vant/issues/9547)
48
+ - add props types to document [#9550](https://github.com/youzan/vant/issues/9550)
49
+ - add usage of function component in script setup [#9517](https://github.com/youzan/vant/issues/9517)
50
+ - add vant-theme link [#9489](https://github.com/youzan/vant/issues/9489)
51
+ - changelog: 3.2.3 [362d5a](https://github.com/youzan/vant/commit/362d5a8a65e41cff932270fc666293516a2d756c)
52
+ - collapse: fix typo [#9477](https://github.com/youzan/vant/issues/9477)
53
+ - fix design resource link [#9492](https://github.com/youzan/vant/issues/9492)
54
+ - NumberKeyboard: fix multiple extraKey doc [#9551](https://github.com/youzan/vant/issues/9551)
55
+ - Tabs: add sticky offset-top tip [#9506](https://github.com/youzan/vant/issues/9506)
56
+ - Uploader: add faq [#9529](https://github.com/youzan/vant/issues/9529)
57
+
58
+ - Create FUNDING.yml [211c3b](https://github.com/youzan/vant/commit/211c3bff19b8ae688803c33153d622ed087058c6)
59
+
60
+ **Feature**
61
+
62
+ - @vant/cli: add enableVConsole option [#9527](https://github.com/youzan/vant/issues/9527)
63
+ - @vant/icons: add guide-o icon [c5f45a](https://github.com/youzan/vant/commit/c5f45a5c134bf9d789c943b247c620a1a2391d03)
64
+ - Search: add autocomplete prop [#9553](https://github.com/youzan/vant/issues/9553)
65
+ - Search: add name prop [#9563](https://github.com/youzan/vant/issues/9563)
66
+
67
+ **perf**
68
+
69
+ - @vant/lazyload: reduce production log [33d7aa](https://github.com/youzan/vant/commit/33d7aa8f1aee38576f1a0b3549560edd7b5fe0ed)
70
+ - @vant/lazyload: remove edge 15 polyfill [00b156](https://github.com/youzan/vant/commit/00b1568887321cf452ed4b8872fe99f089a74b22)
71
+ - @vant/use: remove raf polyfill [#9544](https://github.com/youzan/vant/issues/9544)
72
+
73
+ **release**
74
+
75
+ - @vant/area-data@1.1.3 [8d0f12](https://github.com/youzan/vant/commit/8d0f120ddecd56a8f3ed3d4dae810af22aa02181)
76
+ - @vant/icons 1.7.1 [6aa3cd](https://github.com/youzan/vant/commit/6aa3cd186b39d2f2e8b1a9a3cd24e53cbcd38b4e)
77
+ - @vant/lazyload 1.3.0 [3aa3bb](https://github.com/youzan/vant/commit/3aa3bbfa49b4601e7c9ea9bc3f9738708700aa9d)
78
+ - @vant/use 1.3.1 [67437b](https://github.com/youzan/vant/commit/67437b541e5e93014cd7d252a2b14225e48340b7)
79
+
80
+ **style**
81
+
82
+ - reduce calculation [#9479](https://github.com/youzan/vant/issues/9479)
83
+
84
+ **Types**
85
+
86
+ - @vant/lazyload: add $Lazyload typing [3ad17a](https://github.com/youzan/vant/commit/3ad17abd524144f249d894f4223718995cab1849)
87
+ - export props types [a3380f](https://github.com/youzan/vant/commit/a3380f08c06f5fd32443e9b033e3d8a29c1f726a)
88
+ - fix $toast、$dialog、$notify typing [#9556](https://github.com/youzan/vant/issues/9556)
89
+ - Popover: PopoverAction type allow extra properties [#9554](https://github.com/youzan/vant/issues/9554)
1
90
  ### [v3.2.3](https://github.com/youzan/vant/compare/v3.2.2...v3.2.3)
2
91
 
3
92
  `2021-09-12`
@@ -57,51 +146,7 @@
57
146
  **refactor**
58
147
 
59
148
  - @vant/cli: remove component auto registration [911d06](https://github.com/youzan/vant/commit/911d0669deca63dd6c9f9b268177904db6d8a48b)
60
- ### [v3.2.2](https://github.com/youzan/vant/compare/v3.2.1...v3.2.2)
61
-
62
- `2021-09-02`
63
-
64
- **Bug Fixes**
65
-
66
- - AddressEdit: remove unused finish button [#9364](https://github.com/youzan/vant/issues/9364)
67
- - Progress: fix render error when use v-show and improve performance [841e09](https://github.com/youzan/vant/commit/841e09d0529961058ecb63ed26f018cf3a66a3bf)
68
- - Progress: percentage missing default value [8ac597](https://github.com/youzan/vant/commit/8ac597dc3d2316d34f866dcfd7e1646c695da180)
69
-
70
- **Document**
71
-
72
- - add documentation of all typings [#9359](https://github.com/youzan/vant/issues/9359)
73
- - add documentation version tip [#9378](https://github.com/youzan/vant/issues/9378)
74
- - add more component registration guide [#9319](https://github.com/youzan/vant/issues/9319)
75
- - Calendar: update demo [#9341](https://github.com/youzan/vant/issues/9341)
76
- - changelog: 3.2.1 [b33ef2](https://github.com/youzan/vant/commit/b33ef265fef6aee68ffe01c82d2512e1b87a1579)
77
- - fix useRect param [#9370](https://github.com/youzan/vant/issues/9370)
78
- - improve typing [#9362](https://github.com/youzan/vant/issues/9362)
79
- - Progress: improve transition demo [#9335](https://github.com/youzan/vant/issues/9335)
80
- - Progress: remove Methods resize [49b4ff](https://github.com/youzan/vant/commit/49b4ffe7f0649775b896aa12fc12b8231620f288)
81
-
82
- **Feature**
83
-
84
- - Field: add id prop [#9347](https://github.com/youzan/vant/issues/9347)
85
- - Field: add van-field__error class when error [#9327](https://github.com/youzan/vant/issues/9327)
86
- - Field: using <label> tag for label [#9346](https://github.com/youzan/vant/issues/9346)
87
- - Popover: add show-arrow prop [#9372](https://github.com/youzan/vant/issues/9372)
88
- - Progress: add transition effect [ba4ff5](https://github.com/youzan/vant/commit/ba4ff58af6ccf67e255bf43ef905677dc64596a3)
89
- - Search: add id prop [#9349](https://github.com/youzan/vant/issues/9349)
90
- - Tab: add show-zero-badge prop [#9343](https://github.com/youzan/vant/issues/9343)
91
-
92
- **perf**
93
-
94
- - Locale: simplify locale configs [#9329](https://github.com/youzan/vant/issues/9329)
95
149
 
96
150
  **release**
97
151
 
98
- - 3.2.2 [c14742](https://github.com/youzan/vant/commit/c147428176319f4a85d02bf328183782699cdb68)
99
-
100
- **style**
101
-
102
- - fix animation css vars not work [#9337](https://github.com/youzan/vant/issues/9337)
103
-
104
- **Types**
105
-
106
- - Calendar: improve default-date typing [#9358](https://github.com/youzan/vant/issues/9358)
107
- - reduce non-null assertion [#9355](https://github.com/youzan/vant/issues/9355)
152
+ - 3.2.3 [f6fca2](https://github.com/youzan/vant/commit/f6fca2694945eeb37816b3817f68258b7a523d51)
@@ -1,3 +1,4 @@
1
+ import { AddressEditProps } from './AddressEdit';
1
2
  export declare const AddressEdit: import("../utils").WithInstall<import("vue").DefineComponent<{
2
3
  areaList: import("vue").PropType<import("..").AreaList>;
3
4
  isSaving: BooleanConstructor;
@@ -120,4 +121,5 @@ export declare const AddressEdit: import("../utils").WithInstall<import("vue").D
120
121
  areaColumnsPlaceholder: string[];
121
122
  }>>;
122
123
  export default AddressEdit;
124
+ export type { AddressEditProps };
123
125
  export type { AddressEditInfo, AddressEditInstance, AddressEditSearchItem, } from './types';
@@ -1,3 +1,4 @@
1
+ import { AreaProps } from './Area';
1
2
  export declare const Area: import("../utils").WithInstall<import("vue").DefineComponent<{
2
3
  title: StringConstructor;
3
4
  loading: BooleanConstructor;
@@ -90,4 +91,5 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
90
91
  columnsPlaceholder: string[];
91
92
  }>>;
92
93
  export default Area;
94
+ export type { AreaProps };
93
95
  export type { AreaList, AreaInstance, AreaColumnOption } from './types';
@@ -1,3 +1,4 @@
1
+ import { CalendarProps } from './Calendar';
1
2
  export declare const Calendar: import("../utils").WithInstall<import("vue").DefineComponent<{
2
3
  show: BooleanConstructor;
3
4
  title: StringConstructor;
@@ -174,4 +175,5 @@ export declare const Calendar: import("../utils").WithInstall<import("vue").Defi
174
175
  showRangePrompt: boolean;
175
176
  }>>;
176
177
  export default Calendar;
178
+ export type { CalendarProps };
177
179
  export type { CalendarType, CalendarDayItem, CalendarDayType, CalendarInstance, } from './types';
@@ -58,7 +58,7 @@ export default defineComponent({
58
58
  target
59
59
  } = event;
60
60
  var icon = iconRef.value;
61
- var iconClicked = icon === target || icon.contains(target);
61
+ var iconClicked = icon === target || (icon == null ? void 0 : icon.contains(target));
62
62
 
63
63
  if (!disabled.value && (iconClicked || !props.labelDisabled)) {
64
64
  emit('toggle');
@@ -1,3 +1,4 @@
1
+ import { CheckboxProps } from './Checkbox';
1
2
  export declare const Checkbox: import("../utils").WithInstall<import("vue").DefineComponent<{
2
3
  name: import("vue").PropType<unknown>;
3
4
  disabled: BooleanConstructor;
@@ -46,4 +47,5 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
46
47
  bindGroup: boolean;
47
48
  }>>;
48
49
  export default Checkbox;
50
+ export type { CheckboxProps };
49
51
  export type { CheckboxInstance } from './types';
@@ -1,3 +1,4 @@
1
+ import { CheckboxGroupProps } from './CheckboxGroup';
1
2
  export declare const CheckboxGroup: import("../utils").WithInstall<import("vue").DefineComponent<{
2
3
  max: (NumberConstructor | StringConstructor)[];
3
4
  disabled: BooleanConstructor;
@@ -31,4 +32,5 @@ export declare const CheckboxGroup: import("../utils").WithInstall<import("vue")
31
32
  modelValue: unknown[];
32
33
  }>>;
33
34
  export default CheckboxGroup;
35
+ export type { CheckboxGroupProps };
34
36
  export type { CheckboxGroupInstance, CheckboxGroupToggleAllOptions, } from './types';
@@ -83,7 +83,9 @@ export default defineComponent({
83
83
  wrapperRef.value.style.height = value ? '0' : contentHeight; // use double raf to ensure animation can start
84
84
 
85
85
  doubleRaf(() => {
86
- wrapperRef.value.style.height = value ? contentHeight : '0';
86
+ if (wrapperRef.value) {
87
+ wrapperRef.value.style.height = value ? contentHeight : '0';
88
+ }
87
89
  });
88
90
  } else {
89
91
  onTransitionEnd();
@@ -1,3 +1,4 @@
1
+ import { CollapseItemProps } from './CollapseItem';
1
2
  export declare const CollapseItem: import("../utils").WithInstall<import("vue").DefineComponent<{
2
3
  icon: StringConstructor;
3
4
  size: import("vue").PropType<"large">;
@@ -80,4 +81,5 @@ export declare const CollapseItem: import("../utils").WithInstall<import("vue").
80
81
  readonly: boolean;
81
82
  }>>;
82
83
  export default CollapseItem;
84
+ export type { CollapseItemProps };
83
85
  export type { CollapseItemInstance } from './types';
@@ -1,5 +1,4 @@
1
- import { ExtractPropTypes, ComponentPublicInstance } from 'vue';
2
- import { CurrentTime } from '@vant/use';
1
+ import { ExtractPropTypes } from 'vue';
3
2
  declare const props: {
4
3
  autoStart: {
5
4
  type: BooleanConstructor;
@@ -15,14 +14,7 @@ declare const props: {
15
14
  default: string;
16
15
  };
17
16
  };
18
- declare type CountDownProps = ExtractPropTypes<typeof props>;
19
- declare type CountDownExpose = {
20
- start: () => void;
21
- pause: () => void;
22
- reset: () => void;
23
- };
24
- export declare type CountDownInstance = ComponentPublicInstance<CountDownProps, CountDownExpose>;
25
- export declare type CountDownCurrentTime = CurrentTime;
17
+ export declare type CountDownProps = ExtractPropTypes<typeof props>;
26
18
  declare const _default: import("vue").DefineComponent<{
27
19
  autoStart: {
28
20
  type: BooleanConstructor;
@@ -1,3 +1,4 @@
1
+ import { CountDownProps } from './CountDown';
1
2
  export declare const CountDown: import("../utils").WithInstall<import("vue").DefineComponent<{
2
3
  autoStart: {
3
4
  type: BooleanConstructor;
@@ -32,4 +33,5 @@ export declare const CountDown: import("../utils").WithInstall<import("vue").Def
32
33
  format: string;
33
34
  }>>;
34
35
  export default CountDown;
35
- export type { CountDownInstance, CountDownCurrentTime } from './CountDown';
36
+ export type { CountDownProps };
37
+ export type { CountDownInstance, CountDownCurrentTime } from './types';
@@ -0,0 +1,11 @@
1
+ import type { ComponentPublicInstance } from 'vue';
2
+ import type { CurrentTime } from '@vant/use';
3
+ import type { CountDownProps } from './CountDown';
4
+ declare type CountDownExpose = {
5
+ start: () => void;
6
+ pause: () => void;
7
+ reset: () => void;
8
+ };
9
+ export declare type CountDownInstance = ComponentPublicInstance<CountDownProps, CountDownExpose>;
10
+ export declare type CountDownCurrentTime = CurrentTime;
11
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -3,7 +3,6 @@ import { watch, computed, nextTick, reactive, onMounted, defineComponent } from
3
3
 
4
4
  import { truthProp, createNamespace } from '../utils'; // Composables
5
5
 
6
- import { useWindowSize } from '@vant/use';
7
6
  import { useRefs } from '../composables/use-refs'; // Components
8
7
 
9
8
  import { Tab } from '../tab';
@@ -70,13 +69,7 @@ export default defineComponent({
70
69
  tab: 0,
71
70
  code: props.code
72
71
  });
73
- var {
74
- height: windowHeight
75
- } = useWindowSize();
76
72
  var buttonDisabled = computed(() => !props.exchangeButtonLoading && (props.exchangeButtonDisabled || !state.code || state.code.length < props.exchangeMinLength));
77
- var listStyle = computed(() => ({
78
- height: windowHeight.value - (props.showExchangeBar ? 140 : 94) + 'px'
79
- }));
80
73
 
81
74
  var onExchange = () => {
82
75
  emit('exchange', state.code); // auto clear currentCode when not use v-model
@@ -137,9 +130,9 @@ export default defineComponent({
137
130
  }, {
138
131
  default: () => [_createVNode("div", {
139
132
  "class": bem('list', {
133
+ 'with-bar': props.showExchangeBar,
140
134
  'with-bottom': props.showCloseButton
141
- }),
142
- "style": listStyle.value
135
+ })
143
136
  }, [coupons.map((coupon, index) => _createVNode(Coupon, {
144
137
  "key": coupon.id,
145
138
  "ref": setCouponRefs(index),
@@ -164,9 +157,9 @@ export default defineComponent({
164
157
  }, {
165
158
  default: () => [_createVNode("div", {
166
159
  "class": bem('list', {
160
+ 'with-bar': props.showExchangeBar,
167
161
  'with-bottom': props.showCloseButton
168
- }),
169
- "style": listStyle.value
162
+ })
170
163
  }, [disabledCoupons.map(coupon => _createVNode(Coupon, {
171
164
  "disabled": true,
172
165
  "key": coupon.id,
@@ -1 +1 @@
1
- :root{--van-coupon-list-background-color:var(--van-background-color);--van-coupon-list-field-padding:5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height:32px;--van-coupon-list-close-button-height:40px;--van-coupon-list-empty-image-size:200px;--van-coupon-list-empty-tip-color:var(--van-gray-6);--van-coupon-list-empty-tip-font-size:var(--van-font-size-md);--van-coupon-list-empty-tip-line-height:var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background-color:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-gray-5)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-gray-5)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-white)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:calc(var(--van-padding-md) + 50px)}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-white)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty{padding-top:60px;text-align:center}.van-coupon-list__empty p{margin:var(--van-padding-md) 0;color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}.van-coupon-list__empty img{width:var(--van-coupon-list-empty-image-size);height:var(--van-coupon-list-empty-image-size)}
1
+ :root{--van-coupon-list-background-color:var(--van-background-color);--van-coupon-list-field-padding:5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height:32px;--van-coupon-list-close-button-height:40px;--van-coupon-list-empty-image-size:200px;--van-coupon-list-empty-tip-color:var(--van-gray-6);--van-coupon-list-empty-tip-font-size:var(--van-font-size-md);--van-coupon-list-empty-tip-line-height:var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background-color:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-gray-5)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-gray-5)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-white)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;height:calc(100vh - 108px);padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bar{height:calc(100vh - 152px)}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-white)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty{padding-top:60px;text-align:center}.van-coupon-list__empty p{margin:var(--van-padding-md) 0;color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}.van-coupon-list__empty img{width:var(--van-coupon-list-empty-image-size);height:var(--van-coupon-list-empty-image-size)}
@@ -56,12 +56,17 @@
56
56
 
57
57
  &__list {
58
58
  box-sizing: border-box;
59
+ height: calc(100vh - 108px);
59
60
  padding: var(--van-padding-md) 0 var(--van-padding-lg);
60
61
  overflow-y: auto;
61
62
  -webkit-overflow-scrolling: touch;
62
63
 
64
+ &--with-bar {
65
+ height: calc(100vh - 152px);
66
+ }
67
+
63
68
  &--with-bottom {
64
- padding-bottom: calc(var(--van-padding-md) + 50px);
69
+ padding-bottom: 50px;
65
70
  }
66
71
  }
67
72
 
@@ -1,3 +1,4 @@
1
+ import { DatetimePickerProps } from './DatetimePicker';
1
2
  export declare const DatetimePicker: import("../utils").WithInstall<import("vue").DefineComponent<any, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<{
2
3
  [x: string]: any;
3
4
  }> | Readonly<{
@@ -11,4 +12,5 @@ export declare const DatetimePicker: import("../utils").WithInstall<import("vue"
11
12
  [x: string]: any;
12
13
  }>>;
13
14
  export default DatetimePicker;
15
+ export type { DatetimePickerProps };
14
16
  export type { DatetimePickerType, DatetimePickerInstance } from './types';
@@ -1,8 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- export declare type DialogTheme = 'default' | 'round-button';
3
- export declare type DialogAction = 'confirm' | 'cancel';
4
- export declare type DialogMessage = string | (() => JSX.Element);
5
- export declare type DialogMessageAlign = 'left' | 'center' | 'right';
2
+ import type { DialogTheme, DialogAction, DialogMessage, DialogMessageAlign } from './types';
6
3
  declare const _default: import("vue").DefineComponent<{
7
4
  show: BooleanConstructor;
8
5
  zIndex: (NumberConstructor | StringConstructor)[];
@@ -7,7 +7,8 @@ import { popupSharedProps, popupSharedPropKeys } from '../popup/shared'; // Comp
7
7
  import { Popup } from '../popup';
8
8
  import { Button } from '../button';
9
9
  import { ActionBar } from '../action-bar';
10
- import { ActionBarButton } from '../action-bar-button';
10
+ import { ActionBarButton } from '../action-bar-button'; // Types
11
+
11
12
  var [name, bem, t] = createNamespace('dialog');
12
13
  var popupKeys = [...popupSharedPropKeys, 'transition', 'closeOnPopstate'];
13
14
  export default defineComponent({
@@ -1,30 +1,5 @@
1
- import { App, CSSProperties, TeleportProps } from 'vue';
2
- import { Interceptor } from '../utils';
3
- import { DialogTheme, DialogAction, DialogMessage, DialogMessageAlign } from './Dialog';
4
- export declare type DialogOptions = {
5
- title?: string;
6
- width?: string | number;
7
- theme?: DialogTheme;
8
- message?: DialogMessage;
9
- overlay?: boolean;
10
- teleport?: TeleportProps['to'];
11
- className?: unknown;
12
- allowHtml?: boolean;
13
- lockScroll?: boolean;
14
- transition?: string;
15
- beforeClose?: Interceptor;
16
- messageAlign?: DialogMessageAlign;
17
- overlayClass?: string;
18
- overlayStyle?: CSSProperties;
19
- closeOnPopstate?: boolean;
20
- cancelButtonText?: string;
21
- showCancelButton?: boolean;
22
- showConfirmButton?: boolean;
23
- cancelButtonColor?: string;
24
- confirmButtonText?: string;
25
- confirmButtonColor?: string;
26
- closeOnClickOverlay?: boolean;
27
- };
1
+ import { App } from 'vue';
2
+ import type { DialogAction, DialogOptions } from './types';
28
3
  declare function Dialog(options: DialogOptions): Promise<unknown>;
29
4
  declare namespace Dialog {
30
5
  var defaultOptions: {
@@ -99,8 +74,8 @@ declare namespace Dialog {
99
74
  type: BooleanConstructor;
100
75
  default: true;
101
76
  };
102
- beforeClose: import("vue").PropType<Interceptor>;
103
- overlayStyle: import("vue").PropType<CSSProperties>;
77
+ beforeClose: import("vue").PropType<import("../utils").Interceptor>;
78
+ overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
104
79
  overlayClass: import("vue").PropType<unknown>;
105
80
  transitionAppear: BooleanConstructor;
106
81
  closeOnClickOverlay: {
@@ -109,13 +84,13 @@ declare namespace Dialog {
109
84
  };
110
85
  } & {
111
86
  title: StringConstructor;
112
- theme: import("vue").PropType<DialogTheme>;
87
+ theme: import("vue").PropType<import("./types").DialogTheme>;
113
88
  width: (NumberConstructor | StringConstructor)[];
114
- message: import("vue").PropType<DialogMessage>;
89
+ message: import("vue").PropType<import("./types").DialogMessage>;
115
90
  callback: import("vue").PropType<(action?: DialogAction | undefined) => void>;
116
91
  allowHtml: BooleanConstructor;
117
92
  className: import("vue").PropType<unknown>;
118
- messageAlign: import("vue").PropType<DialogMessageAlign>;
93
+ messageAlign: import("vue").PropType<import("./types").DialogMessageAlign>;
119
94
  closeOnPopstate: {
120
95
  type: BooleanConstructor;
121
96
  default: true;
@@ -176,21 +151,21 @@ declare namespace Dialog {
176
151
  showCancelButton: boolean;
177
152
  showConfirmButton: boolean;
178
153
  } & {
179
- message?: DialogMessage | undefined;
154
+ message?: import("./types").DialogMessage | undefined;
180
155
  title?: string | undefined;
181
156
  width?: string | number | undefined;
182
157
  zIndex?: string | number | undefined;
183
158
  duration?: string | number | undefined;
184
159
  teleport?: string | import("vue").RendererElement | null | undefined;
185
- beforeClose?: Interceptor | undefined;
186
- overlayStyle?: CSSProperties | undefined;
160
+ beforeClose?: import("../utils").Interceptor | undefined;
161
+ overlayStyle?: import("vue").CSSProperties | undefined;
187
162
  overlayClass?: unknown;
188
163
  className?: unknown;
189
164
  callback?: ((action?: DialogAction | undefined) => void) | undefined;
190
165
  cancelButtonText?: string | undefined;
191
166
  confirmButtonText?: string | undefined;
192
- theme?: DialogTheme | undefined;
193
- messageAlign?: DialogMessageAlign | undefined;
167
+ theme?: import("./types").DialogTheme | undefined;
168
+ messageAlign?: import("./types").DialogMessageAlign | undefined;
194
169
  cancelButtonColor?: string | undefined;
195
170
  confirmButtonColor?: string | undefined;
196
171
  }> & {
@@ -1,5 +1,4 @@
1
- import { Dialog, DialogOptions } from './function-call';
2
- import type { DialogTheme, DialogMessage, DialogMessageAlign } from './Dialog';
1
+ import { Dialog } from './function-call';
3
2
  export default Dialog;
4
3
  export { Dialog };
5
- export type { DialogTheme, DialogMessage, DialogOptions, DialogMessageAlign };
4
+ export type { DialogTheme, DialogMessage, DialogOptions, DialogMessageAlign, } from './types';
@@ -0,0 +1,36 @@
1
+ import { Dialog } from './function-call';
2
+ import type { CSSProperties, TeleportProps } from 'vue';
3
+ import type { Interceptor } from '../utils';
4
+ export declare type DialogTheme = 'default' | 'round-button';
5
+ export declare type DialogAction = 'confirm' | 'cancel';
6
+ export declare type DialogMessage = string | (() => JSX.Element);
7
+ export declare type DialogMessageAlign = 'left' | 'center' | 'right';
8
+ export declare type DialogOptions = {
9
+ title?: string;
10
+ width?: string | number;
11
+ theme?: DialogTheme;
12
+ message?: DialogMessage;
13
+ overlay?: boolean;
14
+ teleport?: TeleportProps['to'];
15
+ className?: unknown;
16
+ allowHtml?: boolean;
17
+ lockScroll?: boolean;
18
+ transition?: string;
19
+ beforeClose?: Interceptor;
20
+ messageAlign?: DialogMessageAlign;
21
+ overlayClass?: string;
22
+ overlayStyle?: CSSProperties;
23
+ closeOnPopstate?: boolean;
24
+ cancelButtonText?: string;
25
+ showCancelButton?: boolean;
26
+ showConfirmButton?: boolean;
27
+ cancelButtonColor?: string;
28
+ confirmButtonText?: string;
29
+ confirmButtonColor?: string;
30
+ closeOnClickOverlay?: boolean;
31
+ };
32
+ declare module '@vue/runtime-core' {
33
+ interface ComponentCustomProperties {
34
+ $dialog: typeof Dialog;
35
+ }
36
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
+ import { DropdownItemProps } from './DropdownItem';
1
2
  export declare const DropdownItem: import("../utils").WithInstall<import("vue").DefineComponent<{
2
3
  title: StringConstructor;
3
4
  disabled: BooleanConstructor;
@@ -42,4 +43,5 @@ export declare const DropdownItem: import("../utils").WithInstall<import("vue").
42
43
  options: import("./types").DropdownItemOption[];
43
44
  }>>;
44
45
  export default DropdownItem;
46
+ export type { DropdownItemProps };
45
47
  export type { DropdownItemInstance, DropdownItemOption } from './types';
@@ -1,3 +1,4 @@
1
+ import { DropdownMenuProps } from './DropdownMenu';
1
2
  export declare const DropdownMenu: import("../utils").WithInstall<import("vue").DefineComponent<{
2
3
  overlay: {
3
4
  type: BooleanConstructor;
@@ -46,4 +47,5 @@ export declare const DropdownMenu: import("../utils").WithInstall<import("vue").
46
47
  closeOnClickOutside: boolean;
47
48
  }>>;
48
49
  export default DropdownMenu;
50
+ export type { DropdownMenuProps };
49
51
  export type { DropdownMenuDirection } from './types';