vant 3.5.1 → 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 (91) hide show
  1. package/LICENSE +10 -0
  2. package/README.md +13 -13
  3. package/changelog.generated.md +54 -0
  4. package/es/action-bar/ActionBar.d.ts +4 -0
  5. package/es/action-bar/ActionBar.mjs +13 -2
  6. package/es/action-bar/index.d.ts +3 -0
  7. package/es/button/index.less +1 -1
  8. package/es/calendar/Calendar.mjs +3 -1
  9. package/es/calendar/types.d.ts +1 -0
  10. package/es/cell/Cell.d.ts +1 -1
  11. package/es/cell/index.d.ts +1 -1
  12. package/es/collapse/Collapse.d.ts +8 -1
  13. package/es/collapse/Collapse.mjs +28 -1
  14. package/es/collapse/index.d.ts +1 -1
  15. package/es/collapse-item/CollapseItem.d.ts +1 -1
  16. package/es/collapse-item/CollapseItem.mjs +3 -1
  17. package/es/collapse-item/index.d.ts +1 -1
  18. package/es/collapse-item/index.less +1 -1
  19. package/es/composables/use-height.d.ts +1 -1
  20. package/es/composables/use-height.mjs +6 -2
  21. package/es/composables/use-placeholder.mjs +1 -1
  22. package/es/dialog/Dialog.d.ts +1 -1
  23. package/es/field/Field.d.ts +4 -2
  24. package/es/field/Field.mjs +7 -1
  25. package/es/field/index.d.ts +4 -2
  26. package/es/field/index.less +1 -1
  27. package/es/grid-item/index.less +1 -1
  28. package/es/index.d.ts +1 -1
  29. package/es/index.mjs +1 -1
  30. package/es/locale/index.d.ts +1 -1
  31. package/es/popover/Popover.mjs +17 -18
  32. package/es/sidebar-item/index.less +1 -1
  33. package/es/submit-bar/SubmitBar.d.ts +4 -0
  34. package/es/submit-bar/SubmitBar.mjs +13 -2
  35. package/es/submit-bar/index.d.ts +3 -0
  36. package/es/swipe/index.less +1 -1
  37. package/es/switch/index.less +1 -1
  38. package/es/toast/index.less +1 -1
  39. package/es/uploader/Uploader.mjs +1 -1
  40. package/es/utils/basic.d.ts +3 -3
  41. package/es/utils/create.d.ts +1 -1
  42. package/lib/action-bar/ActionBar.d.ts +4 -0
  43. package/lib/action-bar/ActionBar.js +12 -1
  44. package/lib/action-bar/index.d.ts +3 -0
  45. package/lib/button/index.less +1 -1
  46. package/lib/calendar/Calendar.js +3 -1
  47. package/lib/calendar/types.d.ts +1 -0
  48. package/lib/cell/Cell.d.ts +1 -1
  49. package/lib/cell/index.d.ts +1 -1
  50. package/lib/collapse/Collapse.d.ts +8 -1
  51. package/lib/collapse/Collapse.js +28 -1
  52. package/lib/collapse/index.d.ts +1 -1
  53. package/lib/collapse-item/CollapseItem.d.ts +1 -1
  54. package/lib/collapse-item/CollapseItem.js +3 -1
  55. package/lib/collapse-item/index.d.ts +1 -1
  56. package/lib/collapse-item/index.less +1 -1
  57. package/lib/composables/use-height.d.ts +1 -1
  58. package/lib/composables/use-height.js +6 -2
  59. package/lib/composables/use-placeholder.js +1 -1
  60. package/lib/dialog/Dialog.d.ts +1 -1
  61. package/lib/field/Field.d.ts +4 -2
  62. package/lib/field/Field.js +7 -1
  63. package/lib/field/index.d.ts +4 -2
  64. package/lib/field/index.less +1 -1
  65. package/lib/grid-item/index.less +1 -1
  66. package/lib/index.d.ts +1 -1
  67. package/lib/index.js +1 -1
  68. package/lib/locale/index.d.ts +1 -1
  69. package/lib/popover/Popover.js +17 -18
  70. package/lib/sidebar-item/index.less +1 -1
  71. package/lib/submit-bar/SubmitBar.d.ts +4 -0
  72. package/lib/submit-bar/SubmitBar.js +12 -1
  73. package/lib/submit-bar/index.d.ts +3 -0
  74. package/lib/swipe/index.less +1 -1
  75. package/lib/switch/index.less +1 -1
  76. package/lib/toast/index.less +1 -1
  77. package/lib/uploader/Uploader.js +1 -1
  78. package/lib/utils/basic.d.ts +3 -3
  79. package/lib/utils/create.d.ts +1 -1
  80. package/lib/vant.cjs.js +182 -50
  81. package/lib/vant.es.js +271 -49
  82. package/lib/vant.js +107 -48
  83. package/lib/vant.min.js +1 -1
  84. package/{vetur → lib}/web-types.json +1346 -1312
  85. package/package.json +9 -14
  86. package/lib/ssr.js +0 -7
  87. package/lib/ssr.mjs +0 -1
  88. package/lib/vant.cjs.min.js +0 -1
  89. package/lib/vant.es.min.js +0 -14667
  90. package/vetur/attributes.json +0 -3474
  91. package/vetur/tags.json +0 -1202
