vant 3.5.0-beta.1 → 3.5.2

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 (69) hide show
  1. package/LICENSE +10 -0
  2. package/es/action-bar/ActionBar.d.ts +4 -0
  3. package/es/action-bar/ActionBar.mjs +13 -2
  4. package/es/action-bar/index.d.ts +3 -0
  5. package/es/calendar/Calendar.mjs +3 -0
  6. package/es/dialog/Dialog.d.ts +8 -0
  7. package/es/dialog/Dialog.mjs +6 -0
  8. package/es/dialog/function-call.d.ts +10 -0
  9. package/es/dialog/function-call.mjs +2 -0
  10. package/es/dialog/types.d.ts +3 -1
  11. package/es/field/Field.d.ts +3 -1
  12. package/es/field/Field.mjs +7 -1
  13. package/es/field/index.d.ts +3 -1
  14. package/es/index.d.ts +1 -1
  15. package/es/index.mjs +1 -1
  16. package/es/picker/Picker.mjs +1 -1
  17. package/es/picker/PickerColumn.mjs +2 -0
  18. package/es/popup/Popup.mjs +1 -1
  19. package/es/pull-refresh/PullRefresh.d.ts +2 -1
  20. package/es/pull-refresh/PullRefresh.mjs +5 -1
  21. package/es/pull-refresh/index.d.ts +2 -1
  22. package/es/submit-bar/SubmitBar.d.ts +4 -0
  23. package/es/submit-bar/SubmitBar.mjs +13 -2
  24. package/es/submit-bar/index.d.ts +3 -0
  25. package/es/switch/Switch.mjs +2 -1
  26. package/es/toast/function-call.d.ts +5 -6
  27. package/es/toast/types.d.ts +10 -1
  28. package/es/uploader/Uploader.d.ts +3 -3
  29. package/es/uploader/index.d.ts +2 -2
  30. package/lib/action-bar/ActionBar.d.ts +4 -0
  31. package/lib/action-bar/ActionBar.js +12 -1
  32. package/lib/action-bar/index.d.ts +3 -0
  33. package/lib/calendar/Calendar.js +3 -0
  34. package/lib/dialog/Dialog.d.ts +8 -0
  35. package/lib/dialog/Dialog.js +6 -0
  36. package/lib/dialog/function-call.d.ts +10 -0
  37. package/lib/dialog/function-call.js +2 -0
  38. package/lib/dialog/types.d.ts +3 -1
  39. package/lib/field/Field.d.ts +3 -1
  40. package/lib/field/Field.js +7 -1
  41. package/lib/field/index.d.ts +3 -1
  42. package/lib/index.d.ts +1 -1
  43. package/lib/index.js +1 -1
  44. package/lib/picker/Picker.js +1 -1
  45. package/lib/picker/PickerColumn.js +2 -0
  46. package/lib/popup/Popup.js +1 -1
  47. package/lib/pull-refresh/PullRefresh.d.ts +2 -1
  48. package/lib/pull-refresh/PullRefresh.js +5 -1
  49. package/lib/pull-refresh/index.d.ts +2 -1
  50. package/lib/submit-bar/SubmitBar.d.ts +4 -0
  51. package/lib/submit-bar/SubmitBar.js +12 -1
  52. package/lib/submit-bar/index.d.ts +3 -0
  53. package/lib/switch/Switch.js +2 -1
  54. package/lib/toast/function-call.d.ts +5 -6
  55. package/lib/toast/types.d.ts +10 -1
  56. package/lib/uploader/Uploader.d.ts +3 -3
  57. package/lib/uploader/index.d.ts +2 -2
  58. package/lib/vant.cjs.js +72 -28
  59. package/lib/vant.es.js +73 -29
  60. package/lib/vant.js +73 -29
  61. package/lib/vant.min.js +1 -1
  62. package/package.json +3 -3
  63. package/vetur/attributes.json +212 -196
  64. package/vetur/tags.json +72 -68
  65. package/vetur/web-types.json +1061 -994
  66. package/lib/ssr.js +0 -7
  67. package/lib/ssr.mjs +0 -1
  68. package/lib/vant.cjs.min.js +0 -1
  69. package/lib/vant.es.min.js +0 -14649
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vant",
3
- "version": "3.5.0-beta.1",
3
+ "version": "3.5.2",
4
4
  "description": "Mobile UI Components built on Vue",
