vant 3.3.1 → 3.3.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.
@@ -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": "3.3.1",
5
+ "version": "3.3.2",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "tags": [
@@ -509,86 +509,86 @@
509
509
  ]
510
510
  },
511
511
  {
512
- "name": "van-action-sheet",
512
+ "name": "van-address-list",
513
513
  "slots": [
514
514
  {
515
515
  "name": "default",
516
- "description": "自定义面板的展示内容"
516
+ "description": "在列表下方插入内容"
517
517
  },
518
518
  {
519
- "name": "description",
520
- "description": "自定义描述文案"
519
+ "name": "top",
520
+ "description": "在顶部插入内容"
521
521
  },
522
522
  {
523
- "name": "cancel",
524
- "description": "自定义取消按钮内容"
523
+ "name": "item-bottom",
524
+ "description": "在列表项底部插入内容"
525
+ },
526
+ {
527
+ "name": "tag",
528
+ "description": "自定义列表项标签内容"
525
529
  }
526
530
  ],
527
531
  "events": [
528
532
  {
529
- "name": "select",
530
- "description": "点击选项时触发,禁用或加载状态下不会触发"
531
- },
532
- {
533
- "name": "cancel",
534
- "description": "点击取消按钮时触发"
533
+ "name": "add",
534
+ "description": "点击新增按钮时触发"
535
535
  },
536
536
  {
537
- "name": "open",
538
- "description": "打开面板时触发"
537
+ "name": "edit",
538
+ "description": "点击编辑按钮时触发"
539
539
  },
540
540
  {
541
- "name": "close",
542
- "description": "关闭面板时触发"
541
+ "name": "select",
542
+ "description": "切换选中的地址时触发"
543
543
  },
544
544
  {
545
- "name": "opened",
546
- "description": "打开面板且动画结束后触发"
545
+ "name": "edit-disabled",
546
+ "description": "编辑不可配送的地址时触发"
547
547
  },
548
548
  {
549
- "name": "closed",
550
- "description": "关闭面板且动画结束后触发"
549
+ "name": "select-disabled",
550
+ "description": "选中不可配送的地址时触发"
551
551
  },
552
552
  {
553
- "name": "click-overlay",
554
- "description": "点击遮罩层时触发"
553
+ "name": "click-item",
554
+ "description": "点击任意地址时触发"
555
555
  }
556
556
  ],
557
557
  "attributes": [
558
558
  {
559
- "name": "v-model:show",
560
- "default": "`false`",
561
- "description": "是否显示动作面板",
559
+ "name": "v-model",
560
+ "default": "-",
561
+ "description": "当前选中地址的 id",
562
562
  "options": [],
563
563
  "value": {
564
- "type": "boolean",
564
+ "type": "string",
565
565
  "kind": "expression"
566
566
  }
567
567
  },
568
568
  {
569
- "name": "actions",
569
+ "name": "list",
570
570
  "default": "`[]`",
571
- "description": "面板选项列表",
571
+ "description": "地址列表",
572
572
  "options": [],
573
573
  "value": {
574
- "type": "ActionSheetAction[]",
574
+ "type": "AddressListAddress[]",
575
575
  "kind": "expression"
576
576
  }
577
577
  },
578
578
  {
579
- "name": "title",
580
- "default": "-",
581
- "description": "顶部标题",
579
+ "name": "disabled-list",
580
+ "default": "`[]`",
581
+ "description": "不可配送地址列表",
582
582
  "options": [],
583
583
  "value": {
584
- "type": "string",
584
+ "type": "AddressListAddress[]",
585
585
  "kind": "expression"
586
586
  }
587
587
  },
588
588
  {
589
- "name": "cancel-text",
589
+ "name": "disabled-text",
590
590
  "default": "-",
591
- "description": "取消按钮文字",
591
+ "description": "不可配送提示文案",
592
592
  "options": [],
593
593
  "value": {
594
594
  "type": "string",
@@ -596,81 +596,124 @@
596
596
  }
597
597
  },
598
598
  {
599
- "name": "description",
600
- "default": "-",
601
- "description": "选项上方的描述信息",
599
+ "name": "switchable",
600
+ "default": "`true`",
601
+ "description": "是否允许切换地址",
602
602
  "options": [],
603
603
  "value": {
604
- "type": "string",
604
+ "type": "boolean",
605
605
  "kind": "expression"
606
606
  }
607
607
  },
608
608
  {
609
- "name": "closeable",
610
- "default": "`true`",
611
- "description": "是否显示关闭图标",
609
+ "name": "add-button-text",
610
+ "default": "`新增地址`",
611
+ "description": "底部按钮文字",
612
612
  "options": [],
613
613
  "value": {
614
- "type": "boolean",
614
+ "type": "string",
615
615
  "kind": "expression"
616
616
  }
617
617
  },
618
618
  {
619
- "name": "close-icon",
620
- "default": "`cross`",
621
- "description": "关闭[图标名称](#/zh-CN/icon)或图片链接",
619
+ "name": "default-tag-text",
620
+ "default": "-",
621
+ "description": "默认地址标签文字",
622
622
  "options": [],
623
623
  "value": {
624
624
  "type": "string",
625
625
  "kind": "expression"
626
626
  }
627
+ }
628
+ ]
629
+ },
630
+ {
631
+ "name": "van-area",
632
+ "slots": [
633
+ {
634
+ "name": "toolbar",
635
+ "description": "自定义整个顶部栏的内容"
627
636
  },
628
637
  {
629
- "name": "duration",
630
- "default": "`0.3`",
631
- "description": "动画时长,单位秒,设置为 0 可以禁用动画",
638
+ "name": "title",
639
+ "description": "自定义标题内容"
640
+ },
641
+ {
642
+ "name": "confirm",
643
+ "description": "自定义确认按钮内容"
644
+ },
645
+ {
646
+ "name": "cancel",
647
+ "description": "自定义取消按钮内容"
648
+ },
649
+ {
650
+ "name": "columns-top",
651
+ "description": "自定义选项上方内容"
652
+ },
653
+ {
654
+ "name": "columns-bottom",
655
+ "description": "自定义选项下方内容"
656
+ }
657
+ ],
658
+ "events": [
659
+ {
660
+ "name": "confirm",
661
+ "description": "点击完成按钮时触发"
662
+ },
663
+ {
664
+ "name": "cancel",
665
+ "description": "点击取消按钮时触发"
666
+ },
667
+ {
668
+ "name": "change",
669
+ "description": "选项改变时触发"
670
+ }
671
+ ],
672
+ "attributes": [
673
+ {
674
+ "name": "value",
675
+ "default": "-",
676
+ "description": "当前选中项对应的地区码",
632
677
  "options": [],
633
678
  "value": {
634
- "type": "number | string",
679
+ "type": "string",
635
680
  "kind": "expression"
636
681
  }
637
682
  },
638
683
  {
639
- "name": "round",
640
- "default": "`true`",
641
- "description": "是否显示圆角",
684
+ "name": "title",
685
+ "default": "-",
686
+ "description": "顶部栏标题",
642
687
  "options": [],
643
688
  "value": {
644
- "type": "boolean",
689
+ "type": "string",
645
690
  "kind": "expression"
646
691
  }
647
692
  },
648
693
  {
649
- "name": "overlay",
650
- "default": "`true`",
651
- "description": "是否显示遮罩层",
694
+ "name": "confirm-button-text",
695
+ "default": "`确认`",
696
+ "description": "确认按钮文字",
652
697
  "options": [],
653
698
  "value": {
654
- "type": "boolean",
699
+ "type": "string",
655
700
  "kind": "expression"
656
701
  }
657
702
  },
658
703
  {
659
- "name": "overlay-class",
660
- "default": "object_",
661
- "description": "自定义遮罩层类名",
662
- "options": [
663
- "-"
664
- ],
704
+ "name": "cancel-button-text",
705
+ "default": "`取消`",
706
+ "description": "取消按钮文字",
707
+ "options": [],
665
708
  "value": {
666
- "type": "string | Array \\",
709
+ "type": "string",
667
710
  "kind": "expression"
668
711
  }
669
712
  },
670
713
  {
671
- "name": "overlay-style",
714
+ "name": "area-list",
672
715
  "default": "-",
673
- "description": "自定义遮罩层样式",
716
+ "description": "省市区数据,格式见下方",
674
717
  "options": [],
675
718
  "value": {
676
719
  "type": "object",
@@ -678,19 +721,19 @@
678
721
  }
679
722
  },
680
723
  {
681
- "name": "lock-scroll",
682
- "default": "`true`",
683
- "description": "是否锁定背景滚动",
724
+ "name": "columns-placeholder",
725
+ "default": "`[]`",
726
+ "description": "列占位提示文字",
684
727
  "options": [],
685
728
  "value": {
686
- "type": "boolean",
729
+ "type": "string[]",
687
730
  "kind": "expression"
688
731
  }
689
732
  },
690
733
  {
691
- "name": "lazy-render",
692
- "default": "`true`",
693
- "description": "是否在显示弹层时才渲染节点",
734
+ "name": "loading",
735
+ "default": "`false`",
736
+ "description": "是否显示加载状态",
694
737
  "options": [],
695
738
  "value": {
696
739
  "type": "boolean",
@@ -698,9 +741,9 @@
698
741
  }
699
742
  },
700
743
  {
701
- "name": "close-on-popstate",
702
- "default": "`true`",
703
- "description": "是否在页面回退时自动关闭",
744
+ "name": "readonly",
745
+ "default": "`false`",
746
+ "description": "是否为只读状态,只读状态下无法切换选项",
704
747
  "options": [],
705
748
  "value": {
706
749
  "type": "boolean",
@@ -708,138 +751,138 @@
708
751
  }
709
752
  },
710
753
  {
711
- "name": "close-on-click-action",
712
- "default": "`false`",
713
- "description": "是否在点击选项后关闭",
754
+ "name": "item-height",
755
+ "default": "`44`",
756
+ "description": "选项高度,支持 `px` `vw` `vh` `rem` 单位,默认 `px`",
714
757
  "options": [],
715
758
  "value": {
716
- "type": "boolean",
759
+ "type": "number | string",
717
760
  "kind": "expression"
718
761
  }
719
762
  },
720
763
  {
721
- "name": "close-on-click-overlay",
722
- "default": "`true`",
723
- "description": "是否在点击遮罩层后关闭",
764
+ "name": "columns-num",
765
+ "default": "`3`",
766
+ "description": "显示列数,3-省市区,2-省市,1-省",
724
767
  "options": [],
725
768
  "value": {
726
- "type": "boolean",
769
+ "type": "number | string",
727
770
  "kind": "expression"
728
771
  }
729
772
  },
730
773
  {
731
- "name": "safe-area-inset-bottom",
732
- "default": "`true`",
733
- "description": "是否开启[底部安全区适配](#/zh-CN/advanced-usage#di-bu-an-quan-qu-gua-pei)",
774
+ "name": "visible-item-count",
775
+ "default": "`6`",
776
+ "description": "可见的选项个数",
734
777
  "options": [],
735
778
  "value": {
736
- "type": "boolean",
779
+ "type": "number | string",
737
780
  "kind": "expression"
738
781
  }
739
782
  },
740
783
  {
741
- "name": "teleport",
742
- "default": "-",
743
- "description": "指定挂载的节点,等同于 Teleport 组件的 [to 属性](https://v3.cn.vuejs.org/api/built-in-components.html#teleport)",
784
+ "name": "swipe-duration",
785
+ "default": "`1000`",
786
+ "description": "快速滑动时惯性滚动的时长,单位 `ms`",
744
787
  "options": [],
745
788
  "value": {
746
- "type": "string | Element",
789
+ "type": "number | string",
747
790
  "kind": "expression"
748
791
  }
749
792
  },
750
793
  {
751
- "name": "before-close",
794
+ "name": "is-oversea-code",
752
795
  "default": "-",
753
- "description": "关闭前的回调函数,返回 `false` 可阻止关闭,支持返回 Promise",
796
+ "description": "根据地区码校验海外地址,海外地址会划分至单独的分类",
754
797
  "options": [],
755
798
  "value": {
756
- "type": "(action: string) => boolean | Promise\\<boolean\\>",
799
+ "type": "() => boolean",
757
800
  "kind": "expression"
758
801
  }
759
802
  }
760
803
  ]
761
804
  },
