vant 3.2.8 → 3.3.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 (171) hide show
  1. package/es/address-edit/AddressEdit.js +155 -180
  2. package/es/address-edit/AddressEditDetail.d.ts +10 -9
  3. package/es/address-edit/AddressEditDetail.js +6 -6
  4. package/es/button/Button.js +2 -2
  5. package/es/calendar/CalendarHeader.js +1 -3
  6. package/es/cascader/Cascader.js +10 -2
  7. package/es/checkbox/Checker.js +1 -1
  8. package/es/checkbox/types.d.ts +2 -6
  9. package/es/composables/use-id.d.ts +1 -0
  10. package/es/composables/use-id.js +14 -0
  11. package/es/composables/use-route.d.ts +1 -1
  12. package/es/composables/use-route.js +4 -4
  13. package/es/count-down/CountDown.js +1 -0
  14. package/es/coupon-list/CouponList.js +40 -24
  15. package/es/coupon-list/index.css +1 -1
  16. package/es/coupon-list/index.less +0 -5
  17. package/es/dropdown-item/DropdownItem.js +7 -2
  18. package/es/dropdown-item/types.d.ts +2 -6
  19. package/es/dropdown-menu/DropdownMenu.js +7 -3
  20. package/es/dropdown-menu/types.d.ts +1 -0
  21. package/es/empty/Network.js +22 -34
  22. package/es/field/Field.d.ts +1 -1
  23. package/es/field/Field.js +13 -5
  24. package/es/field/index.d.ts +2 -2
  25. package/es/field/types.d.ts +7 -6
  26. package/es/form/Form.js +2 -2
  27. package/es/image/Image.js +4 -9
  28. package/es/image-preview/ImagePreview.js +3 -4
  29. package/es/index.d.ts +1 -1
  30. package/es/index.js +1 -1
  31. package/es/lazyload/index.d.ts +1 -1
  32. package/es/lazyload/index.js +1 -1
  33. package/es/lazyload/vue-lazyload/index.d.ts +55 -0
  34. package/es/lazyload/vue-lazyload/index.js +46 -0
  35. package/es/lazyload/vue-lazyload/lazy-component.js +53 -0
  36. package/es/lazyload/vue-lazyload/lazy-container.js +98 -0
  37. package/es/lazyload/vue-lazyload/lazy-image.js +115 -0
  38. package/es/lazyload/vue-lazyload/lazy.js +507 -0
  39. package/es/lazyload/vue-lazyload/listener.js +241 -0
  40. package/es/lazyload/vue-lazyload/util.js +183 -0
  41. package/es/list/List.js +3 -1
  42. package/es/number-keyboard/NumberKeyboardKey.js +4 -4
  43. package/es/pagination/Pagination.js +67 -49
  44. package/es/pagination/index.css +1 -1
  45. package/es/pagination/index.less +32 -31
  46. package/es/password-input/PasswordInput.d.ts +1 -1
  47. package/es/password-input/index.d.ts +1 -1
  48. package/es/popover/Popover.js +2 -0
  49. package/es/popup/Popup.d.ts +1 -2
  50. package/es/popup/Popup.js +2 -5
  51. package/es/popup/index.d.ts +1 -2
  52. package/es/rate/Rate.js +5 -3
  53. package/es/search/Search.js +8 -2
  54. package/es/sidebar/Sidebar.js +1 -0
  55. package/es/sidebar-item/SidebarItem.js +4 -1
  56. package/es/slider/Slider.js +5 -3
  57. package/es/stepper/Stepper.js +11 -8
  58. package/es/swipe/Swipe.js +3 -4
  59. package/es/swipe/types.d.ts +1 -3
  60. package/es/switch/Switch.js +1 -0
  61. package/es/switch/index.css +1 -1
  62. package/es/switch/index.less +2 -0
  63. package/es/tab/Tab.js +17 -4
  64. package/es/tab/index.css +1 -1
  65. package/es/tab/index.less +1 -1
  66. package/es/tabbar/Tabbar.d.ts +1 -1
  67. package/es/tabbar/Tabbar.js +10 -10
  68. package/es/tabbar-item/TabbarItem.js +11 -4
  69. package/es/tabs/Tabs.js +10 -5
  70. package/es/tabs/TabsTitle.d.ts +6 -0
  71. package/es/tabs/TabsTitle.js +7 -1
  72. package/es/tabs/types.d.ts +1 -0
  73. package/es/uploader/UploaderPreviewItem.js +4 -1
  74. package/es/uploader/utils.d.ts +2 -2
  75. package/es/uploader/utils.js +2 -2
  76. package/es/utils/dom.d.ts +1 -0
  77. package/es/utils/dom.js +6 -2
  78. package/es/utils/format.js +6 -5
  79. package/es/vue-tsx-shim.d.ts +1 -0
  80. package/lib/address-edit/AddressEdit.js +156 -180
  81. package/lib/address-edit/AddressEditDetail.d.ts +10 -9
  82. package/lib/address-edit/AddressEditDetail.js +6 -6
  83. package/lib/button/Button.js +1 -1
  84. package/lib/calendar/CalendarHeader.js +1 -3
  85. package/lib/cascader/Cascader.js +10 -2
  86. package/lib/checkbox/Checker.js +1 -1
  87. package/lib/checkbox/types.d.ts +2 -6
  88. package/lib/composables/use-id.d.ts +1 -0
  89. package/lib/composables/use-id.js +21 -0
  90. package/lib/composables/use-route.d.ts +1 -1
  91. package/lib/composables/use-route.js +4 -4
  92. package/lib/count-down/CountDown.js +1 -0
  93. package/lib/coupon-list/CouponList.js +39 -22
  94. package/lib/coupon-list/index.css +1 -1
  95. package/lib/coupon-list/index.less +0 -5
  96. package/lib/dropdown-item/DropdownItem.js +7 -2
  97. package/lib/dropdown-item/types.d.ts +2 -6
  98. package/lib/dropdown-menu/DropdownMenu.js +7 -2
  99. package/lib/dropdown-menu/types.d.ts +1 -0
  100. package/lib/empty/Network.js +22 -34
  101. package/lib/field/Field.d.ts +1 -1
  102. package/lib/field/Field.js +14 -5
  103. package/lib/field/index.d.ts +2 -2
  104. package/lib/field/types.d.ts +7 -6
  105. package/lib/form/Form.js +1 -1
  106. package/lib/image/Image.js +4 -9
  107. package/lib/image-preview/ImagePreview.js +1 -2
  108. package/lib/index.css +1 -1
  109. package/lib/index.d.ts +1 -1
  110. package/lib/index.js +1 -1
  111. package/lib/lazyload/index.d.ts +1 -1
  112. package/lib/lazyload/index.js +3 -3
  113. package/lib/lazyload/vue-lazyload/index.d.ts +55 -0
  114. package/lib/lazyload/vue-lazyload/index.js +58 -0
  115. package/lib/lazyload/vue-lazyload/lazy-component.js +62 -0
  116. package/lib/lazyload/vue-lazyload/lazy-container.js +106 -0
  117. package/lib/lazyload/vue-lazyload/lazy-image.js +125 -0
  118. package/lib/lazyload/vue-lazyload/lazy.js +520 -0
  119. package/lib/lazyload/vue-lazyload/listener.js +251 -0
  120. package/lib/lazyload/vue-lazyload/util.js +213 -0
  121. package/lib/list/List.js +3 -1
  122. package/lib/number-keyboard/NumberKeyboardKey.js +3 -3
  123. package/lib/pagination/Pagination.js +65 -47
  124. package/lib/pagination/index.css +1 -1
  125. package/lib/pagination/index.less +32 -31
  126. package/lib/password-input/PasswordInput.d.ts +1 -1
  127. package/lib/password-input/index.d.ts +1 -1
  128. package/lib/popover/Popover.js +2 -0
  129. package/lib/popup/Popup.d.ts +1 -2
  130. package/lib/popup/Popup.js +2 -5
  131. package/lib/popup/index.d.ts +1 -2
  132. package/lib/rate/Rate.js +5 -3
  133. package/lib/search/Search.js +9 -2
  134. package/lib/sidebar/Sidebar.js +1 -0
  135. package/lib/sidebar-item/SidebarItem.js +4 -1
  136. package/lib/slider/Slider.js +5 -3
  137. package/lib/stepper/Stepper.js +11 -8
  138. package/lib/swipe/Swipe.js +1 -2
  139. package/lib/swipe/types.d.ts +1 -3
  140. package/lib/switch/Switch.js +1 -0
  141. package/lib/switch/index.css +1 -1
  142. package/lib/switch/index.less +2 -0
  143. package/lib/tab/Tab.js +19 -4
  144. package/lib/tab/index.css +1 -1
  145. package/lib/tab/index.less +1 -1
  146. package/lib/tabbar/Tabbar.d.ts +1 -1
  147. package/lib/tabbar/Tabbar.js +10 -10
  148. package/lib/tabbar-item/TabbarItem.js +11 -4
  149. package/lib/tabs/Tabs.js +9 -3
  150. package/lib/tabs/TabsTitle.d.ts +6 -0
  151. package/lib/tabs/TabsTitle.js +7 -1
  152. package/lib/tabs/types.d.ts +1 -0
  153. package/lib/uploader/UploaderPreviewItem.js +3 -0
  154. package/lib/uploader/utils.d.ts +2 -2
  155. package/lib/uploader/utils.js +3 -2
  156. package/lib/utils/dom.d.ts +1 -0
  157. package/lib/utils/dom.js +9 -2
  158. package/lib/utils/format.js +7 -5
  159. package/lib/vant.es.js +1086 -1068
  160. package/lib/vant.es.min.js +1086 -1068
  161. package/lib/vant.js +1085 -1067
  162. package/lib/vant.min.js +1 -1
  163. package/lib/vue-tsx-shim.d.ts +1 -0
  164. package/package.json +4 -4
  165. package/vetur/attributes.json +340 -340
  166. package/vetur/tags.json +119 -119
  167. package/vetur/web-types.json +1143 -1143
  168. package/es/composables/use-link-field.d.ts +0 -0
  169. package/es/composables/use-link-field.js +0 -0
  170. package/lib/composables/use-link-field.d.ts +0 -0
  171. package/lib/composables/use-link-field.js +0 -1