5
5
  "main": "lib/vant.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -46,8 +46,8 @@
46
46
  ],
47
47
  "dependencies": {
48
48
  "@vant/icons": "^1.8.0",
49
- "@vant/popperjs": "^1.2.0",
50
- "@vant/use": "^1.4.0"
49
+ "@vant/popperjs": "^1.2.1",
50
+ "@vant/use": "^1.4.1"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "vue": "^3.0.0"
@@ -3,6 +3,10 @@
3
3
  "type": "boolean",
4
4
  "description": "Whether to enable bottom safe area adaptation, Default: `true`"
5
5
  },
6
+ "van-action-bar/placeholder": {
7
+ "type": "boolean",
8
+ "description": "Whether to generate a placeholder element, Default: `false`"
9
+ },
6
10
  "van-action-bar-icon/text": {
7
11
  "type": "string",
8
12
  "description": "Button text, Default: -"
@@ -83,6 +87,86 @@
83
87
  "type": "boolean",
84
88
  "description": "If true, the navigation will not leave a history record, Default: `false`"
85
89
  },
90
+ "van-action-sheet/v-model:show": {
91
+ "type": "boolean",
92
+ "description": "Whether to show ActionSheet, Default: `false`"
93
+ },
94
+ "van-action-sheet/actions": {
95
+ "type": "ActionSheetAction[]",
96
+ "description": "Options, Default: `[]`"
97
+ },
98
+ "van-action-sheet/title": {
99
+ "type": "string",
100
+ "description": "Title, Default: -"
101
+ },
102
+ "van-action-sheet/cancel-text": {
103
+ "type": "string",
104
+ "description": "Text of cancel button, Default: -"
105
+ },
106
+ "van-action-sheet/description": {
107
+ "type": "string",
108
+ "description": "Description above the options, Default: -"
109
+ },
110
+ "van-action-sheet/closeable": {
111
+ "type": "boolean",
112
+ "description": "Whether to show close icon, Default: `true`"
113
+ },
114
+ "van-action-sheet/close-icon": {
115
+ "type": "string",
116
+ "description": "Close icon name, Default: `cross`"
117
+ },
118
+ "van-action-sheet/duration": {
119
+ "type": "number | string",
120
+ "description": "Transition duration, unit second, Default: `0.3`"
121
+ },
122
+ "van-action-sheet/round": {
123
+ "type": "boolean",
124
+ "description": "Whether to show round corner, Default: `true`"
125
+ },
126
+ "van-action-sheet/overlay": {
127
+ "type": "boolean",
128
+ "description": "Whether to show overlay, Default: `true`"
129
+ },
130
+ "van-action-sheet/overlay-class": {
131
+ "type": "string | Array | object",
132
+ "description": "Custom overlay class, Default: -"
133
+ },
134
+ "van-action-sheet/overlay-style": {
135
+ "type": "object",
136
+ "description": "Custom overlay style, Default: -"
137
+ },
138
+ "van-action-sheet/lock-scroll": {
139
+ "type": "boolean",
140
+ "description": "Whether to lock background scroll, Default: `true`"
141
+ },
142
+ "van-action-sheet/lazy-render": {
143
+ "type": "boolean",
144
+ "description": "Whether to lazy render util appeared, Default: `true`"
145
+ },
146
+ "van-action-sheet/close-on-popstate": {
147
+ "type": "boolean",
148
+ "description": "Whether to close when popstate, Default: `true`"
149
+ },
150
+ "van-action-sheet/close-on-click-action": {
151
+ "type": "boolean",
152
+ "description": "Whether to close when an action is clicked, Default: `false`"
153
+ },
154
+ "van-action-sheet/close-on-click-overlay": {
155
+ "type": "boolean",
156
+ "description": "Whether to close when overlay is clicked, Default: `true`"
157
+ },
158
+ "van-action-sheet/safe-area-inset-bottom": {
159
+ "type": "boolean",
160
+ "description": "Whether to enable bottom safe area adaptation, Default: `true`"
161
+ },
162
+ "van-action-sheet/teleport": {
163
+ "type": "string | Element",
164
+ "description": "Specifies a target element where ActionSheet will be mounted, Default: -"
165
+ },
166
+ "van-action-sheet/before-close": {
167
+ "type": "(action: string) => boolean | Promise\\<boolean\\>",
168
+ "description": "Callback function before close, Default: -"
169
+ },
86
170
  "van-address-edit/area-list": {
87
171
  "type": "object",
88
172
  "description": "Area List, Default: -"
@@ -363,86 +447,6 @@
363
447
  "type": "boolean",
364
448
  "description": "If true, the navigation will not leave a history record, Default: `false`"
365
449
  },
