vant 3.5.3 → 3.5.4

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 (98) hide show
  1. package/changelog.generated.md +12 -25
  2. package/es/index.d.ts +1 -1
  3. package/es/index.mjs +1 -1
  4. package/lib/index.d.ts +1 -1
  5. package/lib/index.js +1 -1
  6. package/lib/vant.cjs.js +1 -1
  7. package/lib/vant.es.js +1 -1
  8. package/lib/vant.js +1 -74
  9. package/lib/vant.min.js +1 -1
  10. package/lib/web-types.json +1510 -1510
  11. package/package.json +1 -1
  12. package/lib/.DS_Store +0 -0
  13. package/lib/action-bar/.DS_Store +0 -0
  14. package/lib/action-bar-button/.DS_Store +0 -0
  15. package/lib/action-bar-icon/.DS_Store +0 -0
  16. package/lib/action-sheet/.DS_Store +0 -0
  17. package/lib/address-edit/.DS_Store +0 -0
  18. package/lib/address-list/.DS_Store +0 -0
  19. package/lib/area/.DS_Store +0 -0
  20. package/lib/badge/.DS_Store +0 -0
  21. package/lib/button/.DS_Store +0 -0
  22. package/lib/calendar/.DS_Store +0 -0
  23. package/lib/card/.DS_Store +0 -0
  24. package/lib/cascader/.DS_Store +0 -0
  25. package/lib/cell/.DS_Store +0 -0
  26. package/lib/cell-group/.DS_Store +0 -0
  27. package/lib/checkbox/.DS_Store +0 -0
  28. package/lib/checkbox-group/.DS_Store +0 -0
  29. package/lib/circle/.DS_Store +0 -0
  30. package/lib/col/.DS_Store +0 -0
  31. package/lib/collapse/.DS_Store +0 -0
  32. package/lib/collapse-item/.DS_Store +0 -0
  33. package/lib/config-provider/.DS_Store +0 -0
  34. package/lib/contact-card/.DS_Store +0 -0
  35. package/lib/contact-edit/.DS_Store +0 -0
  36. package/lib/contact-list/.DS_Store +0 -0
  37. package/lib/count-down/.DS_Store +0 -0
  38. package/lib/coupon/.DS_Store +0 -0
  39. package/lib/coupon-cell/.DS_Store +0 -0
  40. package/lib/coupon-list/.DS_Store +0 -0
  41. package/lib/datetime-picker/.DS_Store +0 -0
  42. package/lib/dialog/.DS_Store +0 -0
  43. package/lib/divider/.DS_Store +0 -0
  44. package/lib/dropdown-item/.DS_Store +0 -0
  45. package/lib/dropdown-menu/.DS_Store +0 -0
  46. package/lib/empty/.DS_Store +0 -0
  47. package/lib/field/.DS_Store +0 -0
  48. package/lib/form/.DS_Store +0 -0
  49. package/lib/grid/.DS_Store +0 -0
  50. package/lib/grid-item/.DS_Store +0 -0
  51. package/lib/icon/.DS_Store +0 -0
  52. package/lib/image/.DS_Store +0 -0
  53. package/lib/image-preview/.DS_Store +0 -0
  54. package/lib/index-anchor/.DS_Store +0 -0
  55. package/lib/index-bar/.DS_Store +0 -0
  56. package/lib/lazyload/.DS_Store +0 -0
  57. package/lib/list/.DS_Store +0 -0
  58. package/lib/loading/.DS_Store +0 -0
  59. package/lib/locale/.DS_Store +0 -0
  60. package/lib/nav-bar/.DS_Store +0 -0
  61. package/lib/notice-bar/.DS_Store +0 -0
  62. package/lib/notify/.DS_Store +0 -0
  63. package/lib/number-keyboard/.DS_Store +0 -0
  64. package/lib/overlay/.DS_Store +0 -0
  65. package/lib/pagination/.DS_Store +0 -0
  66. package/lib/password-input/.DS_Store +0 -0
  67. package/lib/picker/.DS_Store +0 -0
  68. package/lib/popover/.DS_Store +0 -0
  69. package/lib/popup/.DS_Store +0 -0
  70. package/lib/progress/.DS_Store +0 -0
  71. package/lib/pull-refresh/.DS_Store +0 -0
  72. package/lib/radio/.DS_Store +0 -0
  73. package/lib/radio-group/.DS_Store +0 -0
  74. package/lib/rate/.DS_Store +0 -0
  75. package/lib/row/.DS_Store +0 -0
  76. package/lib/search/.DS_Store +0 -0
  77. package/lib/share-sheet/.DS_Store +0 -0
  78. package/lib/sidebar/.DS_Store +0 -0
  79. package/lib/sidebar-item/.DS_Store +0 -0
  80. package/lib/skeleton/.DS_Store +0 -0
  81. package/lib/slider/.DS_Store +0 -0
  82. package/lib/step/.DS_Store +0 -0
  83. package/lib/stepper/.DS_Store +0 -0
  84. package/lib/steps/.DS_Store +0 -0
  85. package/lib/sticky/.DS_Store +0 -0
  86. package/lib/submit-bar/.DS_Store +0 -0
  87. package/lib/swipe/.DS_Store +0 -0
  88. package/lib/swipe-cell/.DS_Store +0 -0
  89. package/lib/swipe-item/.DS_Store +0 -0
  90. package/lib/switch/.DS_Store +0 -0
  91. package/lib/tab/.DS_Store +0 -0
  92. package/lib/tabbar/.DS_Store +0 -0
  93. package/lib/tabbar-item/.DS_Store +0 -0
  94. package/lib/tabs/.DS_Store +0 -0
  95. package/lib/tag/.DS_Store +0 -0
  96. package/lib/toast/.DS_Store +0 -0
  97. package/lib/tree-select/.DS_Store +0 -0
  98. package/lib/uploader/.DS_Store +0 -0