762
805
  {
763
- "name": "van-address-list",
806
+ "name": "van-action-sheet",
764
807
  "slots": [
765
808
  {
766
809
  "name": "default",
767
- "description": "在列表下方插入内容"
768
- },
769
- {
770
- "name": "top",
771
- "description": "在顶部插入内容"
810
+ "description": "自定义面板的展示内容"
772
811
  },
773
812
  {
774
- "name": "item-bottom",
775
- "description": "在列表项底部插入内容"
813
+ "name": "description",
814
+ "description": "自定义描述文案"
776
815
  },
777
816
  {
778
- "name": "tag",
779
- "description": "自定义列表项标签内容"
817
+ "name": "cancel",
818
+ "description": "自定义取消按钮内容"
780
819
  }
781
820
  ],
782
821
  "events": [
783
822
  {
784
- "name": "add",
785
- "description": "点击新增按钮时触发"
823
+ "name": "select",
824
+ "description": "点击选项时触发,禁用或加载状态下不会触发"
786
825
  },
787
826
  {
788
- "name": "edit",
789
- "description": "点击编辑按钮时触发"
827
+ "name": "cancel",
828
+ "description": "点击取消按钮时触发"
790
829
  },
791
830
  {
792
- "name": "select",
793
- "description": "切换选中的地址时触发"
831
+ "name": "open",
832
+ "description": "打开面板时触发"
794
833
  },
795
834
  {
796
- "name": "edit-disabled",
797
- "description": "编辑不可配送的地址时触发"
835
+ "name": "close",
836
+ "description": "关闭面板时触发"
798
837
  },
799
838
  {
800
- "name": "select-disabled",
801
- "description": "选中不可配送的地址时触发"
839
+ "name": "opened",
840
+ "description": "打开面板且动画结束后触发"
802
841
  },
803
842
  {
804
- "name": "click-item",
805
- "description": "点击任意地址时触发"
843
+ "name": "closed",
844
+ "description": "关闭面板且动画结束后触发"
845
+ },
846
+ {
847
+ "name": "click-overlay",
848
+ "description": "点击遮罩层时触发"
806
849
  }
807
850
  ],
808
851
  "attributes": [
809
852
  {
810
- "name": "v-model",
811
- "default": "-",
812
- "description": "当前选中地址的 id",
853
+ "name": "v-model:show",
854
+ "default": "`false`",
855
+ "description": "是否显示动作面板",
813
856
  "options": [],
814
857
  "value": {
815
- "type": "string",
858
+ "type": "boolean",
816
859
  "kind": "expression"
817
860
  }
818
861
  },
819
862
  {
820
- "name": "list",
863
+ "name": "actions",
821
864
  "default": "`[]`",
822
- "description": "地址列表",
865
+ "description": "面板选项列表",
823
866
  "options": [],
824
867
  "value": {
825
- "type": "AddressListAddress[]",
868
+ "type": "ActionSheetAction[]",
826
869
  "kind": "expression"
827
870
  }
828
871
  },
829
872
  {
830
- "name": "disabled-list",
831
- "default": "`[]`",
832
- "description": "不可配送地址列表",
873
+ "name": "title",
874
+ "default": "-",
875
+ "description": "顶部标题",
833
876
  "options": [],
834
877
  "value": {
835
- "type": "AddressListAddress[]",
878
+ "type": "string",
836
879
  "kind": "expression"
837
880
  }
838
881
  },
839
882
  {
840
- "name": "disabled-text",
883
+ "name": "cancel-text",
841
884
  "default": "-",
842
- "description": "不可配送提示文案",
885
+ "description": "取消按钮文字",
843
886
  "options": [],
844
887
  "value": {
845
888
  "type": "string",
@@ -847,124 +890,81 @@
847
890
  }
848
891
  },
849
892
  {
850
- "name": "switchable",
851
- "default": "`true`",
852
- "description": "是否允许切换地址",
893
+ "name": "description",
894
+ "default": "-",
895
+ "description": "选项上方的描述信息",
853
896
  "options": [],
854
897
  "value": {
855
- "type": "boolean",
898
+ "type": "string",
856
899
  "kind": "expression"
857
900
  }
858
901
  },
859
902
  {
860
- "name": "add-button-text",
861
- "default": "`新增地址`",
862
- "description": "底部按钮文字",
903
+ "name": "closeable",
904
+ "default": "`true`",
905
+ "description": "是否显示关闭图标",
863
906
  "options": [],
864
907
  "value": {
865
- "type": "string",
908
+ "type": "boolean",
866
909
  "kind": "expression"
867
910
  }
868
911
  },
869
912
  {
870
- "name": "default-tag-text",
871
- "default": "-",
872
- "description": "默认地址标签文字",
913
+ "name": "close-icon",
914
+ "default": "`cross`",
915
+ "description": "关闭[图标名称](#/zh-CN/icon)或图片链接",
873
916
  "options": [],
874
917
  "value": {
875
918
  "type": "string",
876
919
  "kind": "expression"
877
920
  }
878
- }
879
- ]
880
- },
881
- {
882
- "name": "van-area",
883
- "slots": [
884
- {
885
- "name": "toolbar",
886
- "description": "自定义整个顶部栏的内容"
887
921
  },
888
922
  {
889
- "name": "title",
890
- "description": "自定义标题内容"
891
- },
892
- {
893
- "name": "confirm",
894
- "description": "自定义确认按钮内容"
895
- },
896
- {
897
- "name": "cancel",
898
- "description": "自定义取消按钮内容"
899
- },
900
- {
901
- "name": "columns-top",
902
- "description": "自定义选项上方内容"
903
- },
904
- {
905
- "name": "columns-bottom",
906
- "description": "自定义选项下方内容"
907
- }
908
- ],
909
- "events": [
910
- {
911
- "name": "confirm",
912
- "description": "点击完成按钮时触发"
913
- },
914
- {
915
- "name": "cancel",
916
- "description": "点击取消按钮时触发"
917
- },
918
- {
919
- "name": "change",
920
- "description": "选项改变时触发"
921
- }
922
- ],
923
- "attributes": [
924
- {
925
- "name": "value",
926
- "default": "-",
927
- "description": "当前选中项对应的地区码",
923
+ "name": "duration",
924
+ "default": "`0.3`",
925
+ "description": "动画时长,单位秒,设置为 0 可以禁用动画",
928
926
  "options": [],
929
927
  "value": {
930
- "type": "string",
928
+ "type": "number | string",
931
929
  "kind": "expression"
932
930
  }
933
931
  },
934
932
  {
935
- "name": "title",
936
- "default": "-",
937
- "description": "顶部栏标题",
933
+ "name": "round",
934
+ "default": "`true`",
935
+ "description": "是否显示圆角",
938
936
  "options": [],
939
937
  "value": {
940
- "type": "string",
938
+ "type": "boolean",
941
939
  "kind": "expression"
942
940
  }
943
941
  },
944
942
  {
945
- "name": "confirm-button-text",
946
- "default": "`确认`",
947
- "description": "确认按钮文字",
943
+ "name": "overlay",
944
+ "default": "`true`",
945
+ "description": "是否显示遮罩层",
948
946
  "options": [],
949
947
  "value": {
950
- "type": "string",
948
+ "type": "boolean",
951
949
  "kind": "expression"
952
950
  }
953
951
  },
954
952
  {
955
- "name": "cancel-button-text",
956
- "default": "`取消`",
957
- "description": "取消按钮文字",
958
- "options": [],
953
+ "name": "overlay-class",
954
+ "default": "object_",
955
+ "description": "自定义遮罩层类名",
956
+ "options": [
957
+ "-"
958
+ ],
959
959
  "value": {
960
- "type": "string",
960
+ "type": "string | Array \\",
961
961
  "kind": "expression"
962
962
  }
963
963
  },
964
964
  {
965
- "name": "area-list",
965
+ "name": "overlay-style",
966
966
  "default": "-",
967
- "description": "省市区数据,格式见下方",
967
+ "description": "自定义遮罩层样式",
968
968
  "options": [],
969
969
  "value": {
970
970
  "type": "object",
@@ -972,19 +972,19 @@
972
972
  }
973
973
  },
974
974
  {
975
- "name": "columns-placeholder",
976
- "default": "`[]`",
977
- "description": "列占位提示文字",
975
+ "name": "lock-scroll",
976
+ "default": "`true`",
977
+ "description": "是否锁定背景滚动",
978
978
  "options": [],
979
979
  "value": {
980
- "type": "string[]",
980
+ "type": "boolean",
981
981
  "kind": "expression"
982
982
  }
983
983
  },
984
984
  {
985
- "name": "loading",
986
- "default": "`false`",
987
- "description": "是否显示加载状态",
985
+ "name": "lazy-render",
986
+ "default": "`true`",
987
+ "description": "是否在显示弹层时才渲染节点",
988
988
  "options": [],
989
989
  "value": {
990
990
  "type": "boolean",
@@ -992,9 +992,9 @@
992
992
  }
993
993
  },
994
994
  {
995
- "name": "readonly",
996
- "default": "`false`",
997
- "description": "是否为只读状态,只读状态下无法切换选项",
995
+ "name": "close-on-popstate",
996
+ "default": "`true`",
997
+ "description": "是否在页面回退时自动关闭",
998
998
  "options": [],
999
999
  "value": {
1000
1000
  "type": "boolean",
@@ -1002,52 +1002,52 @@
1002
1002
  }
1003
1003
  },
1004
1004
  {
1005
- "name": "item-height",
1006
- "default": "`44`",
1007
- "description": "选项高度,支持 `px` `vw` `vh` `rem` 单位,默认 `px`",
1005
+ "name": "close-on-click-action",
1006
+ "default": "`false`",
1007
+ "description": "是否在点击选项后关闭",
1008
1008
  "options": [],
1009
1009
  "value": {
1010
- "type": "number | string",
1010
+ "type": "boolean",
1011
1011
  "kind": "expression"
1012
1012
  }
1013
1013
  },
1014
1014
  {
1015
- "name": "columns-num",
1016
- "default": "`3`",
1017
- "description": "显示列数,3-省市区,2-省市,1-省",
1015
+ "name": "close-on-click-overlay",
1016
+ "default": "`true`",
1017
+ "description": "是否在点击遮罩层后关闭",
1018
1018
  "options": [],
1019
1019
  "value": {
1020
- "type": "number | string",
1020
+ "type": "boolean",
1021
1021
  "kind": "expression"
1022
1022
  }
1023
1023
  },
1024
1024
  {
1025
- "name": "visible-item-count",
1026
- "default": "`6`",
1027
- "description": "可见的选项个数",
1025
+ "name": "safe-area-inset-bottom",
1026
+ "default": "`true`",
1027
+ "description": "是否开启[底部安全区适配](#/zh-CN/advanced-usage#di-bu-an-quan-qu-gua-pei)",
1028
1028
  "options": [],
1029
1029
  "value": {
1030
- "type": "number | string",
1030
+ "type": "boolean",
1031
1031
  "kind": "expression"
1032
1032
  }
1033
1033
  },
1034
1034
  {
1035
- "name": "swipe-duration",
1036
- "default": "`1000`",
1037
- "description": "快速滑动时惯性滚动的时长,单位 `ms`",
1035
+ "name": "teleport",
1036
+ "default": "-",
1037
+ "description": "指定挂载的节点,等同于 Teleport 组件的 [to 属性](https://v3.cn.vuejs.org/api/built-in-components.html#teleport)",
1038
1038
  "options": [],
1039
1039
  "value": {
1040
- "type": "number | string",
1040
+ "type": "string | Element",
1041
1041
  "kind": "expression"
1042
1042
  }
1043
1043
  },
1044
1044
  {
1045
- "name": "is-oversea-code",
1045
+ "name": "before-close",
1046
1046
  "default": "-",
1047
- "description": "根据地区码校验海外地址,海外地址会划分至单独的分类",
1047
+ "description": "关闭前的回调函数,返回 `false` 可阻止关闭,支持返回 Promise",
1048
1048
  "options": [],
1049
1049
  "value": {
1050
- "type": "() => boolean",
1050
+ "type": "(action: string) => boolean | Promise\\<boolean\\>",
1051
1051
  "kind": "expression"
1052
1052
  }
1053
1053
  }