vant 2.12.32 → 2.12.35

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.
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "vant",
5
- "version": "2.12.32",
5
+ "version": "2.12.35",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "tags": [
@@ -205,150 +205,247 @@
205
205
  ]
206
206
  },
207
207
  {
208
- "name": "van-area",
208
+ "name": "van-address-edit",
209
209
  "slots": [
210
210
  {
211
- "name": "title",
212
- "description": "自定义标题内容"
211
+ "name": "default",
212
+ "description": "在邮政编码下方插入内容"
213
+ }
214
+ ],
215
+ "events": [
216
+ {
217
+ "name": "save",
218
+ "description": "点击保存按钮时触发"
213
219
  },
214
220
  {
215
- "name": "columns-top",
216
- "description": "自定义选项上方内容"
221
+ "name": "focus",
222
+ "description": "输入框聚焦时触发"
217
223
  },
218
224
  {
219
- "name": "columns-bottom",
220
- "description": "自定义选项下方内容"
221
- }
222
- ],
223
- "events": [
225
+ "name": "delete",
226
+ "description": "确认删除地址时触发"
227
+ },
224
228
  {
225
- "name": "confirm",
226
- "description": "点击右上方完成按钮"
229
+ "name": "cancel-delete",
230
+ "description": "取消删除地址时触发"
227
231
  },
228
232
  {
229
- "name": "cancel",
230
- "description": "点击取消按钮时"
233
+ "name": "select-search",
234
+ "description": "选中搜索结果时触发"
231
235
  },
232
236
  {
233
- "name": "change",
234
- "description": "选项改变时触发"
237
+ "name": "click-area",
238
+ "description": "点击收件地区时触发"
239
+ },
240
+ {
241
+ "name": "change-area",
242
+ "description": "修改收件地区时触发"
243
+ },
244
+ {
245
+ "name": "change-detail",
246
+ "description": "修改详细地址时触发"
247
+ },
248
+ {
249
+ "name": "change-default",
250
+ "description": "切换是否使用默认地址时触发"
235
251
  }
236
252
  ],
237
253
  "attributes": [
238
254
  {
239
- "name": "value",
255
+ "name": "area-list",
240
256
  "default": "-",
241
- "description": "当前选中的省市区`code`",
257
+ "description": "地区列表",
242
258
  "value": {
243
- "type": "string",
259
+ "type": "object",
244
260
  "kind": "expression"
245
261
  }
246
262
  },
247
263
  {
248
- "name": "title",
249
- "default": "-",
250
- "description": "顶部栏标题",
264
+ "name": "area-columns-placeholder",
265
+ "default": "`[]`",
266
+ "description": "地区选择列占位提示文字",
251
267
  "value": {
252
- "type": "string",
268
+ "type": "string[]",
253
269
  "kind": "expression"
254
270
  }
255
271
  },
256
272
  {
257
- "name": "confirm-button-text",
258
- "default": "`确认`",
259
- "description": "确认按钮文字",
273
+ "name": "area-placeholder",
274
+ "default": "`选择省 / 市 / 区`",
275
+ "description": "地区输入框占位提示文字",
260
276
  "value": {
261
277
  "type": "string",
262
278
  "kind": "expression"
263
279
  }
264
280
  },
265
281
  {
266
- "name": "cancel-button-text",
267
- "default": "`取消`",
268
- "description": "取消按钮文字",
282
+ "name": "address-info",
283
+ "default": "`{}`",
284
+ "description": "收货人信息初始值",
269
285
  "value": {
270
- "type": "string",
286
+ "type": "AddressInfo",
271
287
  "kind": "expression"
272
288
  }
273
289
  },
274
290
  {
275
- "name": "area-list",
276
- "default": "-",
277
- "description": "省市区数据,格式见下方",
291
+ "name": "search-result",
292
+ "default": "`[]`",
293
+ "description": "详细地址搜索结果",
278
294
  "value": {
279
- "type": "object",
295
+ "type": "SearchResult[]",
280
296
  "kind": "expression"
281
297
  }
282
298
  },
283
299
  {
284
- "name": "columns-placeholder",
285
- "default": "`[]`",
286
- "description": "列占位提示文字",
300
+ "name": "show-postal",
301
+ "default": "`false`",
302
+ "description": "是否显示邮政编码",
287
303
  "value": {
288
- "type": "string[]",
304
+ "type": "boolean",
289
305
  "kind": "expression"
290
306
  }
291
307
  },
292
308
  {
293
- "name": "loading",
309
+ "name": "show-delete",
294
310
  "default": "`false`",
295
- "description": "是否显示加载状态",
311
+ "description": "是否显示删除按钮",
296
312
  "value": {
297
313
  "type": "boolean",
298
314
  "kind": "expression"
299
315
  }
300
316
  },
301
317
  {
302
- "name": "readonly",
318
+ "name": "show-set-default",
303
319
  "default": "`false`",
304
- "description": "是否为只读状态,只读状态下无法切换选项",
320
+ "description": "是否显示默认地址栏",
305
321
  "value": {
306
322
  "type": "boolean",
307
323
  "kind": "expression"
308
324
  }
309
325
  },
310
326
  {
311
- "name": "item-height",
312
- "default": "`44`",
313
- "description": "选项高度,支持 `px` `vw` `vh` `rem` 单位,默认 `px`",
327
+ "name": "show-search-result",
328
+ "default": "`false`",
329
+ "description": "是否显示搜索结果",
314
330
  "value": {
315
- "type": "number | string",
331
+ "type": "boolean",
316
332
  "kind": "expression"
317
333
  }
318
334
  },
319
335
  {
320
- "name": "columns-num",
321
- "default": "`3`",
322
- "description": "显示列数,3-省市区,2-省市,1-省",
336
+ "name": "show-area",
337
+ "default": "`true`",
338
+ "description": "是否显示地区",
339
+ "value": {
340
+ "type": "boolean",
341
+ "kind": "expression"
342
+ }
343
+ },
344
+ {
345
+ "name": "show-detail",
346
+ "default": "`true`",
347
+ "description": "是否显示详细地址",
348
+ "value": {
349
+ "type": "boolean",
350
+ "kind": "expression"
351
+ }
352
+ },
353
+ {
354
+ "name": "disable-area",
355
+ "default": "`false`",
356
+ "description": "是否禁用地区选择",
357
+ "value": {
358
+ "type": "boolean",
359
+ "kind": "expression"
360
+ }
361
+ },
362
+ {
363
+ "name": "save-button-text",
364
+ "default": "`保存`",
365
+ "description": "保存按钮文字",
366
+ "value": {
367
+ "type": "string",
368
+ "kind": "expression"
369
+ }
370
+ },
371
+ {
372
+ "name": "delete-button-text",
373
+ "default": "`删除`",
374
+ "description": "删除按钮文字",
375
+ "value": {
376
+ "type": "string",
377
+ "kind": "expression"
378
+ }
379
+ },
380
+ {
381
+ "name": "detail-rows",
382
+ "default": "`1`",
383
+ "description": "详细地址输入框行数",
323
384
  "value": {
324
385
  "type": "number | string",
325
386
  "kind": "expression"
326
387
  }
327
388
  },
328
389
  {
329
- "name": "visible-item-count",
330
- "default": "`6`",
331
- "description": "可见的选项个数",
390
+ "name": "detail-maxlength",
391
+ "default": "`200`",
392
+ "description": "详细地址最大长度",
332
393
  "value": {
333
394
  "type": "number | string",
334
395
  "kind": "expression"
335
396
  }
336
397
  },
337
398
  {
338
- "name": "swipe-duration",
339
- "default": "`1000`",
340
- "description": "快速滑动时惯性滚动的时长,单位`ms`",
399
+ "name": "is-saving",
400
+ "default": "`false`",
401
+ "description": "是否显示保存按钮加载动画",
402
+ "value": {
403
+ "type": "boolean",
404
+ "kind": "expression"
405
+ }
406
+ },
407
+ {
408
+ "name": "is-deleting",
409
+ "default": "`false`",
410
+ "description": "是否显示删除按钮加载动画",
411
+ "value": {
412
+ "type": "boolean",
413
+ "kind": "expression"
414
+ }
415
+ },
416
+ {
417
+ "name": "tel-validator",
418
+ "default": "-",
419
+ "description": "手机号格式校验函数",
420
+ "value": {
421
+ "type": "string => boolean",
422
+ "kind": "expression"
423
+ }
424
+ },
425
+ {
426
+ "name": "tel-maxlength",
427
+ "default": "-",
428
+ "description": "手机号最大长度",
341
429
  "value": {
342
430
  "type": "number | string",
343
431
  "kind": "expression"
344
432
  }
345
433
  },
346
434
  {
347
- "name": "is-oversea-code",
435
+ "name": "postal-validator",
348
436
  "default": "-",
349
- "description": "根据`code`校验海外地址,海外地址会划分至单独的分类",
437
+ "description": "邮政编码格式校验函数",
350
438
  "value": {
351
- "type": "() => boolean",
439
+ "type": "string => boolean",
440
+ "kind": "expression"
441
+ }
442
+ },
443
+ {
444
+ "name": "validator",
445
+ "default": "-",
446
+ "description": "自定义校验函数",
447
+ "value": {
448
+ "type": "(key, val) => string",
352
449
  "kind": "expression"
353
450
  }
354
451
  }
@@ -467,227 +564,52 @@
467
564
  ]