@@ -1,3 +1,14 @@
1
+ ### [v3.5.4](https://github.com/vant-ui/vant/compare/v3.5.3...v3.5.4)
2
+
3
+ `2022-08-06`
4
+
5
+ **Bug Fixes**
6
+
7
+ - @vant/cli: should replace NODE_ENV in vite v3 [#10887](https://github.com/vant-ui/vant/issues/10887)
8
+
9
+ **Document**
10
+
11
+ - changelog: vant@3.5.3 [#10869](https://github.com/vant-ui/vant/issues/10869)
1
12
  ### [v3.5.3](https://github.com/vant-ui/vant/compare/v3.5.2...v3.5.3)
2
13
 
3
14
  `2022-07-31`
@@ -39,29 +50,5 @@
39
50
  **release**
40
51
 
41
52
  - @vant/cli 4.0.3 [e4fc6f](https://github.com/vant-ui/vant/commit/e4fc6f9081728d3f59ef8d60c18bc5e7fa72d571)
53
+ - 3.5.3 [d96c42](https://github.com/vant-ui/vant/commit/d96c4228f5c16884d10dc523217194d138bf35c6)
42
54
  - create-vant-cli-app 2.0.1 [c628a6](https://github.com/vant-ui/vant/commit/c628a667703b38e3999e1953950a187e97a45efb)
43
- ### [v3.5.2](https://github.com/vant-ui/vant/compare/v3.5.1...v3.5.2)
44
-
45
- `2022-06-26`
46
-
47
- **Bug Fixes**
48
-
49
- - List: element with `overflow: overlay` style should be considered a scroll container [#10743](https://github.com/vant-ui/vant/issues/10743)
50
-
51
- **Document**
52
-
53
- - add guide of function component style [#10728](https://github.com/vant-ui/vant/issues/10728)
54
- - changelog: 3.5.1 [ffefe3](https://github.com/vant-ui/vant/commit/ffefe3002f674f644b90f8fdfb04dc004a3a8c4f)
55
- - Switch: fix custom node demo [#10720](https://github.com/vant-ui/vant/issues/10720)
56
-
57
- **Feature**
58
-
59
- - ActionBar: add placeholder prop [#10724](https://github.com/vant-ui/vant/issues/10724)
60
- - cli: add build.bundleOptions config [#10751](https://github.com/vant-ui/vant/issues/10751)
61
- - cli: add css.removeSourceFile config [#10750](https://github.com/vant-ui/vant/issues/10750)
62
- - Field: add start-validate and end-validate event [#10726](https://github.com/vant-ui/vant/issues/10726)
63
- - SubmitBar: add placeholder prop [#10725](https://github.com/vant-ui/vant/issues/10725)
64
-
65
- **release**
66
-
67
- - 3.5.2 [52957e](https://github.com/vant-ui/vant/commit/52957ec244f2e33fff7768c1a52e29fc6589019d)
package/es/index.d.ts CHANGED
@@ -90,4 +90,4 @@ declare namespace _default {
90
90
  }
91
91
  export default _default;
92
92
  export function install(app: any): void;
93
- export const version: "3.5.3";
93
+ export const version: "3.5.4";
package/es/index.mjs CHANGED
@@ -83,7 +83,7 @@ import { Tag } from "./tag/index.mjs";
83
83
  import { Toast } from "./toast/index.mjs";
84
84
  import { TreeSelect } from "./tree-select/index.mjs";
85
85
  import { Uploader } from "./uploader/index.mjs";
86
- const version = "3.5.3";
86
+ const version = "3.5.4";
87
87
  function install(app) {
88
88
  const components = [
89
89
  ActionBar,
package/lib/index.d.ts CHANGED
@@ -90,4 +90,4 @@ declare namespace _default {
90
90
  }
91
91
  export default _default;
92
92
  export function install(app: any): void;
93
- export const version: "3.5.3";
93
+ export const version: "3.5.4";
package/lib/index.js CHANGED
@@ -194,7 +194,7 @@ __reExport(stdin_exports, require("./tag"), module.exports);
194
194
  __reExport(stdin_exports, require("./toast"), module.exports);
195
195
  __reExport(stdin_exports, require("./tree-select"), module.exports);
196
196
  __reExport(stdin_exports, require("./uploader"), module.exports);
197
- const version = "3.5.3";
197
+ const version = "3.5.4";
198
198
  function install(app) {
199
199
  const components = [
200
200
  import_action_bar.ActionBar,
package/lib/vant.cjs.js CHANGED
@@ -14697,7 +14697,7 @@ const Lazyload = {
14697
14697
  });
14698
14698
  }
14699
14699
  };
14700
- const version = "3.5.3";
14700
+ const version = "3.5.4";
14701
14701
  function install(app) {
14702
14702
  const components = [
14703
14703
  ActionBar,
package/lib/vant.es.js CHANGED
@@ -14695,7 +14695,7 @@ const Lazyload = {
14695
14695
  });
14696
14696
  }
14697
14697
  };
14698
- const version = "3.5.3";
14698
+ const version = "3.5.4";
14699
14699
  function install(app) {
14700
14700
  const components = [
14701
14701
  ActionBar,
package/lib/vant.js CHANGED
@@ -2101,14 +2101,6 @@
2101
2101
  emit,
2102
2102
  slots
2103
2103
  }) {
2104
- if (process.env.NODE_ENV !== "production") {
2105
- if (slots.default) {
2106
- console.warn('[Vant] Picker: "default" slot is deprecated, please use "toolbar" slot instead.');
2107
- }
2108
- if (props.valueKey) {
2109
- console.warn('[Vant] Picker: "valueKey" prop is deprecated, please use "columnsFieldNames" prop instead.');
2110
- }
2111
- }
2112
2104
  const hasOptions = vue.ref(false);
2113
2105
  const formattedColumns = vue.ref([]);
2114
2106
  const columnsFieldNames = vue.computed(() => {
@@ -2959,9 +2951,6 @@
2959
2951
  function useId$1() {
2960
2952
  const vm = vue.getCurrentInstance();
2961
2953
  const { name: name2 = "unknown" } = (vm == null ? void 0 : vm.type) || {};
2962
- if (process.env.NODE_ENV === "test") {
2963
- return name2;
2964
- }
2965
2954
  return `${name2}-${++current}`;
2966
2955
  }
2967
2956
  const [name$1e, bem$1a] = createNamespace("field");
@@ -6352,16 +6341,6 @@
6352
6341
  emit,
6353
6342
  slots
6354
6343
  }) {
6355
- var _a, _b;
6356
- if (process.env.NODE_ENV !== "production") {
6357
- const props2 = (_b = (_a = vue.getCurrentInstance()) == null ? void 0 : _a.vnode) == null ? void 0 : _b.props;
6358
- if (props2 && "onClick" in props2) {
6359
- console.warn('[Vant] Tabs: "click" event is deprecated, using "click-tab" instead.');
6360
- }
6361
- if (props2 && "onDisabled" in props2) {
6362
- console.warn('[Vant] Tabs: "disabled" event is deprecated, using "click-tab" instead.');
6363
- }
6364
- }
6365
6344
  let tabHeight;
6366
6345
  let lockScroll;
6367
6346
  let stickyFixed;
@@ -6687,9 +6666,6 @@
6687
6666
  index
6688
6667
  } = useParent(SWIPE_KEY);
6689
6668
  if (!parent) {
6690
- if (process.env.NODE_ENV !== "production") {
6691
- console.error("[Vant] <SwipeItem> must be a child component of <Swipe>.");
6692
- }
6693
6669
  return;
6694
6670
  }
6695
6671
  const style = vue.computed(() => {
@@ -6768,9 +6744,6 @@
6768
6744
  index
6769
6745
  } = useParent(TABS_KEY);
6770
6746
  if (!parent) {
6771
- if (process.env.NODE_ENV !== "production") {
6772
- console.error("[Vant] <Tab> must be a child component of <Tabs>.");
6773
- }
6774
6747
  return;
6775
6748
  }
6776
6749
  const getName = () => {
@@ -7533,17 +7506,6 @@
7533
7506
  default: ""
7534
7507
  }
7535
7508
  };
7536
- function validateModelValue(modelValue, accordion) {
7537
- if (accordion && Array.isArray(modelValue)) {
7538
- console.error('[Vant] Collapse: "v-model" should not be Array in accordion mode');
7539
- return false;
7540
- }
7541
- if (!accordion && !Array.isArray(modelValue)) {
7542
- console.error('[Vant] Collapse: "v-model" should be Array in non-accordion mode');
7543
- return false;
7544
- }
7545
- return true;
7546
- }
7547
7509
  var stdin_default$S = vue.defineComponent({
7548
7510
  name: name$M,
7549
7511
  props: collapseProps,
@@ -7600,9 +7562,6 @@
7600
7562
  accordion,
7601
7563
  modelValue
7602
7564
  } = props;
7603
- if (process.env.NODE_ENV !== "production" && !validateModelValue(modelValue, accordion)) {
7604
- return false;
7605
- }
7606
7565
  return accordion ? modelValue === name2 : modelValue.includes(name2);
7607
7566
  };
7608
7567
  useExpose({
@@ -7645,9 +7604,6 @@
7645
7604
  index
7646
7605
  } = useParent(COLLAPSE_KEY);
7647
7606
  if (!parent) {
7648
- if (process.env.NODE_ENV !== "production") {
7649
- console.error("[Vant] <CollapseItem> must be a child component of <Collapse>.");
7650
- }
7651
7607
  return;
7652
7608
  }
7653
7609
  const name2 = vue.computed(() => {
@@ -9515,9 +9471,6 @@
9515
9471
  index
9516
9472
  } = useParent(DROPDOWN_KEY);
9517
9473
  if (!parent) {
9518
- if (process.env.NODE_ENV !== "production") {
9519
- console.error("[Vant] <DropdownItem> must be a child component of <DropdownMenu>.");
9520
- }
9521
9474
  return;
9522
9475
  }
9523
9476
  const getEmitter = (name2) => () => emit(name2);
@@ -9718,9 +9671,6 @@
9718
9671
  } = useParent(GRID_KEY);
9719
9672
  const route2 = useRoute();
9720
9673
  if (!parent) {
9721
- if (process.env.NODE_ENV !== "production") {
9722
- console.error("[Vant] <GridItem> must be a child component of <Grid>.");
9723
- }
9724
9674
  return;
9725
9675
  }
9726
9676
  const rootStyle = vue.computed(() => {
@@ -10515,9 +10465,6 @@
10515
10465
  parent
10516
10466
  } = useParent(INDEX_BAR_KEY);
10517
10467
  if (!parent) {
10518
- if (process.env.NODE_ENV !== "production") {
10519
- console.error("[Vant] <IndexAnchor> must be a child component of <IndexBar>.");
10520
- }
10521
10468
  return;
10522
10469
  }
10523
10470
  const isSticky = () => state.active && parent.props.sticky;
@@ -13362,9 +13309,6 @@
13362
13309
  index
13363
13310
  } = useParent(SIDEBAR_KEY);
13364
13311
  if (!parent) {
13365
- if (process.env.NODE_ENV !== "production") {
13366
- console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");
13367
- }
13368
13312
  return;
13369
13313
  }
13370
13314
  const onClick = () => {
@@ -13792,9 +13736,6 @@
13792
13736
  index
13793
13737
  } = useParent(STEPS_KEY);
13794
13738
  if (!parent) {
13795
- if (process.env.NODE_ENV !== "production") {
13796
- console.error("[Vant] <Step> must be a child component of <Steps>.");
13797
- }
13798
13739
  return;
13799
13740
  }
13800
13741
  const parentProps = parent.props;
@@ -14492,9 +14433,6 @@
14492
14433
  index
14493
14434
  } = useParent(TABBAR_KEY);
14494
14435
  if (!parent) {
14495
- if (process.env.NODE_ENV !== "production") {
14496
- console.error("[Vant] <TabbarItem> must be a child component of <Tabbar>.");
14497
- }
14498
14436
  return;
14499
14437
  }
14500
14438
  const active = vue.computed(() => {
@@ -15316,15 +15254,10 @@
15316
15254
  }, () => {
15317
15255
  cb();
15318
15256
  this.state.loading = false;
15319
- if (process.env.NODE_ENV !== "production" && !this.options.silent)
15320
- console.warn(`[@vant/lazyload] load failed with loading image(${this.loading})`);
15321
15257
  });
15322
15258
  }
15323
15259
  load(onFinish = noop) {
15324
15260
  if (this.attempt > this.options.attempt - 1 && this.state.error) {
15325
- if (process.env.NODE_ENV !== "production" && !this.options.silent) {
15326
- console.log(`[@vant/lazyload] ${this.src} tried too more than ${this.options.attempt} times`);
15327
- }
15328
15261
  onFinish();
15329
15262
  return;
15330
15263
  }
@@ -15711,9 +15644,6 @@
15711
15644
  let src = value;
15712
15645
  let { loading, error } = this.options;
15713
15646
  if (isObject(value)) {
15714
- if (process.env.NODE_ENV !== "production" && !value.src && !this.options.silent) {
15715
- console.error("[@vant/lazyload] miss src with " + value);
15716
- }
15717
15647
  ({ src } = value);
15718
15648
  loading = value.loading || this.options.loading;
15719
15649
  error = value.error || this.options.error;
@@ -15901,9 +15831,6 @@
15901
15831
  },
15902
15832
  load(onFinish = noop) {
15903
15833
  if (this.state.attempt > this.options.attempt - 1 && this.state.error) {
15904
- if (process.env.NODE_ENV !== "production" && !lazyManager.options.silent) {
15905
- console.log(`[@vant/lazyload] ${this.options.src} tried too more than ${this.options.attempt} times`);
15906
- }
15907
15834
  onFinish();
15908
15835
  return;
15909
15836
  }
@@ -15943,7 +15870,7 @@
15943
15870
  });
15944
15871
  }
15945
15872
  };
15946
- const version = "3.5.3";
15873
+ const version = "3.5.4";
15947
15874
  function install(app) {
15948
15875
  const components = [
15949
15876
  ActionBar,