vant 3.3.3 → 3.3.7

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 (53) hide show
  1. package/es/badge/Badge.d.ts +12 -0
  2. package/es/badge/Badge.js +4 -3
  3. package/es/badge/index.css +1 -1
  4. package/es/badge/index.d.ts +8 -1
  5. package/es/badge/index.less +22 -1
  6. package/es/calendar/Calendar.d.ts +2 -2
  7. package/es/calendar/index.d.ts +2 -2
  8. package/es/datetime-picker/DatePicker.js +2 -2
  9. package/es/datetime-picker/TimePicker.js +2 -2
  10. package/es/datetime-picker/utils.d.ts +2 -0
  11. package/es/datetime-picker/utils.js +17 -1
  12. package/es/field/Field.js +5 -5
  13. package/es/field/utils.d.ts +2 -0
  14. package/es/field/utils.js +9 -0
  15. package/es/index.d.ts +1 -1
  16. package/es/index.js +1 -1
  17. package/es/pagination/Pagination.js +3 -3
  18. package/es/popup/Popup.d.ts +2 -2
  19. package/es/popup/index.d.ts +2 -2
  20. package/es/toast/Toast.d.ts +2 -2
  21. package/lib/badge/Badge.d.ts +12 -0
  22. package/lib/badge/Badge.js +4 -3
  23. package/lib/badge/index.css +1 -1
  24. package/lib/badge/index.d.ts +8 -1
  25. package/lib/badge/index.less +22 -1
  26. package/lib/calendar/Calendar.d.ts +2 -2
  27. package/lib/calendar/index.d.ts +2 -2
  28. package/lib/datetime-picker/DatePicker.js +1 -1
  29. package/lib/datetime-picker/TimePicker.js +1 -1
  30. package/lib/datetime-picker/utils.d.ts +2 -0
  31. package/lib/datetime-picker/utils.js +22 -3
  32. package/lib/field/Field.js +4 -4
  33. package/lib/field/utils.d.ts +2 -0
  34. package/lib/field/utils.js +13 -0
  35. package/lib/index.css +1 -1
  36. package/lib/index.d.ts +1 -1
  37. package/lib/index.js +1 -1
  38. package/lib/pagination/Pagination.js +3 -3
  39. package/lib/popup/Popup.d.ts +2 -2
  40. package/lib/popup/index.d.ts +2 -2
  41. package/lib/ssr.js +7 -0
  42. package/lib/ssr.mjs +1 -0
  43. package/lib/toast/Toast.d.ts +2 -2
  44. package/lib/vant.cjs.js +34 -13
  45. package/lib/vant.cjs.min.js +1 -1
  46. package/lib/vant.es.js +34 -13
  47. package/lib/vant.es.min.js +34 -13
  48. package/lib/vant.js +202 -55
  49. package/lib/vant.min.js +1 -1
  50. package/package.json +17 -13
  51. package/vetur/attributes.json +89 -85
  52. package/vetur/tags.json +26 -25
  53. package/vetur/web-types.json +217 -207
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "vant",
3
- "version": "3.3.3",
3
+ "version": "3.3.7",
4
4
  "description": "Mobile UI Components built on Vue",
5
5
  "main": "lib/vant.cjs.js",
6
- "module": "lib/vant.es.js",
6
+ "module": "es/index.js",
7
7
  "style": "lib/index.css",
8
8
  "typings": "lib/index.d.ts",
9
9
  "unpkg": "lib/vant.min.js",
@@ -14,12 +14,14 @@
14
14
  "import": "./lib/ssr.mjs",
15
15
  "require": "./lib/ssr.js"
16
16
  },
17
- "import": "./lib/vant.es.js",
17
+ "import": "./es/index.js",
18
18
  "require": "./lib/vant.cjs.js",
19
19
  "types": "./lib/index.d.ts"
20
20
  },
21
- "./es/*": "./es/*",
22
- "./lib/*": "./lib/*",
21
+ "./es": "./es/index.js",
22
+ "./lib": "./lib/vant.cjs.js",
23
+ "./es/": "./es/",
24
+ "./lib/": "./lib/",
23
25
  "./package.json": "./package.json"