package/lib/vant.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, useToggle, raf, useScrollParent, usePageVisibility, doubleRaf, cancelRaf, useCountDown, useClickAway, inBrowser as inBrowser$1 } from "@vant/use";
2
- import { unref, ref, reactive, defineComponent, createVNode, getCurrentInstance, computed, provide, inject, mergeProps, onDeactivated, onBeforeUnmount, watch, Transition, withDirectives, vShow, nextTick, onMounted, onActivated, Teleport, Fragment, createTextVNode, createApp, onUnmounted, onBeforeUpdate, resolveDirective, withKeys, onUpdated, watchEffect, h } from "vue";
3
- import { createPopper, offsetModifier } from "@vant/popperjs";
2
+ import { unref, ref, reactive, onMounted, nextTick, createVNode, defineComponent, getCurrentInstance, computed, provide, inject, mergeProps, onDeactivated, onBeforeUnmount, watch, Transition, withDirectives, vShow, onActivated, Teleport, Fragment, createTextVNode, createApp, onUnmounted, onBeforeUpdate, resolveDirective, withKeys, onUpdated, watchEffect, h } from "vue";
3
+ import { offsetModifier, createPopper } from "@vant/popperjs";
4
4
  function noop() {
5
5
  }
6
6
  const extend = Object.assign;
@@ -393,9 +393,34 @@ function withInstall(options) {
393
393
  };
394
394
  return options;
395
395
  }
396
+ const useHeight = (element, withSafeArea) => {
397
+ const height = ref();
398
+ const setHeight = () => {
399
+ height.value = useRect(element).height;
400
+ };
401
+ onMounted(() => {
402
+ nextTick(setHeight);
403
+ if (withSafeArea) {
404
+ for (let i = 1; i <= 3; i++) {
405
+ setTimeout(setHeight, 100 * i);
406
+ }
407
+ }
408
+ });
409
+ return height;
410
+ };
411
+ function usePlaceholder(contentRef, bem2) {
412
+ const height = useHeight(contentRef, true);
413
+ return (renderContent) => createVNode("div", {
414
+ "class": bem2("placeholder"),
415
+ "style": {
416
+ height: height.value ? `${height.value}px` : void 0
417
+ }
418
+ }, [renderContent()]);
419
+ }
396
420
  const [name$1u, bem$1q] = createNamespace("action-bar");
397
421
  const ACTION_BAR_KEY = Symbol(name$1u);
398
422
  const actionBarProps = {
423
+ placeholder: Boolean,
399
424
  safeAreaInsetBottom: truthProp
400
425
  };