366
- "van-action-sheet/v-model:show": {
367
- "type": "boolean",
368
- "description": "Whether to show ActionSheet, Default: `false`"
369
- },
370
- "van-action-sheet/actions": {
371
- "type": "ActionSheetAction[]",
372
- "description": "Options, Default: `[]`"
373
- },
374
- "van-action-sheet/title": {
375
- "type": "string",
376
- "description": "Title, Default: -"
377
- },
378
- "van-action-sheet/cancel-text": {
379
- "type": "string",
380
- "description": "Text of cancel button, Default: -"
381
- },
382
- "van-action-sheet/description": {
383
- "type": "string",
384
- "description": "Description above the options, Default: -"
385
- },
386
- "van-action-sheet/closeable": {
387
- "type": "boolean",
388
- "description": "Whether to show close icon, Default: `true`"
389
- },
390
- "van-action-sheet/close-icon": {
391
- "type": "string",
392
- "description": "Close icon name, Default: `cross`"
393
- },
394
- "van-action-sheet/duration": {
395
- "type": "number | string",
396
- "description": "Transition duration, unit second, Default: `0.3`"
397
- },
398
- "van-action-sheet/round": {
399
- "type": "boolean",
400
- "description": "Whether to show round corner, Default: `true`"
401
- },
402
- "van-action-sheet/overlay": {
403
- "type": "boolean",
404
- "description": "Whether to show overlay, Default: `true`"
405
- },
406
- "van-action-sheet/overlay-class": {
407
- "type": "string | Array | object",
408
- "description": "Custom overlay class, Default: -"
409
- },
410
- "van-action-sheet/overlay-style": {
411
- "type": "object",
412
- "description": "Custom overlay style, Default: -"
413
- },
414
- "van-action-sheet/lock-scroll": {
415
- "type": "boolean",
416
- "description": "Whether to lock background scroll, Default: `true`"
417
- },
418
- "van-action-sheet/lazy-render": {
419
- "type": "boolean",
420
- "description": "Whether to lazy render util appeared, Default: `true`"
421
- },
422
- "van-action-sheet/close-on-popstate": {
423
- "type": "boolean",
424
- "description": "Whether to close when popstate, Default: `true`"
425
- },
426
- "van-action-sheet/close-on-click-action": {
427
- "type": "boolean",
428
- "description": "Whether to close when an action is clicked, Default: `false`"
429
- },
430
- "van-action-sheet/close-on-click-overlay": {
431
- "type": "boolean",
432
- "description": "Whether to close when overlay is clicked, Default: `true`"
433
- },
434
- "van-action-sheet/safe-area-inset-bottom": {
435
- "type": "boolean",
436
- "description": "Whether to enable bottom safe area adaptation, Default: `true`"
437
- },
438
- "van-action-sheet/teleport": {
439
- "type": "string | Element",
440
- "description": "Specifies a target element where ActionSheet will be mounted, Default: -"
441
- },
442
- "van-action-sheet/before-close": {
443
- "type": "(action: string) => boolean | Promise\\<boolean\\>",
444
- "description": "Callback function before close, Default: -"
445
- },
446
450
  "van-calendar/type": {
447
451
  "type": "string",
448
452
  "description": "Type, can be set to `range` `multiple`, Default: `single`"
@@ -1003,22 +1007,6 @@
1003
1007
  "type": "string",
1004
1008
  "description": "default contact switch label, Default: -"
1005
1009
  },