package/vetur/tags.json CHANGED
@@ -1,28 +1,4 @@
1
1
  {
2
- "van-action-sheet": {
3
- "attributes": [
4
- "v-model:show",
5
- "actions",
6
- "title",
7
- "cancel-text",
8
- "description",
9
- "closeable",
10
- "close-icon",
11
- "duration",
12
- "round",
13
- "overlay",
14
- "overlay-class",
15
- "overlay-style",
16
- "lock-scroll",
17
- "lazy-render",
18
- "close-on-popstate",
19
- "close-on-click-action",
20
- "close-on-click-overlay",
21
- "safe-area-inset-bottom",
22
- "teleport",
23
- "before-close"
24
- ]
25
- },
26
2
  "van-action-bar": {
27
3
  "attributes": [
28
4
  "safe-area-inset-bottom"
@@ -55,6 +31,41 @@
55
31
  "replace"
56
32
  ]
57
33
  },
34
+ "van-action-sheet": {
35
+ "attributes": [
36
+ "v-model:show",
37
+ "actions",
38
+ "title",
39
+ "cancel-text",
40
+ "description",
41
+ "closeable",
42
+ "close-icon",
43
+ "duration",
44
+ "round",
45
+ "overlay",
46
+ "overlay-class",
47
+ "overlay-style",
48
+ "lock-scroll",
49
+ "lazy-render",
50
+ "close-on-popstate",
51
+ "close-on-click-action",
52
+ "close-on-click-overlay",
53
+ "safe-area-inset-bottom",
54
+ "teleport",
55
+ "before-close"
56
+ ]
57
+ },
58
+ "van-address-list": {
59
+ "attributes": [
60
+ "v-model",
61
+ "list",
62
+ "disabled-list",
63
+ "disabled-text",
64
+ "switchable",
65
+ "add-button-text",
66
+ "default-tag-text"
67
+ ]
68
+ },
58
69
  "van-address-edit": {
59
70
  "attributes": [
60
71
  "area-list",
@@ -81,27 +92,6 @@
81
92
  "validator"
82
93
  ]
83
94
  },
84
- "van-badge": {
85
- "attributes": [
86
- "content",
87
- "color",
88
- "dot",
89
- "max",
90
- "offset",
91
- "show-zero"
92
- ]
93
- },
94
- "van-address-list": {
95
- "attributes": [
96
- "v-model",
97
- "list",
98
- "disabled-list",
99
- "disabled-text",
100
- "switchable",
101
- "add-button-text",
102
- "default-tag-text"
103
- ]
104
- },
105
95
  "van-area": {
106
96
  "attributes": [
107
97
  "value",
@@ -119,6 +109,16 @@
119
109
  "is-oversea-code"
120
110
  ]
121
111
  },
112
+ "van-badge": {
113
+ "attributes": [
114
+ "content",
115
+ "color",
116
+ "dot",
117
+ "max",
118
+ "offset",
119
+ "show-zero"
120
+ ]
121
+ },
122
122
  "van-button": {
123
123
  "attributes": [
124
124
  "type",
@@ -238,6 +238,29 @@
238
238
  "label-class"
239
239
  ]
240
240
  },
241
+ "van-checkbox": {
242
+ "attributes": [
243
+ "v-model",
244
+ "name",
245
+ "shape",
246
+ "disabled",
247
+ "label-disabled",
248
+ "label-position",
249
+ "icon-size",
250
+ "checked-color",
251
+ "bind-group"
252
+ ]
253
+ },
254
+ "van-checkbox-group": {
255
+ "attributes": [
256
+ "v-model",
257
+ "disabled",
258
+ "max",
259
+ "direction",
260
+ "icon-size",
261
+ "checked-color"
262
+ ]
263
+ },
241
264
  "van-circle": {
242
265
  "attributes": [
243
266
  "v-model:current-rate",
@@ -270,29 +293,6 @@
270
293
  "tag"
271
294
  ]
272
295
  },
273
- "van-checkbox": {
274
- "attributes": [
275
- "v-model",
276
- "name",
277
- "shape",
278
- "disabled",
279
- "label-disabled",
280
- "label-position",
281
- "icon-size",
282
- "checked-color",
283
- "bind-group"
284
- ]
285
- },
286
- "van-checkbox-group": {
287
- "attributes": [
288
- "v-model",
289
- "disabled",
290
- "max",
291
- "direction",
292
- "icon-size",
293
- "checked-color"
294
- ]
295
- },
296
296
  "van-collapse": {
297
297
  "attributes": [
298
298
  "v-model",
@@ -526,6 +526,23 @@
526
526
  "autocomplete"
527
527
  ]
528
528
  },
529
+ "van-form": {
530
+ "attributes": [
531
+ "label-width",
532
+ "label-align",
533
+ "input-align",
534
+ "error-message-align",
535
+ "validate-trigger",
536
+ "colon",
537
+ "disabled",
538
+ "readonly",
539
+ "validate-first",
540
+ "scroll-to-error",
541
+ "show-error",
542
+ "show-error-message",
543
+ "submit-on-enter"
544
+ ]
545
+ },
529
546
  "van-grid": {
530
547
  "attributes": [
531
548
  "column-num",
@@ -563,21 +580,22 @@
563
580
  "tag"
564
581
  ]
565
582
  },
566
- "van-form": {
583
+ "van-image": {
567
584
  "attributes": [
568
- "label-width",
569
- "label-align",
570
- "input-align",
571
- "error-message-align",
572
- "validate-trigger",
573
- "colon",
574
- "disabled",
575
- "readonly",
576
- "validate-first",
577
- "scroll-to-error",
585
+ "src",
586
+ "fit",
587
+ "alt",
588
+ "width",
589
+ "height",
590
+ "radius",
591
+ "round",
592
+ "lazy-load",
578
593
  "show-error",
579
- "show-error-message",
580
- "submit-on-enter"
594
+ "show-loading",
595
+ "error-icon",
596
+ "loading-icon",
597
+ "icon-size",
598
+ "icon-prefix"
581
599
  ]
582
600
  },
583
601
  "van-image-preview": {
@@ -617,24 +635,6 @@
617
635
  "index"
618
636
  ]
619
637
  },
620
- "van-image": {
621
- "attributes": [
622
- "src",
623
- "fit",
624
- "alt",
625
- "width",
626
- "height",
627
- "radius",
628
- "round",
629
- "lazy-load",
630
- "show-error",
631
- "show-loading",
632
- "error-icon",
633
- "loading-icon",
634
- "icon-size",
635
- "icon-prefix"
636
- ]
637
- },
638
638
  "van-list": {
639
639
  "attributes": [
640
640
  "v-model:loading",
@@ -648,6 +648,16 @@
648
648
  "direction"
649
649
  ]
650
650
  },
651
+ "van-loading": {
652
+ "attributes": [
653
+ "color",
654
+ "type",
655
+ "size",
656
+ "text-size",
657
+ "text-color",
658
+ "vertical"
659
+ ]
660
+ },
651
661
  "van-nav-bar": {
652
662
  "attributes": [
653
663
  "title",
@@ -661,16 +671,6 @@
661
671
  "safe-area-inset-top"
662
672
  ]
663
673
  },
664
- "van-loading": {
665
- "attributes": [
666
- "color",
667
- "type",
668
- "size",
669
- "text-size",
670
- "text-color",
671
- "vertical"
672
- ]
673
- },
674
674
  "van-notice-bar": {
675
675
  "attributes": [
676
676
  "mode",
@@ -1029,16 +1029,6 @@
1029
1029
  "safe-area-inset-bottom"
1030
1030
  ]
1031
1031
  },
1032
- "van-swipe-cell": {
1033
- "attributes": [
1034
- "name",
1035
- "left-width",
1036
- "right-width",
1037
- "before-close",
1038
- "disabled",
1039
- "stop-propagation"
1040
- ]
1041
- },
1042
1032
  "van-swipe": {
1043
1033
  "attributes": [
1044
1034
  "autoplay",
@@ -1058,6 +1048,16 @@
1058
1048
  "van-swipe-item": {
1059
1049
  "attributes": []
1060
1050
  },
1051
+ "van-swipe-cell": {
1052
+ "attributes": [
1053
+ "name",
1054
+ "left-width",
1055
+ "right-width",
1056
+ "before-close",
1057
+ "disabled",
1058
+ "stop-propagation"
1059
+ ]
1060
+ },
1061
1061
  "van-switch": {
1062
1062
  "attributes": [
1063
1063
  "v-model",