468
565
  },
469
566
  {
470
- "name": "van-button",
567
+ "name": "van-badge",
471
568
  "slots": [
472
569
  {
473
570
  "name": "default",
474
- "description": "按钮内容"
475
- },
476
- {
477
- "name": "icon",
478
- "description": "自定义图标"
479
- },
480
- {
481
- "name": "loading",
482
- "description": "自定义加载图标"
483
- }
484
- ],
485
- "events": [
486
- {
487
- "name": "click",
488
- "description": "点击按钮,且按钮状态不为加载或禁用时触发"
571
+ "description": "徽标包裹的子元素"
489
572
  },
490
573
  {
491
- "name": "touchstart",
492
- "description": "开始触摸按钮时触发"
574
+ "name": "content",
575
+ "description": "自定义徽标内容"
493
576
  }
494
577
  ],
578
+ "events": [],
495
579
  "attributes": [
496
580
  {
497
- "name": "type",
498
- "default": "`default`",
499
- "description": "类型,可选值为 `primary` `info` `warning` `danger`",
581
+ "name": "content",
582
+ "default": "-",
583
+ "description": "徽标内容",
500
584
  "value": {
501
- "type": "string",
585
+ "type": "number | string",
502
586
  "kind": "expression"
503
587
  }
504
588
  },
505
589
  {
506
- "name": "size",
507
- "default": "`normal`",
508
- "description": "尺寸,可选值为 `large` `small` `mini`",
590
+ "name": "color",
591
+ "default": "`#ee0a24`",
592
+ "description": "徽标背景颜色",
509
593
  "value": {
510
594
  "type": "string",
511
595
  "kind": "expression"
512
596
  }
513
597
  },
514
598
  {
515
- "name": "text",
516
- "default": "-",
517
- "description": "按钮文字",
518
- "value": {
519
- "type": "string",
520
- "kind": "expression"
521
- }
522
- },
523
- {
524
- "name": "color",
525
- "default": "-",
526
- "description": "按钮颜色,支持传入 `linear-gradient` 渐变色",
527
- "value": {
528
- "type": "string",
529
- "kind": "expression"
530
- }
531
- },
532
- {
533
- "name": "icon",
534
- "default": "-",
535
- "description": "左侧[图标名称](#/zh-CN/icon)或图片链接",
536
- "value": {
537
- "type": "string",
538
- "kind": "expression"
539
- }
540
- },
541
- {
542
- "name": "icon-prefix",
543
- "default": "`van-icon`",
544
- "description": "图标类名前缀,同 Icon 组件的 [class-prefix 属性](#/zh-CN/icon#props)",
545
- "value": {
546
- "type": "string",
547
- "kind": "expression"
548
- }
549
- },
550
- {
551
- "name": "icon-position",
552
- "default": "`left`",
553
- "description": "图标展示位置,可选值为 `right`",
554
- "value": {
555
- "type": "string",
556
- "kind": "expression"
557
- }
558
- },
559
- {
560
- "name": "tag",
561
- "default": "`button`",
562
- "description": "按钮根节点的 HTML 标签",
563
- "value": {
564
- "type": "string",
565
- "kind": "expression"
566
- }
567
- },
568
- {
569
- "name": "native-type",
570
- "default": "-",
571
- "description": "原生 button 标签的 type 属性",
572
- "value": {
573
- "type": "string",
574
- "kind": "expression"
575
- }
576
- },
577
- {
578
- "name": "block",
579
- "default": "`false`",
580
- "description": "是否为块级元素",
581
- "value": {
582
- "type": "boolean",
583
- "kind": "expression"
584
- }
585
- },
586
- {
587
- "name": "plain",
588
- "default": "`false`",
589
- "description": "是否为朴素按钮",
590
- "value": {
591
- "type": "boolean",
592
- "kind": "expression"
593
- }
594
- },
595
- {
596
- "name": "square",
597
- "default": "`false`",
598
- "description": "是否为方形按钮",
599
- "value": {
600
- "type": "boolean",
601
- "kind": "expression"
602
- }
603
- },
604
- {
605
- "name": "round",
606
- "default": "`false`",
607
- "description": "是否为圆形按钮",
608
- "value": {
609
- "type": "boolean",
610
- "kind": "expression"
611
- }
612
- },
613
- {
614
- "name": "disabled",
615
- "default": "`false`",
616
- "description": "是否禁用按钮",
617
- "value": {
618
- "type": "boolean",
619
- "kind": "expression"
620
- }
621
- },
622
- {
623
- "name": "hairline",
624
- "default": "`false`",
625
- "description": "是否使用 0.5px 边框",
626
- "value": {
627
- "type": "boolean",
628
- "kind": "expression"
629
- }
630
- },
631
- {
632
- "name": "loading",
633
- "default": "`false`",
634
- "description": "是否显示为加载状态",
599
+ "name": "dot",
600
+ "default": "`false`",
601
+ "description": "是否展示为小红点",
635
602
  "value": {
636
603
  "type": "boolean",
637
604
  "kind": "expression"
638
605
  }
639
606
  },
640
607
  {
641
- "name": "loading-text",
642
- "default": "-",
643
- "description": "加载状态提示文字",
644
- "value": {
645
- "type": "string",
646
- "kind": "expression"
647
- }
648
- },
649
- {
650
- "name": "loading-type",
651
- "default": "`circular`",
652
- "description": "[加载图标类型](#/zh-CN/loading),可选值为 `spinner`",
653
- "value": {
654
- "type": "string",
655
- "kind": "expression"
656
- }
657
- },
658
- {
659
- "name": "loading-size",
660
- "default": "`20px`",
661
- "description": "加载图标大小",
662
- "value": {
663
- "type": "string",
664
- "kind": "expression"
665
- }
666
- },
667
- {
668
- "name": "url",
669
- "default": "-",
670
- "description": "点击后跳转的链接地址",
671
- "value": {
672
- "type": "string",
673
- "kind": "expression"
674
- }
675
- },
676
- {
677
- "name": "to",
608
+ "name": "max",
678
609
  "default": "-",
679
- "description": "点击后跳转的目标路由对象,同 vue-router [to 属性](https://router.vuejs.org/zh/api/#to)",
680
- "value": {
681
- "type": "string | object",
682
- "kind": "expression"
683
- }
684
- },
685
- {
686
- "name": "replace",
687
- "default": "`false`",
688
- "description": "是否在跳转时替换当前页面历史",
610
+ "description": "最大值,超过最大值会显示 `{max}+`,仅当 content 为数字时有效",
689
611
  "value": {
690
- "type": "boolean",
612
+ "type": "number | string",
691
613
  "kind": "expression"
692
614
  }
693
615
  }
@@ -1042,210 +964,225 @@
1042
964
  ]
1043
965
  },