24
26
  },
25
27
  "files": [
@@ -27,9 +29,6 @@
27
29
  "lib",
28
30
  "vetur"
29
31
  ],
30
- "publishConfig": {
31
- "registry": "https://registry.npmjs.org/"
32
- },
33
32
  "scripts": {
34
33
  "dev": "vant-cli dev",
35
34
  "lint": "vant-cli lint",
@@ -41,12 +40,19 @@
41
40
  "test:watch": "vant-cli test --watch",
42
41
  "test:coverage": "open test/coverage/index.html"
43
42
  },
44
- "npm": {
45
- "tag": "next"
43
+ "publishConfig": {
44
+ "registry": "https://registry.npmjs.org/"
46
45
  },
47
46
  "repository": {
48
47
  "type": "git",
49
- "url": "git@github.com:youzan/vant.git"
48
+ "url": "https://github.com/youzan/vant.git",
49
+ "directory": "packages/vant"
50
+ },
51
+ "bugs": "https://github.com/youzan/vant/issues",
52
+ "author": "chenjiahan",
53
+ "license": "MIT",
54
+ "npm": {
55
+ "tag": "next"
50
56
  },
51
57
  "keywords": [
52
58
  "ui",
@@ -57,8 +63,6 @@
57
63
  "component",
58
64
  "components"
59
65
  ],
60
- "author": "youzanfe",
61
- "license": "MIT",
62
66
  "dependencies": {
63
67
  "@vant/icons": "^1.7.1",
64
68
  "@vant/popperjs": "^1.1.0",
@@ -82,89 +82,6 @@
82
82
  "type": "boolean",
83
83
  "description": "是否在跳转时替换当前页面历史, 默认值: `false`"
84
84
  },
85
- "van-action-sheet/v-model:show": {
86
- "type": "boolean",
87
- "description": "是否显示动作面板, 默认值: `false`"
88
- },
89
- "van-action-sheet/actions": {
90
- "type": "ActionSheetAction[]",
91
- "description": "面板选项列表, 默认值: `[]`"
92
- },
93
- "van-action-sheet/title": {
94
- "type": "string",
95
- "description": "顶部标题, 默认值: -"
96
- },
97
- "van-action-sheet/cancel-text": {
98
- "type": "string",
99
- "description": "取消按钮文字, 默认值: -"
100
- },
101
- "van-action-sheet/description": {
102
- "type": "string",
103
- "description": "选项上方的描述信息, 默认值: -"
104
- },
105
- "van-action-sheet/closeable": {
106
- "type": "boolean",
107
- "description": "是否显示关闭图标, 默认值: `true`"
108
- },
109
- "van-action-sheet/close-icon": {
110
- "type": "string",
111
- "description": "关闭[图标名称](#/zh-CN/icon)或图片链接, 默认值: `cross`"
112
- },
113
- "van-action-sheet/duration": {
114
- "type": "number | string",
115
- "description": "动画时长,单位秒,设置为 0 可以禁用动画, 默认值: `0.3`"
116
- },
117
- "van-action-sheet/round": {
118
- "type": "boolean",
119
- "description": "是否显示圆角, 默认值: `true`"
120
- },
121
- "van-action-sheet/overlay": {
122
- "type": "boolean",
123
- "description": "是否显示遮罩层, 默认值: `true`"
124
- },
125
- "van-action-sheet/overlay-class": {
126
- "type": "string | Array \\",
127
- "description": "自定义遮罩层类名, 默认值: object_",
128
- "options": [
129
- "-"
130
- ]
131
- },
132
- "van-action-sheet/overlay-style": {
133
- "type": "object",
134
- "description": "自定义遮罩层样式, 默认值: -"
135
- },
136
- "van-action-sheet/lock-scroll": {
137
- "type": "boolean",
138
- "description": "是否锁定背景滚动, 默认值: `true`"
139
- },
140
- "van-action-sheet/lazy-render": {
141
- "type": "boolean",
142
- "description": "是否在显示弹层时才渲染节点, 默认值: `true`"
143
- },
144
- "van-action-sheet/close-on-popstate": {
145
- "type": "boolean",
146
- "description": "是否在页面回退时自动关闭, 默认值: `true`"
147
- },
148
- "van-action-sheet/close-on-click-action": {
149
- "type": "boolean",
150
- "description": "是否在点击选项后关闭, 默认值: `false`"
151
- },
152
- "van-action-sheet/close-on-click-overlay": {
153
- "type": "boolean",
154
- "description": "是否在点击遮罩层后关闭, 默认值: `true`"
155
- },
156
- "van-action-sheet/safe-area-inset-bottom": {
157
- "type": "boolean",
158
- "description": "是否开启[底部安全区适配](#/zh-CN/advanced-usage#di-bu-an-quan-qu-gua-pei), 默认值: `true`"
159
- },
160
- "van-action-sheet/teleport": {
161
- "type": "string | Element",
162
- "description": "指定挂载的节点,等同于 Teleport 组件的 [to 属性](https://v3.cn.vuejs.org/api/built-in-components.html#teleport), 默认值: -"
163
- },
164
- "van-action-sheet/before-close": {
165
- "type": "(action: string) => boolean | Promise\\<boolean\\>",
166
- "description": "关闭前的回调函数,返回 `false` 可阻止关闭,支持返回 Promise, 默认值: -"
167
- },
168
85
  "van-address-edit/area-list": {
169
86
  "type": "object",
170
87
  "description": "地区列表, 默认值: -"
@@ -253,6 +170,89 @@
253
170
  "type": "(key, val) => string",
254
171
  "description": "自定义校验函数, 默认值: -"
255
172
  },
173
+ "van-action-sheet/v-model:show": {
174
+ "type": "boolean",
175
+ "description": "是否显示动作面板, 默认值: `false`"
176
+ },
177
+ "van-action-sheet/actions": {
178
+ "type": "ActionSheetAction[]",
179
+ "description": "面板选项列表, 默认值: `[]`"
180
+ },
181
+ "van-action-sheet/title": {
182
+ "type": "string",
183
+ "description": "顶部标题, 默认值: -"
184
+ },
185
+ "van-action-sheet/cancel-text": {
186
+ "type": "string",
187
+ "description": "取消按钮文字, 默认值: -"
188
+ },
189
+ "van-action-sheet/description": {
190
+ "type": "string",
191
+ "description": "选项上方的描述信息, 默认值: -"
192
+ },
193
+ "van-action-sheet/closeable": {
194
+ "type": "boolean",
195
+ "description": "是否显示关闭图标, 默认值: `true`"
196
+ },
197
+ "van-action-sheet/close-icon": {
198
+ "type": "string",
199
+ "description": "关闭[图标名称](#/zh-CN/icon)或图片链接, 默认值: `cross`"
200
+ },
201
+ "van-action-sheet/duration": {
202
+ "type": "number | string",
203
+ "description": "动画时长,单位秒,设置为 0 可以禁用动画, 默认值: `0.3`"
204
+ },
205
+ "van-action-sheet/round": {
206
+ "type": "boolean",
207
+ "description": "是否显示圆角, 默认值: `true`"
208
+ },
209
+ "van-action-sheet/overlay": {
210
+ "type": "boolean",
211
+ "description": "是否显示遮罩层, 默认值: `true`"
212
+ },
213
+ "van-action-sheet/overlay-class": {
214
+ "type": "string | Array \\",
215
+ "description": "自定义遮罩层类名, 默认值: object_",
216
+ "options": [
217
+ "-"
218
+ ]
219
+ },
220
+ "van-action-sheet/overlay-style": {
221
+ "type": "object",
222
+ "description": "自定义遮罩层样式, 默认值: -"
223
+ },
224
+ "van-action-sheet/lock-scroll": {
225
+ "type": "boolean",
226
+ "description": "是否锁定背景滚动, 默认值: `true`"
227
+ },
228
+ "van-action-sheet/lazy-render": {
229
+ "type": "boolean",
230
+ "description": "是否在显示弹层时才渲染节点, 默认值: `true`"
231
+ },
232
+ "van-action-sheet/close-on-popstate": {
233
+ "type": "boolean",
234
+ "description": "是否在页面回退时自动关闭, 默认值: `true`"
235
+ },
236
+ "van-action-sheet/close-on-click-action": {
237
+ "type": "boolean",
238
+ "description": "是否在点击选项后关闭, 默认值: `false`"
239
+ },
240
+ "van-action-sheet/close-on-click-overlay": {
241
+ "type": "boolean",
242
+ "description": "是否在点击遮罩层后关闭, 默认值: `true`"
243
+ },
244
+ "van-action-sheet/safe-area-inset-bottom": {
245
+ "type": "boolean",
246
+ "description": "是否开启[底部安全区适配](#/zh-CN/advanced-usage#di-bu-an-quan-qu-gua-pei), 默认值: `true`"
247
+ },
248
+ "van-action-sheet/teleport": {
249
+ "type": "string | Element",
250
+ "description": "指定挂载的节点,等同于 Teleport 组件的 [to 属性](https://v3.cn.vuejs.org/api/built-in-components.html#teleport), 默认值: -"
251
+ },
252
+ "van-action-sheet/before-close": {
253
+ "type": "(action: string) => boolean | Promise\\<boolean\\>",
254
+ "description": "关闭前的回调函数,返回 `false` 可阻止关闭,支持返回 Promise, 默认值: -"
255
+ },
256
256
  "van-address-list/v-model": {
257
257
  "type": "string",
258
258
  "description": "当前选中地址的 id, 默认值: -"
@@ -360,6 +360,10 @@
360
360
  "type": "boolean",
361
361
  "description": "当 content 为数字 0 时,是否展示徽标, 默认值: `true`"
362
362
  },
363
+ "van-badge/position": {
364
+ "type": "string",
365
+ "description": "徽标位置,可选值为 `top-left` `bottom-left` `bottom-right`, 默认值: `top-right`"
366
+ },
363
367
  "van-button/type": {
364
368
  "type": "string",
365
369
  "description": "类型,可选值为 `primary` `success` `warning` `danger`, 默认值: `default`"
@@ -620,7 +624,7 @@
620
624
  "description": "选中项的值, 默认值: -"
621
625
  },
622
626
  "van-cascader/options": {
623
- "type": "Option[]",
627
+ "type": "CascaderOption[]",
624
628
  "description": "可选项数据源, 默认值: `[]`"
625
629
  },
626
630
  "van-cascader/placeholder": {
@@ -1546,7 +1550,7 @@
1546
1550
  },
1547
1551
  "van-form/label-align": {
1548
1552
  "type": "string",
1549
- "description": "\b 表单项 label 对齐方式,可选值为 `center` `right`, 默认值: `left`"
1553
+ "description": "表单项 label 对齐方式,可选值为 `center` `right`, 默认值: `left`"
1550
1554
  },
1551
1555
  "van-form/input-align": {
1552
1556
  "type": "string",
package/vetur/tags.json CHANGED
@@ -31,30 +31,6 @@
31
31
  "replace"
32
32
  ]
33
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
34
  "van-address-edit": {
59
35
  "attributes": [
60
36
  "area-list",
@@ -81,6 +57,30 @@
81
57
  "validator"
82
58
  ]
83
59
  },
60
+ "van-action-sheet": {
61
+ "attributes": [
62
+ "v-model:show",
63
+ "actions",
64
+ "title",
65
+ "cancel-text",
66
+ "description",
67
+ "closeable",
68
+ "close-icon",
69
+ "duration",
70
+ "round",
71
+ "overlay",
72
+ "overlay-class",
73
+ "overlay-style",
74
+ "lock-scroll",
75
+ "lazy-render",
76
+ "close-on-popstate",
77
+ "close-on-click-action",
78
+ "close-on-click-overlay",
79
+ "safe-area-inset-bottom",
80
+ "teleport",
81
+ "before-close"
82
+ ]
83
+ },
84
84
  "van-address-list": {
85
85
  "attributes": [
86
86
  "v-model",
@@ -116,7 +116,8 @@
116
116
  "dot",
117
117
  "max",
118
118
  "offset",
119
- "show-zero"
119
+ "show-zero",
120
+ "position"
120
121
  ]
121
122
  },
122
123
  "van-button": {