1006
- "van-contact-list/v-model": {
1007
- "type": "number | string",
1008
- "description": "Id of chosen contact, Default: -"
1009
- },
1010
- "van-contact-list/list": {
1011
- "type": "Contact[]",
1012
- "description": "Contact list, Default: `[]`"
1013
- },
1014
- "van-contact-list/add-text": {
1015
- "type": "string",
1016
- "description": "Add button text, Default: `Add new contact`"
1017
- },
1018
- "van-contact-list/default-tag-text": {
1019
- "type": "string",
1020
- "description": "Default tag text, Default: -"
1021
- },
1022
1010
  "van-count-down/time": {
1023
1011
  "type": "number | string",
1024
1012
  "description": "Total time, unit milliseconds, Default: `0`"
@@ -1035,6 +1023,22 @@
1035
1023
  "type": "boolean",
1036
1024
  "description": "Whether to enable millisecond render, Default: `false`"
1037
1025
  },
1026
+ "van-contact-list/v-model": {
1027
+ "type": "number | string",
1028
+ "description": "Id of chosen contact, Default: -"
1029
+ },
1030
+ "van-contact-list/list": {
1031
+ "type": "Contact[]",
1032
+ "description": "Contact list, Default: `[]`"
1033
+ },
1034
+ "van-contact-list/add-text": {
1035
+ "type": "string",
1036
+ "description": "Add button text, Default: `Add new contact`"
1037
+ },
1038
+ "van-contact-list/default-tag-text": {
1039
+ "type": "string",
1040
+ "description": "Default tag text, Default: -"
1041
+ },
1038
1042
  "van-coupon-cell/title": {
1039
1043
  "type": "string",
1040
1044
  "description": "Cell title, Default: `Coupon`"
@@ -1239,6 +1243,10 @@
1239
1243
  "type": "string",
1240
1244
  "description": "Cancel button color, Default: `black`"
1241
1245
  },
1246
+ "van-dialog/cancel-button-disabled": {
1247
+ "type": "boolean",
1248
+ "description": "Whether to disable cancel button, Default: `false`"
1249
+ },
1242
1250
  "van-dialog/confirm-button-text": {
1243
1251
  "type": "string",
1244
1252
  "description": "Confirm button text, Default: `Confirm`"
@@ -1247,6 +1255,10 @@
1247
1255
  "type": "string",
1248
1256
  "description": "Confirm button color, Default: `#ee0a24`"
1249
1257
  },
1258
+ "van-dialog/confirm-button-disabled": {
1259
+ "type": "boolean",
1260
+ "description": "Whether to disable confirm button, Default: `false`"
1261
+ },
1250
1262
  "van-dialog/overlay": {
1251
1263
  "type": "boolean",
1252
1264
  "description": "Whether to show overlay, Default: `true`"
@@ -1979,70 +1991,6 @@
1979
1991
  "type": "boolean",
1980
1992
  "description": "Whether to enable text wrap, Default: `false`"
1981
1993
  },