1044
966
  {
1045
- "name": "van-badge",
967
+ "name": "van-button",
1046
968
  "slots": [
1047
969
  {
1048
970
  "name": "default",
1049
- "description": "徽标包裹的子元素"
971
+ "description": "按钮内容"
1050
972
  },
1051
973
  {
1052
- "name": "content",
1053
- "description": "自定义徽标内容"
974
+ "name": "icon",
975
+ "description": "自定义图标"
976
+ },
977
+ {
978
+ "name": "loading",
979
+ "description": "自定义加载图标"
980
+ }
981
+ ],
982
+ "events": [
983
+ {
984
+ "name": "click",
985
+ "description": "点击按钮,且按钮状态不为加载或禁用时触发"
986
+ },
987
+ {
988
+ "name": "touchstart",
989
+ "description": "开始触摸按钮时触发"
1054
990
  }
1055
991
  ],
1056
- "events": [],
1057
992
  "attributes": [
1058
993
  {
1059
- "name": "content",
1060
- "default": "-",
1061
- "description": "徽标内容",
994
+ "name": "type",
995
+ "default": "`default`",
996
+ "description": "类型,可选值为 `primary` `info` `warning` `danger`",
1062
997
  "value": {
1063
- "type": "number | string",
998
+ "type": "string",
1064
999
  "kind": "expression"
1065
1000
  }
1066
1001
  },
1067
1002
  {
1068
- "name": "color",
1069
- "default": "`#ee0a24`",
1070
- "description": "徽标背景颜色",
1003
+ "name": "size",
1004
+ "default": "`normal`",
1005
+ "description": "尺寸,可选值为 `large` `small` `mini`",
1071
1006
  "value": {
1072
1007
  "type": "string",
1073
1008
  "kind": "expression"
1074
1009
  }
1075
1010
  },
1076
1011
  {
1077
- "name": "dot",
1078
- "default": "`false`",
1079
- "description": "是否展示为小红点",
1012
+ "name": "text",
1013
+ "default": "-",
1014
+ "description": "按钮文字",
1080
1015
  "value": {
1081
- "type": "boolean",
1016
+ "type": "string",
1082
1017
  "kind": "expression"
1083
1018
  }
1084
1019
  },
1085
1020
  {
1086
- "name": "max",
1021
+ "name": "color",
1087
1022
  "default": "-",
1088
- "description": "最大值,超过最大值会显示 `{max}+`,仅当 content 为数字时有效",
1023
+ "description": "按钮颜色,支持传入 `linear-gradient` 渐变色",
1089
1024
  "value": {
1090
- "type": "number | string",
1025
+ "type": "string",
1091
1026
  "kind": "expression"
1092
1027
  }
1093
- }
1094
- ]
1095
- },
1096
- {
1097
- "name": "van-card",
1098
- "slots": [
1099
- {
1100
- "name": "title",
1101
- "description": "自定义标题"
1102
1028
  },
1103
1029
  {
1104
- "name": "desc",
1105
- "description": "自定义描述"
1030
+ "name": "icon",
1031
+ "default": "-",
1032
+ "description": "左侧[图标名称](#/zh-CN/icon)或图片链接",
1033
+ "value": {
1034
+ "type": "string",
1035
+ "kind": "expression"
1036
+ }
1106
1037
  },
1107
1038
  {
1108
- "name": "num",
1109
- "description": "自定义数量"
1039
+ "name": "icon-prefix",
1040
+ "default": "`van-icon`",
1041
+ "description": "图标类名前缀,同 Icon 组件的 [class-prefix 属性](#/zh-CN/icon#props)",
1042
+ "value": {
1043
+ "type": "string",
1044
+ "kind": "expression"
1045
+ }
1110
1046
  },
1111
1047
  {
1112
- "name": "price",
1113
- "description": "自定义价格"
1114
- },
1115
- {
1116
- "name": "origin-price",
1117
- "description": "自定义商品原价"
1118
- },
1119
- {
1120
- "name": "price-top",
1121
- "description": "自定义价格上方区域"
1122
- },
1123
- {
1124
- "name": "bottom",
1125
- "description": "自定义价格下方区域"
1126
- },
1127
- {
1128
- "name": "thumb",
1129
- "description": "自定义图片"
1048
+ "name": "icon-position",
1049
+ "default": "`left`",
1050
+ "description": "图标展示位置,可选值为 `right`",
1051
+ "value": {
1052
+ "type": "string",
1053
+ "kind": "expression"
1054
+ }
1130
1055
  },
1131
1056
  {
1132
1057
  "name": "tag",
1133
- "description": "自定义图片角标"
1058
+ "default": "`button`",
1059
+ "description": "按钮根节点的 HTML 标签",
1060
+ "value": {
1061
+ "type": "string",
1062
+ "kind": "expression"
1063
+ }
1134
1064
  },
1135
1065
  {
1136
- "name": "tags",
1137
- "description": "自定义描述下方标签区域"
1066
+ "name": "native-type",
1067
+ "default": "-",
1068
+ "description": "原生 button 标签的 type 属性",
1069
+ "value": {
1070
+ "type": "string",
1071
+ "kind": "expression"
1072
+ }
1138
1073
  },
1139
1074
  {
1140
- "name": "footer",
1141
- "description": "自定义右下角内容"
1142
- }
1143
- ],
1144
- "events": [
1145
- {
1146
- "name": "click",
1147
- "description": "点击时触发"
1075
+ "name": "block",
1076
+ "default": "`false`",
1077
+ "description": "是否为块级元素",
1078
+ "value": {
1079
+ "type": "boolean",
1080
+ "kind": "expression"
1081
+ }
1148
1082
  },
1149
1083
  {
1150
- "name": "click-thumb",
1151
- "description": "点击自定义图片时触发"
1152
- }
1153
- ],
1154
- "attributes": [
1155
- {
1156
- "name": "thumb",
1157
- "default": "-",
1158
- "description": "左侧图片 URL",
1084
+ "name": "plain",
1085
+ "default": "`false`",
1086
+ "description": "是否为朴素按钮",
1159
1087
  "value": {
1160
- "type": "string",
1088
+ "type": "boolean",
1161
1089
  "kind": "expression"
1162
1090
  }
1163
1091
  },
1164
1092
  {
1165
- "name": "title",
1166
- "default": "-",
1167
- "description": "标题",
1093
+ "name": "square",
1094
+ "default": "`false`",
1095
+ "description": "是否为方形按钮",
1168
1096
  "value": {
1169
- "type": "string",
1097
+ "type": "boolean",
1170
1098
  "kind": "expression"
1171
1099
  }
1172
1100
  },
1173
1101
  {
1174
- "name": "desc",
1175
- "default": "-",
1176
- "description": "描述",
1102
+ "name": "round",
1103
+ "default": "`false`",
1104
+ "description": "是否为圆形按钮",
1177
1105
  "value": {
1178
- "type": "string",
1106
+ "type": "boolean",
1179
1107
  "kind": "expression"
1180
1108
  }
1181
1109
  },
1182
1110
  {
1183
- "name": "tag",
1184
- "default": "-",
1185
- "description": "图片角标",
1111
+ "name": "disabled",
1112
+ "default": "`false`",
1113
+ "description": "是否禁用按钮",
1186
1114
  "value": {
1187
- "type": "string",
1115
+ "type": "boolean",
1188
1116
  "kind": "expression"
1189
1117
  }
1190
1118
  },
1191
1119
  {
1192
- "name": "num",
1193
- "default": "-",
1194
- "description": "商品数量",
1120
+ "name": "hairline",
1121
+ "default": "`false`",
1122
+ "description": "是否使用 0.5px 边框",
1195
1123
  "value": {
1196
- "type": "number | string",
1124
+ "type": "boolean",
1197
1125
  "kind": "expression"
1198
1126
  }
1199
1127
  },
1200
1128
  {
1201
- "name": "price",
1202
- "default": "-",
1203
- "description": "商品价格",
1129
+ "name": "loading",
1130
+ "default": "`false`",
1131
+ "description": "是否显示为加载状态",
1204
1132
  "value": {
1205
- "type": "number | string",
1133
+ "type": "boolean",
1206
1134
  "kind": "expression"
1207
1135
  }
1208
1136
  },
1209
1137
  {
1210
- "name": "origin-price",
1138
+ "name": "loading-text",
1211
1139
  "default": "-",
1212
- "description": "商品划线原价",
1140
+ "description": "加载状态提示文字",
1213
1141
  "value": {
1214
- "type": "number | string",
1142
+ "type": "string",
1215
1143
  "kind": "expression"
1216
1144
  }
1217
1145
  },
1218
1146
  {
1219
- "name": "centered",
1220
- "default": "`false`",
1221
- "description": "内容是否垂直居中",
1147
+ "name": "loading-type",
1148
+ "default": "`circular`",
1149
+ "description": "[加载图标类型](#/zh-CN/loading),可选值为 `spinner`",
1222
1150
  "value": {
1223
- "type": "boolean",
1151
+ "type": "string",
1224
1152
  "kind": "expression"
1225
1153
  }
1226
1154
  },
1227
1155
  {
1228
- "name": "currency",
1229
- "default": "`¥`",
1230
- "description": "货币符号",
1156
+ "name": "loading-size",
1157
+ "default": "`20px`",
1158
+ "description": "加载图标大小",
1231
1159
  "value": {
1232
1160
  "type": "string",
1233
1161
  "kind": "expression"
1234
1162
  }
1235
1163
  },
1236
1164
  {
1237
- "name": "thumb-link",
1165
+ "name": "url",
1238
1166
  "default": "-",
1239
- "description": "点击左侧图片后跳转的链接地址",
1167
+ "description": "点击后跳转的链接地址",
1240
1168
  "value": {
1241
1169
  "type": "string",
1242
1170
  "kind": "expression"
1243
1171
  }
1244
1172
  },
1245
1173
  {
1246
- "name": "lazy-load",
1174
+ "name": "to",
1175
+ "default": "-",
1176
+ "description": "点击后跳转的目标路由对象,同 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to)",
1177
+ "value": {
1178
+ "type": "string | object",
1179
+ "kind": "expression"
1180
+ }
1181
+ },
1182
+ {
1183
+ "name": "replace",
1247
1184
  "default": "`false`",
1248
- "description": "是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用",
1185
+ "description": "是否在跳转时替换当前页面历史",
1249
1186
  "value": {
1250
1187
  "type": "boolean",
1251
1188
  "kind": "expression"
@@ -1254,341 +1191,404 @@
1254
1191
  ]
1255
1192
  },
1256
1193
  {
1257
- "name": "van-address-edit",
1194
+ "name": "van-area",
1258
1195
  "slots": [
1259
1196
  {
1260
- "name": "default",
1261
- "description": "在邮政编码下方插入内容"
1262
- }
1263
- ],
1264
- "events": [
1265
- {
1266
- "name": "save",
1267
- "description": "点击保存按钮时触发"
1268
- },
1269
- {
1270
- "name": "focus",
1271
- "description": "输入框聚焦时触发"
1272
- },
1273
- {
1274
- "name": "delete",
1275
- "description": "确认删除地址时触发"
1276
- },
1277
- {
1278
- "name": "cancel-delete",
1279
- "description": "取消删除地址时触发"
1197
+ "name": "title",
1198
+ "description": "自定义标题内容"
1280
1199
  },
1281
1200
  {
1282
- "name": "select-search",
1283
- "description": "选中搜索结果时触发"
1201
+ "name": "columns-top",
1202
+ "description": "自定义选项上方内容"
1284
1203
  },
1285
1204
  {
1286
- "name": "click-area",
1287
- "description": "点击收件地区时触发"
1288
- },
1205
+ "name": "columns-bottom",
1206
+ "description": "自定义选项下方内容"
1207
+ }
1208
+ ],
1209
+ "events": [
1289
1210
  {
1290
- "name": "change-area",
1291
- "description": "修改收件地区时触发"
1211
+ "name": "confirm",
1212
+ "description": "点击右上方完成按钮"
1292
1213
  },
1293
1214
  {
1294
- "name": "change-detail",
1295
- "description": "修改详细地址时触发"
1215
+ "name": "cancel",
1216
+ "description": "点击取消按钮时"
1296
1217
  },
1297
1218
  {
1298
- "name": "change-default",
1299
- "description": "切换是否使用默认地址时触发"
1219
+ "name": "change",
1220
+ "description": "选项改变时触发"
1300
1221
  }
1301
1222
  ],
1302
1223
  "attributes": [
1303
1224
  {
1304
- "name": "area-list",
1225
+ "name": "value",
1305
1226
  "default": "-",
1306
- "description": "地区列表",
1227
+ "description": "当前选中的省市区`code`",
1307
1228
  "value": {
1308
- "type": "object",
1229
+ "type": "string",
1309
1230
  "kind": "expression"
1310
1231
  }
1311
1232
  },
1312
1233
  {
1313
- "name": "area-columns-placeholder",
1314
- "default": "`[]`",
1315
- "description": "地区选择列占位提示文字",
1234
+ "name": "title",
1235
+ "default": "-",
1236
+ "description": "顶部栏标题",
1316
1237
  "value": {
1317
- "type": "string[]",
1238
+ "type": "string",
1318
1239
  "kind": "expression"
1319
1240
  }
1320
1241
  },
1321
1242
  {
1322
- "name": "area-placeholder",
1323
- "default": "`选择省 / 市 / 区`",
1324
- "description": "地区输入框占位提示文字",
1243
+ "name": "confirm-button-text",
1244
+ "default": "`确认`",
1245
+ "description": "确认按钮文字",
1325
1246
  "value": {
1326
1247
  "type": "string",
1327
1248
  "kind": "expression"
1328
1249
  }
1329
1250
  },
1330
1251
  {
1331
- "name": "address-info",
1332
- "default": "`{}`",
1333
- "description": "收货人信息初始值",
1252
+ "name": "cancel-button-text",
1253
+ "default": "`取消`",
1254
+ "description": "取消按钮文字",
1334
1255
  "value": {
1335
- "type": "AddressInfo",
1256
+ "type": "string",
1336
1257
  "kind": "expression"
1337
1258
  }
1338
1259
  },
1339
1260
  {
1340
- "name": "search-result",
1261
+ "name": "area-list",
1262
+ "default": "-",
1263
+ "description": "省市区数据,格式见下方",
1264
+ "value": {
1265
+ "type": "object",
1266
+ "kind": "expression"
1267
+ }
1268
+ },
1269
+ {
1270
+ "name": "columns-placeholder",
1341
1271
  "default": "`[]`",
1342
- "description": "详细地址搜索结果",
1272
+ "description": "列占位提示文字",
1343
1273
  "value": {
1344
- "type": "SearchResult[]",
1274
+ "type": "string[]",
1345
1275
  "kind": "expression"
1346
1276
  }
1347
1277
  },
1348
1278
  {
1349
- "name": "show-postal",
1279
+ "name": "loading",
1350
1280
  "default": "`false`",
1351
- "description": "是否显示邮政编码",
1281
+ "description": "是否显示加载状态",
1352
1282
  "value": {
1353
1283
  "type": "boolean",
1354
1284
  "kind": "expression"
1355
1285
  }
1356
1286
  },
1357
1287
  {
1358
- "name": "show-delete",
1288
+ "name": "readonly",
1359
1289
  "default": "`false`",
1360
- "description": "是否显示删除按钮",
1290
+ "description": "是否为只读状态,只读状态下无法切换选项",
1361
1291
  "value": {
1362
1292
  "type": "boolean",
1363
1293
  "kind": "expression"
1364
1294
  }
1365
1295
  },
1366
1296
  {
1367
- "name": "show-set-default",
1368
- "default": "`false`",
1369
- "description": "是否显示默认地址栏",
1297
+ "name": "item-height",
1298
+ "default": "`44`",
1299
+ "description": "选项高度,支持 `px` `vw` `vh` `rem` 单位,默认 `px`",
1370
1300
  "value": {
1371
- "type": "boolean",
1301
+ "type": "number | string",
1372
1302
  "kind": "expression"
1373
1303
  }
1374
1304
  },
1375
1305
  {
1376
- "name": "show-search-result",
1377
- "default": "`false`",
1378
- "description": "是否显示搜索结果",
1306
+ "name": "columns-num",
1307
+ "default": "`3`",
1308
+ "description": "显示列数,3-省市区,2-省市,1-省",
1379
1309
  "value": {
1380
- "type": "boolean",
1310
+ "type": "number | string",
1381
1311
  "kind": "expression"
1382
1312
  }
1383
1313
  },
1384
1314
  {
1385
- "name": "show-area",
1386
- "default": "`true`",
1387
- "description": "是否显示地区",
1315
+ "name": "visible-item-count",
1316
+ "default": "`6`",
1317
+ "description": "可见的选项个数",
1388
1318
  "value": {
1389
- "type": "boolean",
1319
+ "type": "number | string",
1390
1320
  "kind": "expression"
1391
1321
  }
1392
1322
  },
1393
1323
  {
1394
- "name": "show-detail",
1395
- "default": "`true`",
1396
- "description": "是否显示详细地址",
1324
+ "name": "swipe-duration",
1325
+ "default": "`1000`",
1326
+ "description": "快速滑动时惯性滚动的时长,单位`ms`",
1397
1327
  "value": {
1398
- "type": "boolean",
1328
+ "type": "number | string",
1399
1329
  "kind": "expression"
1400
1330
  }
1401
1331
  },
1402
1332
  {
1403
- "name": "disable-area",
1404
- "default": "`false`",
1405
- "description": "是否禁用地区选择",
1333
+ "name": "is-oversea-code",
1334
+ "default": "-",
1335
+ "description": "根据`code`校验海外地址,海外地址会划分至单独的分类",
1406
1336
  "value": {
1407
- "type": "boolean",
1337
+ "type": "() => boolean",
1408
1338
  "kind": "expression"
1409
1339
  }
1340
+ }
1341
+ ]
1342
+ },
1343
+ {
1344
+ "name": "van-cascader",
1345
+ "slots": [
1346
+ {
1347
+ "name": "title",
1348
+ "description": "自定义顶部标题"
1410
1349
  },
1411
1350
  {
1412
- "name": "save-button-text",
1413
- "default": "`保存`",
1414
- "description": "保存按钮文字",
1351
+ "name": "option",
1352
+ "description": "自定义选项文字"
1353
+ }
1354
+ ],
1355
+ "events": [
1356
+ {
1357
+ "name": "change",
1358
+ "description": "选中项变化时触发"
1359
+ },
1360
+ {
1361
+ "name": "finish",
1362
+ "description": "全部选项选择完成后触发"
1363
+ },
1364
+ {
1365
+ "name": "close",
1366
+ "description": "点击关闭图标时触发"
1367
+ }
1368
+ ],
1369
+ "attributes": [
1370
+ {
1371
+ "name": "title",
1372
+ "default": "-",
1373
+ "description": "顶部标题",
1415
1374
  "value": {
1416
1375
  "type": "string",
1417
1376
  "kind": "expression"
1418
1377
  }
1419
1378
  },
1420
1379
  {
1421
- "name": "delete-button-text",
1422
- "default": "`删除`",
1423
- "description": "删除按钮文字",
1380
+ "name": "value",
1381
+ "default": "-",
1382
+ "description": "选中项的值",
1424
1383
  "value": {
1425
- "type": "string",
1384
+ "type": "string | number",
1426
1385
  "kind": "expression"
1427
1386
  }
1428
1387
  },
1429
1388
  {
1430
- "name": "detail-rows",
1431
- "default": "`1`",
1432
- "description": "详细地址输入框行数",
1389
+ "name": "options",
1390
+ "default": "`[]`",
1391
+ "description": "可选项数据源",
1433
1392
  "value": {
1434
- "type": "number | string",
1393
+ "type": "Option[]",
1435
1394
  "kind": "expression"
1436
1395
  }
1437
1396
  },
1438
1397
  {
1439
- "name": "detail-maxlength",
1440
- "default": "`200`",
1441
- "description": "详细地址最大长度",
1398
+ "name": "placeholder",
1399
+ "default": "`请选择`",
1400
+ "description": "未选中时的提示文案",
1442
1401
  "value": {
1443
- "type": "number | string",
1402
+ "type": "string",
1444
1403
  "kind": "expression"
1445
1404
  }
1446
1405
  },
1447
1406
  {
1448
- "name": "is-saving",
1449
- "default": "`false`",
1450
- "description": "是否显示保存按钮加载动画",
1407
+ "name": "active-color",
1408
+ "default": "`#ee0a24`",
1409
+ "description": "选中状态的高亮颜色",
1410
+ "value": {
1411
+ "type": "string",
1412
+ "kind": "expression"
1413
+ }
1414
+ },
1415
+ {
1416
+ "name": "closeable",
1417
+ "default": "`true`",
1418
+ "description": "是否显示关闭图标",
1451
1419
  "value": {
1452
1420
  "type": "boolean",
1453
1421
  "kind": "expression"
1454
1422
  }
1455
1423
  },
1456
1424
  {
1457
- "name": "is-deleting",
1458
- "default": "`false`",
1459
- "description": "是否显示删除按钮加载动画",
1425
+ "name": "field-names",
1426
+ "default": "`{ text: 'text', value: 'value', children: 'children' }`",
1427
+ "description": "自定义 `options` 结构中的字段",
1428
+ "value": {
1429
+ "type": "object",
1430
+ "kind": "expression"
1431
+ }
1432
+ }
1433
+ ]
1434
+ },
1435
+ {
1436
+ "name": "van-card",
1437
+ "slots": [
1438
+ {
1439
+ "name": "title",
1440
+ "description": "自定义标题"
1441
+ },
1442
+ {
1443
+ "name": "desc",
1444
+ "description": "自定义描述"
1445
+ },
1446
+ {
1447
+ "name": "num",
1448
+ "description": "自定义数量"
1449
+ },
1450
+ {
1451
+ "name": "price",
1452
+ "description": "自定义价格"
1453
+ },
1454
+ {
1455
+ "name": "origin-price",
1456
+ "description": "自定义商品原价"
1457
+ },
1458
+ {
1459
+ "name": "price-top",
1460
+ "description": "自定义价格上方区域"
1461
+ },
1462
+ {
1463
+ "name": "bottom",
1464
+ "description": "自定义价格下方区域"
1465
+ },
1466
+ {
1467
+ "name": "thumb",
1468
+ "description": "自定义图片"
1469
+ },
1470
+ {
1471
+ "name": "tag",
1472
+ "description": "自定义图片角标"
1473
+ },
1474
+ {
1475
+ "name": "tags",
1476
+ "description": "自定义描述下方标签区域"
1477
+ },
1478
+ {
1479
+ "name": "footer",
1480
+ "description": "自定义右下角内容"
1481
+ }
1482
+ ],
1483
+ "events": [
1484
+ {
1485
+ "name": "click",
1486
+ "description": "点击时触发"
1487
+ },
1488
+ {
1489
+ "name": "click-thumb",
1490
+ "description": "点击自定义图片时触发"
1491
+ }
1492
+ ],
1493
+ "attributes": [
1494
+ {
1495
+ "name": "thumb",
1496
+ "default": "-",
1497
+ "description": "左侧图片 URL",
1460
1498
  "value": {
1461
- "type": "boolean",
1499
+ "type": "string",
1462
1500
  "kind": "expression"
1463
1501
  }
1464
1502
  },
1465
1503
  {
1466
- "name": "tel-validator",
1504
+ "name": "title",
1467
1505
  "default": "-",
1468
- "description": "手机号格式校验函数",
1506
+ "description": "标题",
1469
1507
  "value": {
1470
- "type": "string => boolean",
1508
+ "type": "string",
1471
1509
  "kind": "expression"
1472
1510
  }
1473
1511
  },
1474
1512
  {
1475
- "name": "tel-maxlength",
1513
+ "name": "desc",
1476
1514
  "default": "-",
1477
- "description": "手机号最大长度",
1515
+ "description": "描述",
1478
1516
  "value": {
1479
- "type": "number | string",
1517
+ "type": "string",
1480
1518
  "kind": "expression"
1481
1519
  }
1482
1520
  },
1483
1521
  {
1484
- "name": "postal-validator",
1522
+ "name": "tag",
1485
1523
  "default": "-",
1486
- "description": "邮政编码格式校验函数",
1524
+ "description": "图片角标",
1487
1525
  "value": {
1488
- "type": "string => boolean",
1526
+ "type": "string",
1489
1527
  "kind": "expression"
1490
1528
  }
1491
1529
  },
1492
1530
  {
1493
- "name": "validator",
1531
+ "name": "num",
1494
1532
  "default": "-",
1495
- "description": "自定义校验函数",
1533
+ "description": "商品数量",
1496
1534
  "value": {
1497
- "type": "(key, val) => string",
1535
+ "type": "number | string",
1498
1536
  "kind": "expression"
1499
1537
  }
1500
- }
1501
- ]
1502
- },
1503
- {
1504
- "name": "van-cascader",
1505
- "slots": [
1506
- {
1507
- "name": "title",
1508
- "description": "自定义顶部标题"
1509
- },
1510
- {
1511
- "name": "option",
1512
- "description": "自定义选项文字"
1513
- }
1514
- ],
1515
- "events": [
1516
- {
1517
- "name": "change",
1518
- "description": "选中项变化时触发"
1519
- },
1520
- {
1521
- "name": "finish",
1522
- "description": "全部选项选择完成后触发"
1523
1538
  },
1524
1539
  {
1525
- "name": "close",
1526
- "description": "点击关闭图标时触发"
1527
- }
1528
- ],
1529
- "attributes": [
1530
- {
1531
- "name": "title",
1540
+ "name": "price",
1532
1541
  "default": "-",
1533
- "description": "顶部标题",
1542
+ "description": "商品价格",
1534
1543
  "value": {
1535
- "type": "string",
1544
+ "type": "number | string",
1536
1545
  "kind": "expression"
1537
1546
  }
1538
1547
  },
1539
1548
  {
1540
- "name": "value",
1549
+ "name": "origin-price",
1541
1550
  "default": "-",
1542
- "description": "选中项的值",
1551
+ "description": "商品划线原价",
1543
1552
  "value": {
1544
- "type": "string | number",
1553
+ "type": "number | string",
1545
1554
  "kind": "expression"
1546
1555
  }
1547
1556
  },
1548
1557
  {
1549
- "name": "options",
1550
- "default": "`[]`",
1551
- "description": "可选项数据源",
1558
+ "name": "centered",
1559
+ "default": "`false`",
1560
+ "description": "内容是否垂直居中",
1552
1561
  "value": {
1553
- "type": "Option[]",
1562
+ "type": "boolean",
1554
1563
  "kind": "expression"
1555
1564
  }
1556
1565
  },
1557
1566
  {
1558
- "name": "placeholder",
1559
- "default": "`请选择`",
1560
- "description": "未选中时的提示文案",
1567
+ "name": "currency",
1568
+ "default": "`¥`",
1569
+ "description": "货币符号",
1561
1570
  "value": {
1562
1571
  "type": "string",
1563
1572
  "kind": "expression"
1564
1573
  }
1565
1574
  },
1566
1575
  {
1567
- "name": "active-color",
1568
- "default": "`#ee0a24`",
1569
- "description": "选中状态的高亮颜色",
1576
+ "name": "thumb-link",
1577
+ "default": "-",
1578
+ "description": "点击左侧图片后跳转的链接地址",
1570
1579
  "value": {
1571
1580
  "type": "string",
1572
1581
  "kind": "expression"
1573
1582
  }
1574
1583
  },
1575
1584
  {
1576
- "name": "closeable",
1577
- "default": "`true`",
1578
- "description": "是否显示关闭图标",
1585
+ "name": "lazy-load",
1586
+ "default": "`false`",
1587
+ "description": "是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用",
1579
1588
  "value": {
1580
1589
  "type": "boolean",
1581
1590
  "kind": "expression"
1582
1591
  }
1583
- },
1584
- {
1585
- "name": "field-names",
1586
- "default": "`{ text: 'text', value: 'value', children: 'children' }`",
1587
- "description": "自定义 `options` 结构中的字段",
1588
- "value": {
1589
- "type": "object",
1590
- "kind": "expression"
1591
- }
1592
1592
  }
1593
1593
  ]
1594
1594
  },
@@ -5425,77 +5425,6 @@
5425
5425
  }