401
426
  var stdin_default$1B = defineComponent({
@@ -404,18 +429,27 @@ var stdin_default$1B = defineComponent({
404
429
  setup(props, {
405
430
  slots
406
431
  }) {
432
+ const root = ref();
433
+ const renderPlaceholder = usePlaceholder(root, bem$1q);
407
434
  const {
408
435
  linkChildren
409
436
  } = useChildren(ACTION_BAR_KEY);
410
437
  linkChildren();
411
- return () => {
438
+ const renderActionBar = () => {
412
439
  var _a;
413
440
  return createVNode("div", {
441
+ "ref": root,
414
442
  "class": [bem$1q(), {
415
443
  "van-safe-area-bottom": props.safeAreaInsetBottom
416
444
  }]
417
445
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
418
446
  };
447
+ return () => {
448
+ if (props.placeholder) {
449
+ return renderPlaceholder(renderActionBar);
450
+ }
451
+ return renderActionBar();
452
+ };
419
453
  }
420
454
  });
421
455
  const ActionBar = withInstall(stdin_default$1B);
@@ -1713,6 +1747,14 @@ var stdin_default$1p = defineComponent({
1713
1747
  emit,
1714
1748
  slots
1715
1749
  }) {
1750
+ if (process.env.NODE_ENV !== "production") {
1751
+ if (slots.default) {
1752
+ console.warn('[Vant] Picker: "default" slot is deprecated, please use "toolbar" slot instead.');
1753
+ }
1754
+ if (props.valueKey) {
1755
+ console.warn('[Vant] Picker: "valueKey" prop is deprecated, please use "columnsFieldNames" prop instead.');
1756
+ }
1757
+ }
1716
1758
  const hasOptions = ref(false);
1717
1759
  const formattedColumns = ref([]);
1718
1760
  const columnsFieldNames = computed(() => {
@@ -2563,6 +2605,9 @@ let current = 0;
2563
2605
  function useId$1() {
2564
2606
  const vm = getCurrentInstance();
2565
2607
  const { name: name2 = "unknown" } = (vm == null ? void 0 : vm.type) || {};
2608
+ if (process.env.NODE_ENV === "test") {
2609
+ return name2;
2610
+ }
2566
2611
  return `${name2}-${++current}`;
2567
2612
  }
2568
2613
  const [name$1e, bem$1a] = createNamespace("field");
@@ -2615,7 +2660,7 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
2615
2660
  var stdin_default$1l = defineComponent({
2616
2661
  name: name$1e,
2617
2662
  props: fieldProps,
2618
- emits: ["blur", "focus", "clear", "keypress", "click-input", "click-left-icon", "click-right-icon", "update:modelValue"],
2663
+ emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "update:modelValue"],
2619
2664
  setup(props, {
2620
2665
  emit,
2621
2666
  slots
@@ -2689,18 +2734,24 @@ var stdin_default$1l = defineComponent({
2689
2734
  state.status = "unvalidated";
2690
2735
  state.validateMessage = "";
2691
2736
  };
2737
+ const endValidate = () => emit("end-validate", {
2738
+ status: state.status
2739
+ });
2692
2740
  const validate = (rules = props.rules) => new Promise((resolve) => {
2693
2741
  resetValidation();
2694
2742
  if (rules) {
2743
+ emit("start-validate");
2695
2744
  runRules(rules).then(() => {
2696
2745
  if (state.status === "failed") {
2697
2746
  resolve({
2698
2747
  name: props.name,
2699
2748
  message: state.validateMessage
2700
2749
  });
2750
+ endValidate();
2701
2751
  } else {
2702
2752
  state.status = "passed";
2703
2753
  resolve();
2754
+ endValidate();
2704
2755
  }
2705
2756
  });
2706
2757
  } else {
@@ -4245,17 +4296,6 @@ const proxyPickerMethods = (picker, callback) => {
4245
4296
  }
4246
4297
  });
4247
4298
  };
4248
- const useHeight = (element) => {
4249
- const height = ref();
4250
- const setHeight = () => {
4251
- height.value = useRect(element).height;
4252
- };
4253
- onMounted(() => {
4254
- nextTick(setHeight);
4255
- setTimeout(setHeight, 100);
4256
- });
4257
- return height;
4258
- };
4259
4299
  const [name$13] = createNamespace("calendar-day");
4260
4300
  var stdin_default$1a = defineComponent({
4261
4301
  name: name$13,
@@ -4748,6 +4788,7 @@ var stdin_default$17 = defineComponent({
4748
4788
  }
4749
4789
  return !currentDate.value;
4750
4790
  });
4791
+ const getSelectedDate = () => currentDate.value;
4751
4792
  const onScroll = () => {
4752
4793
  const top = getScrollTop(bodyRef.value);
4753
4794
  const bottom = top + bodyHeight;
@@ -4990,7 +5031,8 @@ var stdin_default$17 = defineComponent({
4990
5031
  });
4991
5032
  useExpose({
4992
5033
  reset,
4993
- scrollToDate
5034
+ scrollToDate,
5035
+ getSelectedDate
4994
5036
  });
4995
5037
  onMountedOrActivated(init);
4996
5038
  return () => {
@@ -5956,6 +5998,16 @@ var stdin_default$10 = defineComponent({
5956
5998
  emit,
5957
5999
  slots
5958
6000
  }) {
6001
+ var _a, _b;
6002
+ if (process.env.NODE_ENV !== "production") {
6003
+ const props2 = (_b = (_a = getCurrentInstance()) == null ? void 0 : _a.vnode) == null ? void 0 : _b.props;
6004
+ if (props2 && "onClick" in props2) {
6005
+ console.warn('[Vant] Tabs: "click" event is deprecated, using "click-tab" instead.');
6006
+ }
6007
+ if (props2 && "onDisabled" in props2) {
6008
+ console.warn('[Vant] Tabs: "disabled" event is deprecated, using "click-tab" instead.');
6009
+ }
6010
+ }
5959
6011
  let tabHeight;
5960
6012
  let lockScroll;
5961
6013
  let stickyFixed;
@@ -6281,6 +6333,9 @@ var stdin_default$$ = defineComponent({
6281
6333
  index
6282
6334
  } = useParent(SWIPE_KEY);
6283
6335
  if (!parent) {
6336
+ if (process.env.NODE_ENV !== "production") {
6337
+ console.error("[Vant] <SwipeItem> must be a child component of <Swipe>.");
6338
+ }
6284
6339
  return;
6285
6340
  }
6286
6341
  const style = computed(() => {
@@ -6359,6 +6414,9 @@ var stdin_default$_ = defineComponent({
6359
6414
  index
6360
6415
  } = useParent(TABS_KEY);
6361
6416
  if (!parent) {
6417
+ if (process.env.NODE_ENV !== "production") {
6418
+ console.error("[Vant] <Tab> must be a child component of <Tabs>.");
6419
+ }
6362
6420
  return;
6363
6421
  }
6364
6422
  const getName = () => {
@@ -7121,6 +7179,17 @@ const collapseProps = {
7121
7179
  default: ""
7122
7180
  }
7123
7181
  };
7182
+ function validateModelValue(modelValue, accordion) {
7183
+ if (accordion && Array.isArray(modelValue)) {
7184
+ console.error('[Vant] Collapse: "v-model" should not be Array in accordion mode');
7185
+ return false;
7186
+ }
7187
+ if (!accordion && !Array.isArray(modelValue)) {
7188
+ console.error('[Vant] Collapse: "v-model" should be Array in non-accordion mode');
7189
+ return false;
7190
+ }
7191
+ return true;
7192
+ }
7124
7193
  var stdin_default$S = defineComponent({
7125
7194
  name: name$M,
7126
7195
  props: collapseProps,
@@ -7130,7 +7199,8 @@ var stdin_default$S = defineComponent({
7130
7199
  slots
7131
7200
  }) {
7132
7201
  const {
7133
- linkChildren
7202
+ linkChildren,
7203
+ children
7134
7204
  } = useChildren(COLLAPSE_KEY);
7135
7205
  const updateName = (name2) => {
7136
7206
  emit("change", name2);
@@ -7149,13 +7219,41 @@ var stdin_default$S = defineComponent({
7149
7219
  updateName(modelValue.filter((activeName) => activeName !== name2));
7150
7220
  }
7151
7221
  };
7222
+ const toggleAll = (options = {}) => {
7223
+ if (props.accordion) {
7224
+ return;
7225
+ }
7226
+ if (typeof options === "boolean") {
7227
+ options = {
7228
+ expanded: options
7229
+ };
7230
+ }
7231
+ const {
7232
+ expanded,
7233
+ skipDisabled
7234
+ } = options;
7235
+ const expandedChildren = children.filter((item) => {
7236
+ if (item.disabled && skipDisabled) {
7237
+ return item.expanded.value;
7238
+ }
7239
+ return expanded != null ? expanded : !item.expanded.value;
7240
+ });
7241
+ const names = expandedChildren.map((item) => item.itemName.value);
7242
+ updateName(names);
7243
+ };
7152
7244
  const isExpanded = (name2) => {
7153
7245
  const {
7154
7246
  accordion,
7155
7247
  modelValue
7156
7248
  } = props;
7249
+ if (process.env.NODE_ENV !== "production" && !validateModelValue(modelValue, accordion)) {
7250
+ return false;
7251
+ }
7157
7252
  return accordion ? modelValue === name2 : modelValue.includes(name2);
7158
7253
  };
7254
+ useExpose({
7255
+ toggleAll
7256
+ });
7159
7257
  linkChildren({
7160
7258
  toggle,
7161
7259
  isExpanded
@@ -7193,6 +7291,9 @@ var stdin_default$R = defineComponent({
7193
7291
  index
7194
7292
  } = useParent(COLLAPSE_KEY);
7195
7293
  if (!parent) {
7294
+ if (process.env.NODE_ENV !== "production") {
7295
+ console.error("[Vant] <CollapseItem> must be a child component of <Collapse>.");
7296
+ }
7196
7297
  return;
7197
7298
  }
7198
7299
  const name2 = computed(() => {
@@ -7281,7 +7382,9 @@ var stdin_default$R = defineComponent({
7281
7382
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]), [[vShow, show.value]]);
7282
7383
  });
7283
7384
  useExpose({
7284
- toggle
7385
+ toggle,
7386
+ expanded,
7387
+ itemName: name2
7285
7388
  });
7286
7389
  return () => createVNode("div", {
7287
7390
  "class": [bem$K({
@@ -9058,6 +9161,9 @@ var stdin_default$C = defineComponent({
9058
9161
  index
9059
9162
  } = useParent(DROPDOWN_KEY);
9060
9163
  if (!parent) {
9164
+ if (process.env.NODE_ENV !== "production") {
9165
+ console.error("[Vant] <DropdownItem> must be a child component of <DropdownMenu>.");
9166
+ }
9061
9167
  return;
9062
9168
  }
9063
9169
  const getEmitter = (name2) => () => emit(name2);
@@ -9258,6 +9364,9 @@ var stdin_default$A = defineComponent({
9258
9364
  } = useParent(GRID_KEY);
9259
9365
  const route2 = useRoute();
9260
9366
  if (!parent) {
9367
+ if (process.env.NODE_ENV !== "production") {
9368
+ console.error("[Vant] <GridItem> must be a child component of <Grid>.");
9369
+ }
9261
9370
  return;
9262
9371
  }
9263
9372
  const rootStyle = computed(() => {
@@ -10052,6 +10161,9 @@ var stdin_default$w = defineComponent({
10052
10161
  parent
10053
10162
  } = useParent(INDEX_BAR_KEY);
10054
10163
  if (!parent) {
10164
+ if (process.env.NODE_ENV !== "production") {
10165
+ console.error("[Vant] <IndexAnchor> must be a child component of <IndexBar>.");
10166
+ }
10055
10167
  return;
10056
10168
  }
10057
10169
  const isSticky = () => state.active && parent.props.sticky;
@@ -10232,15 +10344,6 @@ var stdin_default$v = defineComponent({
10232
10344
  }
10233
10345
  });
10234
10346
  const List = withInstall(stdin_default$v);
10235
- function usePlaceholder(contentRef, bem2) {
10236
- const height = useHeight(contentRef);
10237
- return (renderContent) => createVNode("div", {
10238
- "class": bem2("placeholder"),
10239
- "style": {
10240
- height: height.value ? `${height.value}px` : void 0
10241
- }
10242
- }, [renderContent()]);
10243
- }
10244
10347
  const [name$p, bem$p] = createNamespace("nav-bar");
10245
10348
  const navBarProps = {
10246
10349
  title: String,
@@ -11139,22 +11242,23 @@ var stdin_default$n = defineComponent({
11139
11242
  let popper;
11140
11243
  const wrapperRef = ref();
11141
11244
  const popoverRef = ref();
11245
+ const getPopoverOptions = () => ({
11246
+ placement: props.placement,
11247
+ modifiers: [{
11248
+ name: "computeStyles",
11249
+ options: {
11250
+ adaptive: false,
11251
+ gpuAcceleration: false
11252
+ }
11253
+ }, extend({}, offsetModifier, {
11254
+ options: {
11255
+ offset: props.offset
11256
+ }
11257
+ })]
11258
+ });
11142
11259
  const createPopperInstance = () => {
11143
11260
  if (wrapperRef.value && popoverRef.value) {
11144
- return createPopper(wrapperRef.value, popoverRef.value.popupRef.value, {
11145
- placement: props.placement,
11146
- modifiers: [{
11147
- name: "computeStyles",
11148
- options: {
11149
- adaptive: false,
11150
- gpuAcceleration: false
11151
- }
11152
- }, extend({}, offsetModifier, {
11153
- options: {
11154
- offset: props.offset
11155
- }
11156
- })]
11157
- });
11261
+ return createPopper(wrapperRef.value, popoverRef.value.popupRef.value, getPopoverOptions());
11158
11262
  }
11159
11263
  return null;
11160
11264
  };
@@ -11166,9 +11270,7 @@ var stdin_default$n = defineComponent({
11166
11270
  if (!popper) {
11167
11271
  popper = createPopperInstance();
11168
11272
  } else {
11169
- popper.setOptions({
11170
- placement: props.placement
11171
- });
11273
+ popper.setOptions(getPopoverOptions());
11172
11274
  }
11173
11275
  });
11174
11276
  };
@@ -11239,7 +11341,7 @@ var stdin_default$n = defineComponent({
11239
11341
  popper = null;
11240
11342
  }
11241
11343
  });
11242
- watch(() => [props.show, props.placement], updateLocation);
11344
+ watch(() => [props.show, props.offset, props.placement], updateLocation);
11243
11345
  useClickAway(wrapperRef, onClickAway, {
11244
11346
  eventName: "touchstart"
11245
11347
  });
@@ -12012,6 +12114,9 @@ var stdin_default$g = defineComponent({
12012
12114
  index
12013
12115
  } = useParent(SIDEBAR_KEY);
12014
12116
  if (!parent) {
12117
+ if (process.env.NODE_ENV !== "production") {
12118
+ console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");
12119
+ }
12015
12120
  return;
12016
12121
  }
12017
12122
  const onClick = () => {
@@ -12439,6 +12544,9 @@ var stdin_default$c = defineComponent({
12439
12544
  index
12440
12545
  } = useParent(STEPS_KEY);
12441
12546
  if (!parent) {
12547
+ if (process.env.NODE_ENV !== "production") {
12548
+ console.error("[Vant] <Step> must be a child component of <Steps>.");
12549
+ }
12442
12550
  return;
12443
12551
  }
12444
12552
  const parentProps = parent.props;
@@ -12791,6 +12899,7 @@ const submitBarProps = {
12791
12899
  buttonType: makeStringProp("danger"),
12792
12900
  buttonColor: String,
12793
12901
  suffixLabel: String,
12902
+ placeholder: Boolean,
12794
12903
  decimalLength: makeNumericProp(2),
12795
12904
  safeAreaInsetBottom: truthProp
12796
12905
  };
@@ -12802,6 +12911,8 @@ var stdin_default$a = defineComponent({
12802
12911
  emit,
12803
12912
  slots
12804
12913
  }) {
12914
+ const root = ref();
12915
+ const renderPlaceholder = usePlaceholder(root, bem$5);
12805
12916
  const renderText = () => {
12806
12917
  const {
12807
12918
  price,
@@ -12861,9 +12972,10 @@ var stdin_default$a = defineComponent({
12861
12972
  "onClick": onClickButton
12862
12973
  }, null);
12863
12974
  };
12864
- return () => {
12975
+ const renderSubmitBar = () => {
12865
12976
  var _a, _b;
12866
12977
  return createVNode("div", {
12978
+ "ref": root,
12867
12979
  "class": [bem$5(), {
12868
12980
  "van-safe-area-bottom": props.safeAreaInsetBottom
12869
12981
  }]
@@ -12871,6 +12983,12 @@ var stdin_default$a = defineComponent({
12871
12983
  "class": bem$5("bar")
12872
12984
  }, [(_b = slots.default) == null ? void 0 : _b.call(slots), renderText(), renderButton()])]);
12873
12985
  };
12986
+ return () => {
12987
+ if (props.placeholder) {
12988
+ return renderPlaceholder(renderSubmitBar);
12989
+ }
12990
+ return renderSubmitBar();
12991
+ };
12874
12992
  }
12875
12993
  });
12876
12994
  const SubmitBar = withInstall(stdin_default$a);
@@ -13126,6 +13244,9 @@ var stdin_default$7 = defineComponent({
13126
13244
  index
13127
13245
  } = useParent(TABBAR_KEY);
13128
13246
  if (!parent) {
13247
+ if (process.env.NODE_ENV !== "production") {
13248
+ console.error("[Vant] <TabbarItem> must be a child component of <Tabbar>.");
13249
+ }
13129
13250
  return;
13130
13251
  }
13131
13252
  const active = computed(() => {
@@ -13619,7 +13740,7 @@ var stdin_default$4 = defineComponent({
13619
13740
  if (props.previewFullImage) {
13620
13741
  const imageFiles = props.modelValue.filter(isImageFile);
13621
13742
  const images = imageFiles.map((item2) => {
13622
- if (item2.file && !item2.url) {
13743
+ if (item2.file && !item2.url && item2.status !== "failed") {
13623
13744
  item2.url = URL.createObjectURL(item2.file);
13624
13745
  urls.push(item2.url);
13625
13746
  }
@@ -13947,10 +14068,15 @@ class ReactiveListener {
13947
14068
  }, () => {
13948
14069
  cb();
13949
14070
  this.state.loading = false;
14071
+ if (process.env.NODE_ENV !== "production" && !this.options.silent)
14072
+ console.warn(`[@vant/lazyload] load failed with loading image(${this.loading})`);
13950
14073
  });
13951
14074
  }
13952
14075
  load(onFinish = noop) {
13953
14076
  if (this.attempt > this.options.attempt - 1 && this.state.error) {
14077
+ if (process.env.NODE_ENV !== "production" && !this.options.silent) {
14078
+ console.log(`[@vant/lazyload] ${this.src} tried too more than ${this.options.attempt} times`);
14079
+ }
13954
14080
  onFinish();
13955
14081
  return;
13956
14082
  }
@@ -14337,6 +14463,9 @@ function stdin_default$3() {
14337
14463
  let src = value;
14338
14464
  let { loading, error } = this.options;
14339
14465
  if (isObject(value)) {
14466
+ if (process.env.NODE_ENV !== "production" && !value.src && !this.options.silent) {
14467
+ console.error("[@vant/lazyload] miss src with " + value);
14468
+ }
14340
14469
  ({ src } = value);
14341
14470
  loading = value.loading || this.options.loading;
14342
14471
  error = value.error || this.options.error;
@@ -14524,6 +14653,9 @@ var stdin_default$1 = (lazyManager) => ({
14524
14653
  },
14525
14654
  load(onFinish = noop) {
14526
14655
  if (this.state.attempt > this.options.attempt - 1 && this.state.error) {
14656
+ if (process.env.NODE_ENV !== "production" && !lazyManager.options.silent) {
14657
+ console.log(`[@vant/lazyload] ${this.options.src} tried too more than ${this.options.attempt} times`);
14658
+ }
14527
14659
  onFinish();
14528
14660
  return;
14529
14661
  }
@@ -14563,7 +14695,7 @@ const Lazyload = {
14563
14695
  });
14564
14696
  }
14565
14697
  };
14566
- const version = "3.5.1";
14698
+ const version = "3.5.4";
14567
14699
  function install(app) {
14568
14700
  const components = [
14569
14701
  ActionBar,
@@ -14664,4 +14796,94 @@ var stdin_default = {
14664
14796
  install,
14665
14797
  version
14666
14798
  };
14667
- export { ActionBar, ActionBarButton, ActionBarIcon, ActionSheet, AddressEdit, AddressList, Area, Badge, Button, Calendar, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, ConfigProvider, ContactCard, ContactEdit, ContactList, CountDown, Coupon, CouponCell, CouponList, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, Form, Grid, GridItem, Icon, Image$1 as Image, ImagePreview, IndexAnchor, IndexBar, Lazyload, List, Loading, Locale, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rate, Row, Search, ShareSheet, Sidebar, SidebarItem, Skeleton, Slider, Step, Stepper, Steps, Sticky, SubmitBar, Swipe, SwipeCell, SwipeItem, Switch, Tab, Tabbar, TabbarItem, Tabs, Tag, Toast, TreeSelect, Uploader, stdin_default as default, install, version };
14799
+ export {
14800
+ ActionBar,
14801
+ ActionBarButton,
14802
+ ActionBarIcon,
14803
+ ActionSheet,
14804
+ AddressEdit,
14805
+ AddressList,
14806
+ Area,
14807
+ Badge,
14808
+ Button,
14809
+ Calendar,
14810
+ Card,
14811
+ Cascader,
14812
+ Cell,
14813
+ CellGroup,
14814
+ Checkbox,
14815
+ CheckboxGroup,
14816
+ Circle,
14817
+ Col,
14818
+ Collapse,
14819
+ CollapseItem,
14820
+ ConfigProvider,
14821
+ ContactCard,
14822
+ ContactEdit,
14823
+ ContactList,
14824
+ CountDown,
14825
+ Coupon,
14826
+ CouponCell,
14827
+ CouponList,
14828
+ DatetimePicker,
14829
+ Dialog,
14830
+ Divider,
14831
+ DropdownItem,
14832
+ DropdownMenu,
14833
+ Empty,
14834
+ Field,
14835
+ Form,
14836
+ Grid,
14837
+ GridItem,
14838
+ Icon,
14839
+ Image$1 as Image,
14840
+ ImagePreview,
14841
+ IndexAnchor,
14842
+ IndexBar,
14843
+ Lazyload,
14844
+ List,
14845
+ Loading,
14846
+ Locale,
14847
+ NavBar,
14848
+ NoticeBar,
14849
+ Notify,
14850
+ NumberKeyboard,
14851
+ Overlay,
14852
+ Pagination,
14853
+ PasswordInput,
14854
+ Picker,
14855
+ Popover,
14856
+ Popup,
14857
+ Progress,
14858
+ PullRefresh,
14859
+ Radio,
14860
+ RadioGroup,
14861
+ Rate,
14862
+ Row,
14863
+ Search,
14864
+ ShareSheet,
14865
+ Sidebar,
14866
+ SidebarItem,
14867
+ Skeleton,
14868
+ Slider,
14869
+ Step,
14870
+ Stepper,
14871
+ Steps,
14872
+ Sticky,
14873
+ SubmitBar,
14874
+ Swipe,
14875
+ SwipeCell,
14876
+ SwipeItem,
14877
+ Switch,
14878
+ Tab,
14879
+ Tabbar,
14880
+ TabbarItem,
14881
+ Tabs,
14882
+ Tag,
14883
+ Toast,
14884
+ TreeSelect,
14885
+ Uploader,
14886
+ stdin_default as default,
14887
+ install,
14888
+ version
14889
+ };