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.cjs.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- var use = require("@vant/use");
4
- var vue = require("vue");
5
- var popperjs = require("@vant/popperjs");
3
+ const use = require("@vant/use");
4
+ const vue = require("vue");
5
+ const popperjs = require("@vant/popperjs");
6
6
  function noop() {
7
7
  }
8
8
  const extend = Object.assign;
@@ -395,9 +395,34 @@ function withInstall(options) {
395
395
  };
396
396
  return options;
397
397
  }
398
+ const useHeight = (element, withSafeArea) => {
399
+ const height = vue.ref();
400
+ const setHeight = () => {
401
+ height.value = use.useRect(element).height;
402
+ };
403
+ vue.onMounted(() => {
404
+ vue.nextTick(setHeight);
405
+ if (withSafeArea) {
406
+ for (let i = 1; i <= 3; i++) {
407
+ setTimeout(setHeight, 100 * i);
408
+ }
409
+ }
410
+ });
411
+ return height;
412
+ };
413
+ function usePlaceholder(contentRef, bem2) {
414
+ const height = useHeight(contentRef, true);
415
+ return (renderContent) => vue.createVNode("div", {
416
+ "class": bem2("placeholder"),
417
+ "style": {
418
+ height: height.value ? `${height.value}px` : void 0
419
+ }
420
+ }, [renderContent()]);
421
+ }
398
422
  const [name$1u, bem$1q] = createNamespace("action-bar");
399
423
  const ACTION_BAR_KEY = Symbol(name$1u);
400
424
  const actionBarProps = {
425
+ placeholder: Boolean,
401
426
  safeAreaInsetBottom: truthProp
402
427
  };