5426
5426
  ]
5427
5427
  },
5428
- {
5429
- "name": "van-overlay",
5430
- "slots": [
5431
- {
5432
- "name": "default",
5433
- "description": "默认插槽,用于在遮罩层上方嵌入内容"
5434
- }
5435
- ],
5436
- "events": [
5437
- {
5438
- "name": "click",
5439
- "description": "点击时触发"
5440
- }
5441
- ],
5442
- "attributes": [
5443
- {
5444
- "name": "show",
5445
- "default": "`false`",
5446
- "description": "是否展示遮罩层",
5447
- "value": {
5448
- "type": "boolean",
5449
- "kind": "expression"
5450
- }
5451
- },
5452
- {
5453
- "name": "z-index",
5454
- "default": "`1`",
5455
- "description": "z-index 层级",
5456
- "value": {
5457
- "type": "number | string",
5458
- "kind": "expression"
5459
- }
5460
- },
5461
- {
5462
- "name": "duration",
5463
- "default": "`0.3`",
5464
- "description": "动画时长,单位秒",
5465
- "value": {
5466
- "type": "number | string",
5467
- "kind": "expression"
5468
- }
5469
- },
5470
- {
5471
- "name": "class-name",
5472
- "default": "-",
5473
- "description": "自定义类名",
5474
- "value": {
5475
- "type": "string",
5476
- "kind": "expression"
5477
- }
5478
- },
5479
- {
5480
- "name": "custom-style",
5481
- "default": "-",
5482
- "description": "自定义样式",
5483
- "value": {
5484
- "type": "object",
5485
- "kind": "expression"
5486
- }
5487
- },
5488
- {
5489
- "name": "lock-scroll",
5490
- "default": "`true`",
5491
- "description": "是否锁定背景滚动,锁定时蒙层里的内容也将无法滚动",
5492
- "value": {
5493
- "type": "boolean",
5494
- "kind": "expression"
5495
- }
5496
- }
5497
- ]
5498
- },
5499
5428
  {
5500
5429
  "name": "van-number-keyboard",
5501
5430
  "slots": [
@@ -5685,6 +5614,77 @@
5685
5614
  }
5686
5615
  ]