1982
- "van-overlay/show": {
1983
- "type": "boolean",
1984
- "description": "Whether to show overlay, Default: `false`"
1985
- },
1986
- "van-overlay/z-index": {
1987
- "type": "number | string",
1988
- "description": "z-index, Default: `1`"
1989
- },
1990
- "van-overlay/duration": {
1991
- "type": "number | string",
1992
- "description": "Animation duration, Default: `0.3`"
1993
- },
1994
- "van-overlay/class-name": {
1995
- "type": "string",
1996
- "description": "ClassName, Default: -"
1997
- },
1998
- "van-overlay/custom-class": {
1999
- "type": "object",
2000
- "description": "Custom style, Default: -"
2001
- },
2002
- "van-overlay/lock-scroll": {
2003
- "type": "boolean",
2004
- "description": "Whether to lock background scroll, Default: `true`"
2005
- },
2006
- "van-overlay/lazy-render": {
2007
- "type": "boolean",
2008
- "description": "Whether to lazy render util appeared, Default: `true`"
2009
- },
2010
- "van-pagination/v-model": {
2011
- "type": "number",
2012
- "description": "Current page number, Default: -"
2013
- },
2014
- "van-pagination/mode": {
2015
- "type": "string",
2016
- "description": "Mode, can be set to `simple` `multi`, Default: `multi`"
2017
- },
2018
- "van-pagination/prev-text": {
2019
- "type": "string",
2020
- "description": "Previous text, Default: `Previous`"
2021
- },
2022
- "van-pagination/next-text": {
2023
- "type": "string",
2024
- "description": "Next text, Default: `Next`"
2025
- },
2026
- "van-pagination/total-items": {
2027
- "type": "number | string",
2028
- "description": "Total items, Default: `0`"
2029
- },
2030
- "van-pagination/items-per-page": {
2031
- "type": "number | string",
2032
- "description": "Item number per page, Default: `10`"
2033
- },
2034
- "van-pagination/page-count": {
2035
- "type": "number | string",
2036
- "description": "The total number of pages, if not set, will be calculated based on `total-items` and `items-per-page`, Default: `-`"
2037
- },
2038
- "van-pagination/show-page-size": {
2039
- "type": "number | string",
2040
- "description": "Count of page size to show, Default: `5`"
2041
- },
2042
- "van-pagination/force-ellipses": {
2043
- "type": "boolean",
2044
- "description": "Whether to show ellipses, Default: `false`"
2045
- },
2046
1994
  "van-number-keyboard/v-model": {
2047
1995
  "type": "string",
2048
1996
  "description": "Current value, Default: -"
@@ -2111,6 +2059,70 @@
2111
2059
  "type": "boolean",
2112
2060
  "description": "Whether to shuffle the order of keys, Default: `false`"
2113
2061
  },
2062
+ "van-overlay/show": {
2063
+ "type": "boolean",
2064
+ "description": "Whether to show overlay, Default: `false`"
2065
+ },
2066
+ "van-overlay/z-index": {
2067
+ "type": "number | string",
2068
+ "description": "z-index, Default: `1`"
2069
+ },
2070
+ "van-overlay/duration": {
2071
+ "type": "number | string",
2072
+ "description": "Animation duration, Default: `0.3`"
2073
+ },
2074
+ "van-overlay/class-name": {
2075
+ "type": "string",
2076
+ "description": "ClassName, Default: -"
2077
+ },
2078
+ "van-overlay/custom-class": {
2079
+ "type": "object",
2080
+ "description": "Custom style, Default: -"
2081
+ },
2082
+ "van-overlay/lock-scroll": {
2083
+ "type": "boolean",
2084
+ "description": "Whether to lock background scroll, Default: `true`"
2085
+ },
2086
+ "van-overlay/lazy-render": {
2087
+ "type": "boolean",
2088
+ "description": "Whether to lazy render util appeared, Default: `true`"
2089
+ },
2090
+ "van-pagination/v-model": {
2091
+ "type": "number",
2092
+ "description": "Current page number, Default: -"
2093
+ },
2094
+ "van-pagination/mode": {
2095
+ "type": "string",
2096
+ "description": "Mode, can be set to `simple` `multi`, Default: `multi`"
2097
+ },
2098
+ "van-pagination/prev-text": {
2099
+ "type": "string",
2100
+ "description": "Previous text, Default: `Previous`"
2101
+ },
2102
+ "van-pagination/next-text": {
2103
+ "type": "string",
2104
+ "description": "Next text, Default: `Next`"
2105
+ },
2106
+ "van-pagination/total-items": {
2107
+ "type": "number | string",
2108
+ "description": "Total items, Default: `0`"
2109
+ },
2110
+ "van-pagination/items-per-page": {
2111
+ "type": "number | string",
2112
+ "description": "Item number per page, Default: `10`"
2113
+ },
2114
+ "van-pagination/page-count": {
2115
+ "type": "number | string",
2116
+ "description": "The total number of pages, if not set, will be calculated based on `total-items` and `items-per-page`, Default: `-`"
2117
+ },
2118
+ "van-pagination/show-page-size": {
2119
+ "type": "number | string",
2120
+ "description": "Count of page size to show, Default: `5`"
2121
+ },
2122
+ "van-pagination/force-ellipses": {
2123
+ "type": "boolean",
2124
+ "description": "Whether to show ellipses, Default: `false`"
2125
+ },
2114
2126
  "van-password-input/value": {
2115
2127
  "type": "string",
2116
2128
  "description": "Password value, Default: `''`"
@@ -2339,6 +2351,42 @@
2339
2351
  "type": "boolean",
2340
2352
  "description": "Whether to enable bottom safe area adaptation, Default: `false`"
2341
2353
  },