403
428
  var stdin_default$1B = vue.defineComponent({
@@ -406,18 +431,27 @@ var stdin_default$1B = vue.defineComponent({
406
431
  setup(props, {
407
432
  slots
408
433
  }) {
434
+ const root = vue.ref();
435
+ const renderPlaceholder = usePlaceholder(root, bem$1q);
409
436
  const {
410
437
  linkChildren
411
438
  } = use.useChildren(ACTION_BAR_KEY);
412
439
  linkChildren();
413
- return () => {
440
+ const renderActionBar = () => {
414
441
  var _a;
415
442
  return vue.createVNode("div", {
443
+ "ref": root,
416
444
  "class": [bem$1q(), {
417
445
  "van-safe-area-bottom": props.safeAreaInsetBottom
418
446
  }]
419
447
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
420
448
  };
449
+ return () => {
450
+ if (props.placeholder) {
451
+ return renderPlaceholder(renderActionBar);
452
+ }
453
+ return renderActionBar();
454
+ };
421
455
  }
422
456
  });
423
457
  const ActionBar = withInstall(stdin_default$1B);
@@ -1715,6 +1749,14 @@ var stdin_default$1p = vue.defineComponent({
1715
1749
  emit,
1716
1750
  slots
1717
1751
  }) {
1752
+ if (process.env.NODE_ENV !== "production") {
1753
+ if (slots.default) {
1754
+ console.warn('[Vant] Picker: "default" slot is deprecated, please use "toolbar" slot instead.');
1755
+ }
1756
+ if (props.valueKey) {
1757
+ console.warn('[Vant] Picker: "valueKey" prop is deprecated, please use "columnsFieldNames" prop instead.');
1758
+ }
1759
+ }
1718
1760
  const hasOptions = vue.ref(false);
1719
1761
  const formattedColumns = vue.ref([]);
1720
1762
  const columnsFieldNames = vue.computed(() => {
@@ -2565,6 +2607,9 @@ let current = 0;
2565
2607
  function useId$1() {
2566
2608
  const vm = vue.getCurrentInstance();
2567
2609
  const { name: name2 = "unknown" } = (vm == null ? void 0 : vm.type) || {};
2610
+ if (process.env.NODE_ENV === "test") {
2611
+ return name2;
2612
+ }
2568
2613
  return `${name2}-${++current}`;
2569
2614
  }
2570
2615
  const [name$1e, bem$1a] = createNamespace("field");
@@ -2617,7 +2662,7 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
2617
2662
  var stdin_default$1l = vue.defineComponent({
2618
2663
  name: name$1e,
2619
2664
  props: fieldProps,
2620
- emits: ["blur", "focus", "clear", "keypress", "click-input", "click-left-icon", "click-right-icon", "update:modelValue"],
2665
+ emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "update:modelValue"],
2621
2666
  setup(props, {
2622
2667
  emit,
2623
2668
  slots
@@ -2691,18 +2736,24 @@ var stdin_default$1l = vue.defineComponent({
2691
2736
  state.status = "unvalidated";
2692
2737
  state.validateMessage = "";
2693
2738
  };
2739
+ const endValidate = () => emit("end-validate", {
2740
+ status: state.status
2741
+ });
2694
2742
  const validate = (rules = props.rules) => new Promise((resolve) => {
2695
2743
  resetValidation();
2696
2744
  if (rules) {
2745
+ emit("start-validate");
2697
2746
  runRules(rules).then(() => {
2698
2747
  if (state.status === "failed") {
2699
2748
  resolve({
2700
2749
  name: props.name,
2701
2750
  message: state.validateMessage
2702
2751
  });
2752
+ endValidate();
2703
2753
  } else {
2704
2754
  state.status = "passed";
2705
2755
  resolve();
2756
+ endValidate();
2706
2757
  }
2707
2758
  });
2708
2759
  } else {
@@ -4247,17 +4298,6 @@ const proxyPickerMethods = (picker, callback) => {
4247
4298
  }
4248
4299
  });
4249
4300
  };
4250
- const useHeight = (element) => {
4251
- const height = vue.ref();
4252
- const setHeight = () => {
4253
- height.value = use.useRect(element).height;
4254
- };
4255
- vue.onMounted(() => {
4256
- vue.nextTick(setHeight);
4257
- setTimeout(setHeight, 100);
4258
- });
4259
- return height;
4260
- };
4261
4301
  const [name$13] = createNamespace("calendar-day");
4262
4302
  var stdin_default$1a = vue.defineComponent({
4263
4303
  name: name$13,
@@ -4750,6 +4790,7 @@ var stdin_default$17 = vue.defineComponent({
4750
4790
  }
4751
4791
  return !currentDate.value;
4752
4792
  });
4793
+ const getSelectedDate = () => currentDate.value;
4753
4794
  const onScroll = () => {
4754
4795
  const top = getScrollTop(bodyRef.value);
4755
4796
  const bottom = top + bodyHeight;
@@ -4992,7 +5033,8 @@ var stdin_default$17 = vue.defineComponent({
4992
5033
  });
4993
5034
  useExpose({
4994
5035
  reset,
4995
- scrollToDate
5036
+ scrollToDate,
5037
+ getSelectedDate
4996
5038
  });
4997
5039
  use.onMountedOrActivated(init);
4998
5040
  return () => {
@@ -5958,6 +6000,16 @@ var stdin_default$10 = vue.defineComponent({
5958
6000
  emit,
5959
6001
  slots
5960
6002
  }) {
6003
+ var _a, _b;
6004
+ if (process.env.NODE_ENV !== "production") {
6005
+ const props2 = (_b = (_a = vue.getCurrentInstance()) == null ? void 0 : _a.vnode) == null ? void 0 : _b.props;
6006
+ if (props2 && "onClick" in props2) {
6007
+ console.warn('[Vant] Tabs: "click" event is deprecated, using "click-tab" instead.');
6008
+ }
6009
+ if (props2 && "onDisabled" in props2) {
6010
+ console.warn('[Vant] Tabs: "disabled" event is deprecated, using "click-tab" instead.');
6011
+ }
6012
+ }
5961
6013
  let tabHeight;
5962
6014
  let lockScroll;
5963
6015
  let stickyFixed;
@@ -6283,6 +6335,9 @@ var stdin_default$$ = vue.defineComponent({
6283
6335
  index
6284
6336
  } = use.useParent(SWIPE_KEY);
6285
6337
  if (!parent) {
6338
+ if (process.env.NODE_ENV !== "production") {
6339
+ console.error("[Vant] <SwipeItem> must be a child component of <Swipe>.");
6340
+ }
6286
6341
  return;
6287
6342
  }
6288
6343
  const style = vue.computed(() => {
@@ -6361,6 +6416,9 @@ var stdin_default$_ = vue.defineComponent({
6361
6416
  index
6362
6417
  } = use.useParent(TABS_KEY);
6363
6418
  if (!parent) {
6419
+ if (process.env.NODE_ENV !== "production") {
6420
+ console.error("[Vant] <Tab> must be a child component of <Tabs>.");
6421
+ }
6364
6422
  return;
6365
6423
  }
6366
6424
  const getName = () => {
@@ -7123,6 +7181,17 @@ const collapseProps = {
7123
7181
  default: ""
7124
7182
  }
7125
7183
  };
7184
+ function validateModelValue(modelValue, accordion) {
7185
+ if (accordion && Array.isArray(modelValue)) {
7186
+ console.error('[Vant] Collapse: "v-model" should not be Array in accordion mode');
7187
+ return false;
7188
+ }
7189
+ if (!accordion && !Array.isArray(modelValue)) {
7190
+ console.error('[Vant] Collapse: "v-model" should be Array in non-accordion mode');
7191
+ return false;
7192
+ }
7193
+ return true;
7194
+ }
7126
7195
  var stdin_default$S = vue.defineComponent({
7127
7196
  name: name$M,
7128
7197
  props: collapseProps,
@@ -7132,7 +7201,8 @@ var stdin_default$S = vue.defineComponent({
7132
7201
  slots
7133
7202
  }) {
7134
7203
  const {
7135
- linkChildren
7204
+ linkChildren,
7205
+ children
7136
7206
  } = use.useChildren(COLLAPSE_KEY);
7137
7207
  const updateName = (name2) => {
7138
7208
  emit("change", name2);
@@ -7151,13 +7221,41 @@ var stdin_default$S = vue.defineComponent({
7151
7221
  updateName(modelValue.filter((activeName) => activeName !== name2));
7152
7222
  }
7153
7223
  };
7224
+ const toggleAll = (options = {}) => {
7225
+ if (props.accordion) {
7226
+ return;
7227
+ }
7228
+ if (typeof options === "boolean") {
7229
+ options = {
7230
+ expanded: options
7231
+ };
7232
+ }
7233
+ const {
7234
+ expanded,
7235
+ skipDisabled
7236
+ } = options;
7237
+ const expandedChildren = children.filter((item) => {
7238
+ if (item.disabled && skipDisabled) {
7239
+ return item.expanded.value;
7240
+ }
7241
+ return expanded != null ? expanded : !item.expanded.value;
7242
+ });
7243
+ const names = expandedChildren.map((item) => item.itemName.value);
7244
+ updateName(names);
7245
+ };
7154
7246
  const isExpanded = (name2) => {
7155
7247
  const {
7156
7248
  accordion,
7157
7249
  modelValue
7158
7250
  } = props;
7251
+ if (process.env.NODE_ENV !== "production" && !validateModelValue(modelValue, accordion)) {
7252
+ return false;
7253
+ }
7159
7254
  return accordion ? modelValue === name2 : modelValue.includes(name2);
7160
7255
  };
7256
+ useExpose({
7257
+ toggleAll
7258
+ });
7161
7259
  linkChildren({
7162
7260
  toggle,
7163
7261
  isExpanded
@@ -7195,6 +7293,9 @@ var stdin_default$R = vue.defineComponent({
7195
7293
  index
7196
7294
  } = use.useParent(COLLAPSE_KEY);
7197
7295
  if (!parent) {
7296
+ if (process.env.NODE_ENV !== "production") {
7297
+ console.error("[Vant] <CollapseItem> must be a child component of <Collapse>.");
7298
+ }
7198
7299
  return;
7199
7300
  }
7200
7301
  const name2 = vue.computed(() => {
@@ -7283,7 +7384,9 @@ var stdin_default$R = vue.defineComponent({
7283
7384
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]), [[vue.vShow, show.value]]);
7284
7385
  });
7285
7386
  useExpose({
7286
- toggle
7387
+ toggle,
7388
+ expanded,
7389
+ itemName: name2
7287
7390
  });
7288
7391
  return () => vue.createVNode("div", {
7289
7392
  "class": [bem$K({
@@ -9060,6 +9163,9 @@ var stdin_default$C = vue.defineComponent({
9060
9163
  index
9061
9164
  } = use.useParent(DROPDOWN_KEY);
9062
9165
  if (!parent) {
9166
+ if (process.env.NODE_ENV !== "production") {
9167
+ console.error("[Vant] <DropdownItem> must be a child component of <DropdownMenu>.");
9168
+ }
9063
9169
  return;
9064
9170
  }
9065
9171
  const getEmitter = (name2) => () => emit(name2);
@@ -9260,6 +9366,9 @@ var stdin_default$A = vue.defineComponent({
9260
9366
  } = use.useParent(GRID_KEY);
9261
9367
  const route2 = useRoute();
9262
9368
  if (!parent) {
9369
+ if (process.env.NODE_ENV !== "production") {
9370
+ console.error("[Vant] <GridItem> must be a child component of <Grid>.");
9371
+ }
9263
9372
  return;
9264
9373
  }
9265
9374
  const rootStyle = vue.computed(() => {
@@ -10054,6 +10163,9 @@ var stdin_default$w = vue.defineComponent({
10054
10163
  parent
10055
10164
  } = use.useParent(INDEX_BAR_KEY);
10056
10165
  if (!parent) {
10166
+ if (process.env.NODE_ENV !== "production") {
10167
+ console.error("[Vant] <IndexAnchor> must be a child component of <IndexBar>.");
10168
+ }
10057
10169
  return;
10058
10170
  }
10059
10171
  const isSticky = () => state.active && parent.props.sticky;
@@ -10234,15 +10346,6 @@ var stdin_default$v = vue.defineComponent({
10234
10346
  }
10235
10347
  });
10236
10348
  const List = withInstall(stdin_default$v);
10237
- function usePlaceholder(contentRef, bem2) {
10238
- const height = useHeight(contentRef);
10239
- return (renderContent) => vue.createVNode("div", {
10240
- "class": bem2("placeholder"),
10241
- "style": {
10242
- height: height.value ? `${height.value}px` : void 0
10243
- }
10244
- }, [renderContent()]);
10245
- }
10246
10349
  const [name$p, bem$p] = createNamespace("nav-bar");
10247
10350
  const navBarProps = {
10248
10351
  title: String,
@@ -11141,22 +11244,23 @@ var stdin_default$n = vue.defineComponent({
11141
11244
  let popper;
11142
11245
  const wrapperRef = vue.ref();
11143
11246
  const popoverRef = vue.ref();
11247
+ const getPopoverOptions = () => ({
11248
+ placement: props.placement,
11249
+ modifiers: [{
11250
+ name: "computeStyles",
11251
+ options: {
11252
+ adaptive: false,
11253
+ gpuAcceleration: false
11254
+ }
11255
+ }, extend({}, popperjs.offsetModifier, {
11256
+ options: {
11257
+ offset: props.offset
11258
+ }
11259
+ })]
11260
+ });
11144
11261
  const createPopperInstance = () => {
11145
11262
  if (wrapperRef.value && popoverRef.value) {
11146
- return popperjs.createPopper(wrapperRef.value, popoverRef.value.popupRef.value, {
11147
- placement: props.placement,
11148
- modifiers: [{
11149
- name: "computeStyles",
11150
- options: {
11151
- adaptive: false,
11152
- gpuAcceleration: false
11153
- }
11154
- }, extend({}, popperjs.offsetModifier, {
11155
- options: {
11156
- offset: props.offset
11157
- }
11158
- })]
11159
- });
11263
+ return popperjs.createPopper(wrapperRef.value, popoverRef.value.popupRef.value, getPopoverOptions());
11160
11264
  }
11161
11265
  return null;
11162
11266
  };
@@ -11168,9 +11272,7 @@ var stdin_default$n = vue.defineComponent({
11168
11272
  if (!popper) {
11169
11273
  popper = createPopperInstance();
11170
11274
  } else {
11171
- popper.setOptions({
11172
- placement: props.placement
11173
- });
11275
+ popper.setOptions(getPopoverOptions());
11174
11276
  }
11175
11277
  });
11176
11278
  };
@@ -11241,7 +11343,7 @@ var stdin_default$n = vue.defineComponent({
11241
11343
  popper = null;
11242
11344
  }
11243
11345
  });
11244
- vue.watch(() => [props.show, props.placement], updateLocation);
11346
+ vue.watch(() => [props.show, props.offset, props.placement], updateLocation);
11245
11347
  use.useClickAway(wrapperRef, onClickAway, {
11246
11348
  eventName: "touchstart"
11247
11349
  });
@@ -12014,6 +12116,9 @@ var stdin_default$g = vue.defineComponent({
12014
12116
  index
12015
12117
  } = use.useParent(SIDEBAR_KEY);
12016
12118
  if (!parent) {
12119
+ if (process.env.NODE_ENV !== "production") {
12120
+ console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");
12121
+ }
12017
12122
  return;
12018
12123
  }
12019
12124
  const onClick = () => {
@@ -12441,6 +12546,9 @@ var stdin_default$c = vue.defineComponent({
12441
12546
  index
12442
12547
  } = use.useParent(STEPS_KEY);
12443
12548
  if (!parent) {
12549
+ if (process.env.NODE_ENV !== "production") {
12550
+ console.error("[Vant] <Step> must be a child component of <Steps>.");
12551
+ }
12444
12552
  return;
12445
12553
  }
12446
12554
  const parentProps = parent.props;
@@ -12793,6 +12901,7 @@ const submitBarProps = {
12793
12901
  buttonType: makeStringProp("danger"),
12794
12902
  buttonColor: String,
12795
12903
  suffixLabel: String,
12904
+ placeholder: Boolean,
12796
12905
  decimalLength: makeNumericProp(2),
12797
12906
  safeAreaInsetBottom: truthProp
12798
12907
  };
@@ -12804,6 +12913,8 @@ var stdin_default$a = vue.defineComponent({
12804
12913
  emit,
12805
12914
  slots
12806
12915
  }) {
12916
+ const root = vue.ref();
12917
+ const renderPlaceholder = usePlaceholder(root, bem$5);
12807
12918
  const renderText = () => {
12808
12919
  const {
12809
12920
  price,
@@ -12863,9 +12974,10 @@ var stdin_default$a = vue.defineComponent({
12863
12974
  "onClick": onClickButton
12864
12975
  }, null);
12865
12976
  };
12866
- return () => {
12977
+ const renderSubmitBar = () => {
12867
12978
  var _a, _b;
12868
12979
  return vue.createVNode("div", {
12980
+ "ref": root,
12869
12981
  "class": [bem$5(), {
12870
12982
  "van-safe-area-bottom": props.safeAreaInsetBottom
12871
12983
  }]
@@ -12873,6 +12985,12 @@ var stdin_default$a = vue.defineComponent({
12873
12985
  "class": bem$5("bar")
12874
12986
  }, [(_b = slots.default) == null ? void 0 : _b.call(slots), renderText(), renderButton()])]);
12875
12987
  };
12988
+ return () => {
12989
+ if (props.placeholder) {
12990
+ return renderPlaceholder(renderSubmitBar);
12991
+ }
12992
+ return renderSubmitBar();
12993
+ };
12876
12994
  }
12877
12995
  });
12878
12996
  const SubmitBar = withInstall(stdin_default$a);
@@ -13128,6 +13246,9 @@ var stdin_default$7 = vue.defineComponent({
13128
13246
  index
13129
13247
  } = use.useParent(TABBAR_KEY);
13130
13248
  if (!parent) {
13249
+ if (process.env.NODE_ENV !== "production") {
13250
+ console.error("[Vant] <TabbarItem> must be a child component of <Tabbar>.");
13251
+ }
13131
13252
  return;
13132
13253
  }
13133
13254
  const active = vue.computed(() => {
@@ -13621,7 +13742,7 @@ var stdin_default$4 = vue.defineComponent({
13621
13742
  if (props.previewFullImage) {
13622
13743
  const imageFiles = props.modelValue.filter(isImageFile);
13623
13744
  const images = imageFiles.map((item2) => {
13624
- if (item2.file && !item2.url) {
13745
+ if (item2.file && !item2.url && item2.status !== "failed") {
13625
13746
  item2.url = URL.createObjectURL(item2.file);
13626
13747
  urls.push(item2.url);
13627
13748
  }
@@ -13949,10 +14070,15 @@ class ReactiveListener {
13949
14070
  }, () => {
13950
14071
  cb();
13951
14072
  this.state.loading = false;
14073
+ if (process.env.NODE_ENV !== "production" && !this.options.silent)
14074
+ console.warn(`[@vant/lazyload] load failed with loading image(${this.loading})`);
13952
14075
  });
13953
14076
  }
13954
14077
  load(onFinish = noop) {
13955
14078
  if (this.attempt > this.options.attempt - 1 && this.state.error) {
14079
+ if (process.env.NODE_ENV !== "production" && !this.options.silent) {
14080
+ console.log(`[@vant/lazyload] ${this.src} tried too more than ${this.options.attempt} times`);
14081
+ }
13956
14082
  onFinish();
13957
14083
  return;
13958
14084
  }
@@ -14339,6 +14465,9 @@ function stdin_default$3() {
14339
14465
  let src = value;
14340
14466
  let { loading, error } = this.options;
14341
14467
  if (isObject(value)) {
14468
+ if (process.env.NODE_ENV !== "production" && !value.src && !this.options.silent) {
14469
+ console.error("[@vant/lazyload] miss src with " + value);
14470
+ }
14342
14471
  ({ src } = value);
14343
14472
  loading = value.loading || this.options.loading;
14344
14473
  error = value.error || this.options.error;
@@ -14526,6 +14655,9 @@ var stdin_default$1 = (lazyManager) => ({
14526
14655
  },
14527
14656
  load(onFinish = noop) {
14528
14657
  if (this.state.attempt > this.options.attempt - 1 && this.state.error) {
14658
+ if (process.env.NODE_ENV !== "production" && !lazyManager.options.silent) {
14659
+ console.log(`[@vant/lazyload] ${this.options.src} tried too more than ${this.options.attempt} times`);
14660
+ }
14529
14661
  onFinish();
14530
14662
  return;
14531
14663
  }
@@ -14565,7 +14697,7 @@ const Lazyload = {
14565
14697
  });
14566
14698
  }
14567
14699
  };
14568
- const version = "3.5.1";
14700
+ const version = "3.5.4";
14569
14701
  function install(app) {
14570
14702
  const components = [
14571
14703
  ActionBar,
@@ -14752,6 +14884,6 @@ exports.Tag = Tag;
14752
14884
  exports.Toast = Toast;
14753
14885
  exports.TreeSelect = TreeSelect;
14754
14886
  exports.Uploader = Uploader;
14755
- exports["default"] = stdin_default;
14887
+ exports.default = stdin_default;
14756
14888
  exports.install = install;
14757
14889
  exports.version = version;