5687
5616
  },
5617
+ {
5618
+ "name": "van-overlay",
5619
+ "slots": [
5620
+ {
5621
+ "name": "default",
5622
+ "description": "默认插槽,用于在遮罩层上方嵌入内容"
5623
+ }
5624
+ ],
5625
+ "events": [
5626
+ {
5627
+ "name": "click",
5628
+ "description": "点击时触发"
5629
+ }
5630
+ ],
5631
+ "attributes": [
5632
+ {
5633
+ "name": "show",
5634
+ "default": "`false`",
5635
+ "description": "是否展示遮罩层",
5636
+ "value": {
5637
+ "type": "boolean",
5638
+ "kind": "expression"
5639
+ }
5640
+ },
5641
+ {
5642
+ "name": "z-index",
5643
+ "default": "`1`",
5644
+ "description": "z-index 层级",
5645
+ "value": {
5646
+ "type": "number | string",
5647
+ "kind": "expression"
5648
+ }
5649
+ },
5650
+ {
5651
+ "name": "duration",
5652
+ "default": "`0.3`",
5653
+ "description": "动画时长,单位秒",
5654
+ "value": {
5655
+ "type": "number | string",
5656
+ "kind": "expression"
5657
+ }
5658
+ },
5659
+ {
5660
+ "name": "class-name",
5661
+ "default": "-",
5662
+ "description": "自定义类名",
5663
+ "value": {
5664
+ "type": "string",
5665
+ "kind": "expression"
5666
+ }
5667
+ },
5668
+ {
5669
+ "name": "custom-style",
5670
+ "default": "-",
5671
+ "description": "自定义样式",
5672
+ "value": {
5673
+ "type": "object",
5674
+ "kind": "expression"
5675
+ }
5676
+ },
5677
+ {
5678
+ "name": "lock-scroll",
5679
+ "default": "`true`",
5680
+ "description": "是否锁定背景滚动,锁定时蒙层里的内容也将无法滚动",
5681
+ "value": {
5682
+ "type": "boolean",
5683
+ "kind": "expression"
5684
+ }
5685
+ }
5686
+ ]
5687
+ },
5688
5688
  {
5689
5689
  "name": "van-pagination",
5690
5690
  "slots": [