2354
+ "van-progress/percentage": {
2355
+ "type": "number | string",
2356
+ "description": "Percentage, Default: `0`"
2357
+ },
2358
+ "van-progress/stroke-width": {
2359
+ "type": "number | string",
2360
+ "description": "Stroke width, Default: `4px`"
2361
+ },
2362
+ "van-progress/color": {
2363
+ "type": "string",
2364
+ "description": "Color, Default: `#1989fa`"
2365
+ },
2366
+ "van-progress/track-color": {
2367
+ "type": "string",
2368
+ "description": "Track color, Default: `#e5e5e5`"
2369
+ },
2370
+ "van-progress/pivot-text": {
2371
+ "type": "string",
2372
+ "description": "Pivot text, Default: percentage"
2373
+ },
2374
+ "van-progress/pivot-color": {
2375
+ "type": "string",
2376
+ "description": "Pivot text background color, Default: inherit progress color"
2377
+ },
2378
+ "van-progress/text-color": {
2379
+ "type": "string",
2380
+ "description": "Pivot text color, Default: `white`"
2381
+ },
2382
+ "van-progress/inactive": {
2383
+ "type": "boolean",
2384
+ "description": "Whether to be gray, Default: `false`"
2385
+ },
2386
+ "van-progress/show-pivot": {
2387
+ "type": "boolean",
2388
+ "description": "Whether to show text, Default: `true`"
2389
+ },
2342
2390
  "van-pull-refresh/v-model": {
2343
2391
  "type": "boolean",
2344
2392
  "description": "Loading status, Default: -"
@@ -2379,42 +2427,6 @@
2379
2427
  "type": "boolean",
2380
2428
  "description": "Whether to disable pull refresh, Default: `false`"
2381
2429
  },
2382
- "van-progress/percentage": {
2383
- "type": "number | string",
2384
- "description": "Percentage, Default: `0`"
2385
- },
2386
- "van-progress/stroke-width": {
2387
- "type": "number | string",
2388
- "description": "Stroke width, Default: `4px`"
2389
- },
2390
- "van-progress/color": {
2391
- "type": "string",
2392
- "description": "Color, Default: `#1989fa`"
2393
- },
2394
- "van-progress/track-color": {
2395
- "type": "string",
2396
- "description": "Track color, Default: `#e5e5e5`"
2397
- },
2398
- "van-progress/pivot-text": {
2399
- "type": "string",
2400
- "description": "Pivot text, Default: percentage"
2401
- },
2402
- "van-progress/pivot-color": {
2403
- "type": "string",
2404
- "description": "Pivot text background color, Default: inherit progress color"
2405
- },
2406
- "van-progress/text-color": {
2407
- "type": "string",
2408
- "description": "Pivot text color, Default: `white`"
2409
- },
2410
- "van-progress/inactive": {
2411
- "type": "boolean",
2412
- "description": "Whether to be gray, Default: `false`"
2413
- },
2414
- "van-progress/show-pivot": {
2415
- "type": "boolean",
2416
- "description": "Whether to show text, Default: `true`"
2417
- },
2418
2430
  "van-radio/name": {
2419
2431
  "type": "any",
2420
2432
  "description": "Radio name, Default: -"
@@ -3007,6 +3019,10 @@
3007
3019
  "type": "boolean",
3008
3020
  "description": "Whether to enable bottom safe area adaptation, Default: `true`"
3009
3021
  },
3022
+ "van-submit-bar/placeholder": {
3023
+ "type": "boolean",
3024
+ "description": "Whether to generate a placeholder element, Default: `false`"
3025
+ },
3010
3026
  "van-swipe/autoplay": {
3011
3027
  "type": "number | string",
3012
3028
  "description": "Autoplay interval (ms), Default: -"