vant 3.5.0-beta.1 → 3.5.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.
Files changed (69) hide show
  1. package/LICENSE +10 -0
  2. package/es/action-bar/ActionBar.d.ts +4 -0
  3. package/es/action-bar/ActionBar.mjs +13 -2
  4. package/es/action-bar/index.d.ts +3 -0
  5. package/es/calendar/Calendar.mjs +3 -0
  6. package/es/dialog/Dialog.d.ts +8 -0
  7. package/es/dialog/Dialog.mjs +6 -0
  8. package/es/dialog/function-call.d.ts +10 -0
  9. package/es/dialog/function-call.mjs +2 -0
  10. package/es/dialog/types.d.ts +3 -1
  11. package/es/field/Field.d.ts +3 -1
  12. package/es/field/Field.mjs +7 -1
  13. package/es/field/index.d.ts +3 -1
  14. package/es/index.d.ts +1 -1
  15. package/es/index.mjs +1 -1
  16. package/es/picker/Picker.mjs +1 -1
  17. package/es/picker/PickerColumn.mjs +2 -0
  18. package/es/popup/Popup.mjs +1 -1
  19. package/es/pull-refresh/PullRefresh.d.ts +2 -1
  20. package/es/pull-refresh/PullRefresh.mjs +5 -1
  21. package/es/pull-refresh/index.d.ts +2 -1
  22. package/es/submit-bar/SubmitBar.d.ts +4 -0
  23. package/es/submit-bar/SubmitBar.mjs +13 -2
  24. package/es/submit-bar/index.d.ts +3 -0
  25. package/es/switch/Switch.mjs +2 -1
  26. package/es/toast/function-call.d.ts +5 -6
  27. package/es/toast/types.d.ts +10 -1
  28. package/es/uploader/Uploader.d.ts +3 -3
  29. package/es/uploader/index.d.ts +2 -2
  30. package/lib/action-bar/ActionBar.d.ts +4 -0
  31. package/lib/action-bar/ActionBar.js +12 -1
  32. package/lib/action-bar/index.d.ts +3 -0
  33. package/lib/calendar/Calendar.js +3 -0
  34. package/lib/dialog/Dialog.d.ts +8 -0
  35. package/lib/dialog/Dialog.js +6 -0
  36. package/lib/dialog/function-call.d.ts +10 -0
  37. package/lib/dialog/function-call.js +2 -0
  38. package/lib/dialog/types.d.ts +3 -1
  39. package/lib/field/Field.d.ts +3 -1
  40. package/lib/field/Field.js +7 -1
  41. package/lib/field/index.d.ts +3 -1
  42. package/lib/index.d.ts +1 -1
  43. package/lib/index.js +1 -1
  44. package/lib/picker/Picker.js +1 -1
  45. package/lib/picker/PickerColumn.js +2 -0
  46. package/lib/popup/Popup.js +1 -1
  47. package/lib/pull-refresh/PullRefresh.d.ts +2 -1
  48. package/lib/pull-refresh/PullRefresh.js +5 -1
  49. package/lib/pull-refresh/index.d.ts +2 -1
  50. package/lib/submit-bar/SubmitBar.d.ts +4 -0
  51. package/lib/submit-bar/SubmitBar.js +12 -1
  52. package/lib/submit-bar/index.d.ts +3 -0
  53. package/lib/switch/Switch.js +2 -1
  54. package/lib/toast/function-call.d.ts +5 -6
  55. package/lib/toast/types.d.ts +10 -1
  56. package/lib/uploader/Uploader.d.ts +3 -3
  57. package/lib/uploader/index.d.ts +2 -2
  58. package/lib/vant.cjs.js +72 -28
  59. package/lib/vant.es.js +73 -29
  60. package/lib/vant.js +73 -29
  61. package/lib/vant.min.js +1 -1
  62. package/package.json +3 -3
  63. package/vetur/attributes.json +212 -196
  64. package/vetur/tags.json +72 -68
  65. package/vetur/web-types.json +1061 -994
  66. package/lib/ssr.js +0 -7
  67. package/lib/ssr.mjs +0 -1
  68. package/lib/vant.cjs.min.js +0 -1
  69. package/lib/vant.es.min.js +0 -14649
@@ -50,7 +50,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
50
50
  type: BooleanConstructor;
51
51
  default: true;
52
52
  };
53
- previewOptions: import("vue").PropType<import("..").ImagePreviewOptions>;
53
+ previewOptions: import("vue").PropType<Partial<import("..").ImagePreviewOptions>>;
54
54
  previewFullImage: {
55
55
  type: BooleanConstructor;
56
56
  default: true;
@@ -110,7 +110,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
110
110
  type: BooleanConstructor;
111
111
  default: true;
112
112
  };
113
- previewOptions: import("vue").PropType<import("..").ImagePreviewOptions>;
113
+ previewOptions: import("vue").PropType<Partial<import("..").ImagePreviewOptions>>;
114
114
  previewFullImage: {
115
115
  type: BooleanConstructor;
116
116
  default: true;
package/lib/vant.cjs.js CHANGED
@@ -395,9 +395,30 @@ function withInstall(options) {
395
395
  };
396
396
  return options;
397
397
  }
398
+ const useHeight = (element) => {
399
+ const height = vue.ref();
400
+ const setHeight = () => {
401
+ height.value = use.useRect(element).height;
402
+ };
403
+ vue.onMounted(() => {
404
+ vue.nextTick(setHeight);
405
+ setTimeout(setHeight, 100);
406
+ });
407
+ return height;
408
+ };
409
+ function usePlaceholder(contentRef, bem2) {
410
+ const height = useHeight(contentRef);
411
+ return (renderContent) => vue.createVNode("div", {
412
+ "class": bem2("placeholder"),
413
+ "style": {
414
+ height: height.value ? `${height.value}px` : void 0
415
+ }
416
+ }, [renderContent()]);
417
+ }
398
418
  const [name$1u, bem$1q] = createNamespace("action-bar");
399
419
  const ACTION_BAR_KEY = Symbol(name$1u);
400
420
  const actionBarProps = {
421
+ placeholder: Boolean,
401
422
  safeAreaInsetBottom: truthProp
402
423
  };
403
424
  var stdin_default$1B = vue.defineComponent({
@@ -406,18 +427,27 @@ var stdin_default$1B = vue.defineComponent({
406
427
  setup(props, {
407
428
  slots
408
429
  }) {
430
+ const root = vue.ref();
431
+ const renderPlaceholder = usePlaceholder(root, bem$1q);
409
432
  const {
410
433
  linkChildren
411
434
  } = use.useChildren(ACTION_BAR_KEY);
412
435
  linkChildren();
413
- return () => {
436
+ const renderActionBar = () => {
414
437
  var _a;
415
438
  return vue.createVNode("div", {
439
+ "ref": root,
416
440
  "class": [bem$1q(), {
417
441
  "van-safe-area-bottom": props.safeAreaInsetBottom
418
442
  }]
419
443
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
420
444
  };
445
+ return () => {
446
+ if (props.placeholder) {
447
+ return renderPlaceholder(renderActionBar);
448
+ }
449
+ return renderActionBar();
450
+ };
421
451
  }
422
452
  });
423
453
  const ActionBar = withInstall(stdin_default$1B);
@@ -1301,7 +1331,7 @@ var stdin_default$1s = vue.defineComponent({
1301
1331
  }
1302
1332
  });
1303
1333
  vue.onDeactivated(() => {
1304
- if (props.show) {
1334
+ if (props.show && props.teleport) {
1305
1335
  close();
1306
1336
  shouldReopen = true;
1307
1337
  }
@@ -1655,6 +1685,7 @@ var stdin_default$1q = vue.defineComponent({
1655
1685
  }
1656
1686
  };
1657
1687
  const getValue = () => state.options[state.index];
1688
+ const hasOptions = () => state.options.length;
1658
1689
  setIndex(state.index);
1659
1690
  use.useParent(PICKER_KEY);
1660
1691
  useExpose({
@@ -1663,6 +1694,7 @@ var stdin_default$1q = vue.defineComponent({
1663
1694
  getValue,
1664
1695
  setValue,
1665
1696
  setOptions,
1697
+ hasOptions,
1666
1698
  stopMomentum
1667
1699
  });
1668
1700
  vue.watch(() => props.initialOptions, setOptions);
@@ -1782,7 +1814,7 @@ var stdin_default$1p = vue.defineComponent({
1782
1814
  } else {
1783
1815
  formattedColumns.value = columns;
1784
1816
  }
1785
- hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0);
1817
+ hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0) || children.some((item) => item.hasOptions);
1786
1818
  };
1787
1819
  const getIndexes = () => children.map((child) => child.state.index);
1788
1820
  const setColumnValues = (index, options) => {
@@ -2615,7 +2647,7 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
2615
2647
  var stdin_default$1l = vue.defineComponent({
2616
2648
  name: name$1e,
2617
2649
  props: fieldProps,
2618
- emits: ["blur", "focus", "clear", "keypress", "click-input", "click-left-icon", "click-right-icon", "update:modelValue"],
2650
+ emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "update:modelValue"],
2619
2651
  setup(props, {
2620
2652
  emit,
2621
2653
  slots
@@ -2689,18 +2721,24 @@ var stdin_default$1l = vue.defineComponent({
2689
2721
  state.status = "unvalidated";
2690
2722
  state.validateMessage = "";
2691
2723
  };
2724
+ const endValidate = () => emit("end-validate", {
2725
+ status: state.status
2726
+ });
2692
2727
  const validate = (rules = props.rules) => new Promise((resolve) => {
2693
2728
  resetValidation();
2694
2729
  if (rules) {
2730
+ emit("start-validate");
2695
2731
  runRules(rules).then(() => {
2696
2732
  if (state.status === "failed") {
2697
2733
  resolve({
2698
2734
  name: props.name,
2699
2735
  message: state.validateMessage
2700
2736
  });
2737
+ endValidate();
2701
2738
  } else {
2702
2739
  state.status = "passed";
2703
2740
  resolve();
2741
+ endValidate();
2704
2742
  }
2705
2743
  });
2706
2744
  } else {
@@ -3329,6 +3367,7 @@ var stdin_default$1j = vue.defineComponent({
3329
3367
  };
3330
3368
  use.useCustomFieldValue(() => props.modelValue);
3331
3369
  return () => {
3370
+ var _a;
3332
3371
  const {
3333
3372
  size,
3334
3373
  loading,
@@ -3354,7 +3393,7 @@ var stdin_default$1j = vue.defineComponent({
3354
3393
  "onClick": onClick
3355
3394
  }, [vue.createVNode("div", {
3356
3395
  "class": bem$18("node")
3357
- }, [renderLoading()])]);
3396
+ }, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
3358
3397
  };
3359
3398
  }
3360
3399
  });
@@ -4244,17 +4283,6 @@ const proxyPickerMethods = (picker, callback) => {
4244
4283
  }
4245
4284
  });
4246
4285
  };
4247
- const useHeight = (element) => {
4248
- const height = vue.ref();
4249
- const setHeight = () => {
4250
- height.value = use.useRect(element).height;
4251
- };
4252
- vue.onMounted(() => {
4253
- vue.nextTick(setHeight);
4254
- setTimeout(setHeight, 100);
4255
- });
4256
- return height;
4257
- };
4258
4286
  const [name$13] = createNamespace("calendar-day");
4259
4287
  var stdin_default$1a = vue.defineComponent({
4260
4288
  name: name$13,
@@ -4726,6 +4754,9 @@ var stdin_default$17 = vue.defineComponent({
4726
4754
  const months = vue.computed(() => {
4727
4755
  const months2 = [];
4728
4756
  const cursor = new Date(props.minDate);
4757
+ if (props.lazyRender && !props.show && props.poppable) {
4758
+ return months2;
4759
+ }
4729
4760
  cursor.setDate(1);
4730
4761
  do {
4731
4762
  months2.push(new Date(cursor));
@@ -8603,8 +8634,10 @@ const dialogProps = extend({}, popupSharedProps, {
8603
8634
  showCancelButton: Boolean,
8604
8635
  cancelButtonText: String,
8605
8636
  cancelButtonColor: String,
8637
+ cancelButtonDisabled: Boolean,
8606
8638
  confirmButtonText: String,
8607
8639
  confirmButtonColor: String,
8640
+ confirmButtonDisabled: Boolean,
8608
8641
  showConfirmButton: truthProp,
8609
8642
  closeOnClickOverlay: Boolean
8610
8643
  });
@@ -8725,6 +8758,7 @@ var stdin_default$F = vue.defineComponent({
8725
8758
  color: props.cancelButtonColor
8726
8759
  },
8727
8760
  "loading": loading.cancel,
8761
+ "disabled": props.cancelButtonDisabled,
8728
8762
  "onClick": onCancel
8729
8763
  }, null), props.showConfirmButton && vue.createVNode(Button, {
8730
8764
  "size": "large",
@@ -8736,6 +8770,7 @@ var stdin_default$F = vue.defineComponent({
8736
8770
  color: props.confirmButtonColor
8737
8771
  },
8738
8772
  "loading": loading.confirm,
8773
+ "disabled": props.confirmButtonDisabled,
8739
8774
  "onClick": onConfirm
8740
8775
  }, null)]);
8741
8776
  const renderRoundButtons = () => vue.createVNode(ActionBar, {
@@ -8747,6 +8782,7 @@ var stdin_default$F = vue.defineComponent({
8747
8782
  "class": bem$A("cancel"),
8748
8783
  "color": props.cancelButtonColor,
8749
8784
  "loading": loading.cancel,
8785
+ "disabled": props.cancelButtonDisabled,
8750
8786
  "onClick": onCancel
8751
8787
  }, null), props.showConfirmButton && vue.createVNode(ActionBarButton, {
8752
8788
  "type": "danger",
@@ -8754,6 +8790,7 @@ var stdin_default$F = vue.defineComponent({
8754
8790
  "class": bem$A("confirm"),
8755
8791
  "color": props.confirmButtonColor,
8756
8792
  "loading": loading.confirm,
8793
+ "disabled": props.confirmButtonDisabled,
8757
8794
  "onClick": onConfirm
8758
8795
  }, null)]
8759
8796
  });
@@ -8838,8 +8875,10 @@ Dialog.defaultOptions = {
8838
8875
  messageAlign: "",
8839
8876
  cancelButtonText: "",
8840
8877
  cancelButtonColor: null,
8878
+ cancelButtonDisabled: false,
8841
8879
  confirmButtonText: "",
8842
8880
  confirmButtonColor: null,
8881
+ confirmButtonDisabled: false,
8843
8882
  showConfirmButton: true,
8844
8883
  showCancelButton: false,
8845
8884
  closeOnPopstate: true,
@@ -10220,15 +10259,6 @@ var stdin_default$v = vue.defineComponent({
10220
10259
  }
10221
10260
  });
10222
10261
  const List = withInstall(stdin_default$v);
10223
- function usePlaceholder(contentRef, bem2) {
10224
- const height = useHeight(contentRef);
10225
- return (renderContent) => vue.createVNode("div", {
10226
- "class": bem2("placeholder"),
10227
- "style": {
10228
- height: height.value ? `${height.value}px` : void 0
10229
- }
10230
- }, [renderContent()]);
10231
- }
10232
10262
  const [name$p, bem$p] = createNamespace("nav-bar");
10233
10263
  const navBarProps = {
10234
10264
  title: String,
@@ -11346,7 +11376,7 @@ const pullRefreshProps = {
11346
11376
  var stdin_default$l = vue.defineComponent({
11347
11377
  name: name$g,
11348
11378
  props: pullRefreshProps,
11349
- emits: ["refresh", "update:modelValue"],
11379
+ emits: ["change", "refresh", "update:modelValue"],
11350
11380
  setup(props, {
11351
11381
  emit,
11352
11382
  slots
@@ -11391,6 +11421,10 @@ var stdin_default$l = vue.defineComponent({
11391
11421
  } else {
11392
11422
  state.status = "loosing";
11393
11423
  }
11424
+ emit("change", {
11425
+ status: state.status,
11426
+ distance
11427
+ });
11394
11428
  };
11395
11429
  const getStatusText = () => {
11396
11430
  const {
@@ -12775,6 +12809,7 @@ const submitBarProps = {
12775
12809
  buttonType: makeStringProp("danger"),
12776
12810
  buttonColor: String,
12777
12811
  suffixLabel: String,
12812
+ placeholder: Boolean,
12778
12813
  decimalLength: makeNumericProp(2),
12779
12814
  safeAreaInsetBottom: truthProp
12780
12815
  };
@@ -12786,6 +12821,8 @@ var stdin_default$a = vue.defineComponent({
12786
12821
  emit,
12787
12822
  slots
12788
12823
  }) {
12824
+ const root = vue.ref();
12825
+ const renderPlaceholder = usePlaceholder(root, bem$5);
12789
12826
  const renderText = () => {
12790
12827
  const {
12791
12828
  price,
@@ -12845,9 +12882,10 @@ var stdin_default$a = vue.defineComponent({
12845
12882
  "onClick": onClickButton
12846
12883
  }, null);
12847
12884
  };
12848
- return () => {
12885
+ const renderSubmitBar = () => {
12849
12886
  var _a, _b;
12850
12887
  return vue.createVNode("div", {
12888
+ "ref": root,
12851
12889
  "class": [bem$5(), {
12852
12890
  "van-safe-area-bottom": props.safeAreaInsetBottom
12853
12891
  }]
@@ -12855,6 +12893,12 @@ var stdin_default$a = vue.defineComponent({
12855
12893
  "class": bem$5("bar")
12856
12894
  }, [(_b = slots.default) == null ? void 0 : _b.call(slots), renderText(), renderButton()])]);
12857
12895
  };
12896
+ return () => {
12897
+ if (props.placeholder) {
12898
+ return renderPlaceholder(renderSubmitBar);
12899
+ }
12900
+ return renderSubmitBar();
12901
+ };
12858
12902
  }
12859
12903
  });
12860
12904
  const SubmitBar = withInstall(stdin_default$a);
@@ -14547,7 +14591,7 @@ const Lazyload = {
14547
14591
  });
14548
14592
  }
14549
14593
  };
14550
- const version = "3.5.0-beta.1";
14594
+ const version = "3.5.2";
14551
14595
  function install(app) {
14552
14596
  const components = [
14553
14597
  ActionBar,
package/lib/vant.es.js CHANGED
@@ -1,5 +1,5 @@
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";
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
3
  import { createPopper, offsetModifier } from "@vant/popperjs";
4
4
  function noop() {
5
5
  }
@@ -393,9 +393,30 @@ function withInstall(options) {
393
393
  };
394
394
  return options;
395
395
  }
396
+ const useHeight = (element) => {
397
+ const height = ref();
398
+ const setHeight = () => {
399
+ height.value = useRect(element).height;
400
+ };
401
+ onMounted(() => {
402
+ nextTick(setHeight);
403
+ setTimeout(setHeight, 100);
404
+ });
405
+ return height;
406
+ };
407
+ function usePlaceholder(contentRef, bem2) {
408
+ const height = useHeight(contentRef);
409
+ return (renderContent) => createVNode("div", {
410
+ "class": bem2("placeholder"),
411
+ "style": {
412
+ height: height.value ? `${height.value}px` : void 0
413
+ }
414
+ }, [renderContent()]);
415
+ }
396
416
  const [name$1u, bem$1q] = createNamespace("action-bar");
397
417
  const ACTION_BAR_KEY = Symbol(name$1u);
398
418
  const actionBarProps = {
419
+ placeholder: Boolean,
399
420
  safeAreaInsetBottom: truthProp
400
421
  };
401
422
  var stdin_default$1B = defineComponent({
@@ -404,18 +425,27 @@ var stdin_default$1B = defineComponent({
404
425
  setup(props, {
405
426
  slots
406
427
  }) {
428
+ const root = ref();
429
+ const renderPlaceholder = usePlaceholder(root, bem$1q);
407
430
  const {
408
431
  linkChildren
409
432
  } = useChildren(ACTION_BAR_KEY);
410
433
  linkChildren();
411
- return () => {
434
+ const renderActionBar = () => {
412
435
  var _a;
413
436
  return createVNode("div", {
437
+ "ref": root,
414
438
  "class": [bem$1q(), {
415
439
  "van-safe-area-bottom": props.safeAreaInsetBottom
416
440
  }]
417
441
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
418
442
  };
443
+ return () => {
444
+ if (props.placeholder) {
445
+ return renderPlaceholder(renderActionBar);
446
+ }
447
+ return renderActionBar();
448
+ };
419
449
  }
420
450
  });
421
451
  const ActionBar = withInstall(stdin_default$1B);
@@ -1299,7 +1329,7 @@ var stdin_default$1s = defineComponent({
1299
1329
  }
1300
1330
  });
1301
1331
  onDeactivated(() => {
1302
- if (props.show) {
1332
+ if (props.show && props.teleport) {
1303
1333
  close();
1304
1334
  shouldReopen = true;
1305
1335
  }
@@ -1653,6 +1683,7 @@ var stdin_default$1q = defineComponent({
1653
1683
  }
1654
1684
  };
1655
1685
  const getValue = () => state.options[state.index];
1686
+ const hasOptions = () => state.options.length;
1656
1687
  setIndex(state.index);
1657
1688
  useParent(PICKER_KEY);
1658
1689
  useExpose({
@@ -1661,6 +1692,7 @@ var stdin_default$1q = defineComponent({
1661
1692
  getValue,
1662
1693
  setValue,
1663
1694
  setOptions,
1695
+ hasOptions,
1664
1696
  stopMomentum
1665
1697
  });
1666
1698
  watch(() => props.initialOptions, setOptions);
@@ -1780,7 +1812,7 @@ var stdin_default$1p = defineComponent({
1780
1812
  } else {
1781
1813
  formattedColumns.value = columns;
1782
1814
  }
1783
- hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0);
1815
+ hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0) || children.some((item) => item.hasOptions);
1784
1816
  };
1785
1817
  const getIndexes = () => children.map((child) => child.state.index);
1786
1818
  const setColumnValues = (index, options) => {
@@ -2613,7 +2645,7 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
2613
2645
  var stdin_default$1l = defineComponent({
2614
2646
  name: name$1e,
2615
2647
  props: fieldProps,
2616
- emits: ["blur", "focus", "clear", "keypress", "click-input", "click-left-icon", "click-right-icon", "update:modelValue"],
2648
+ emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "update:modelValue"],
2617
2649
  setup(props, {
2618
2650
  emit,
2619
2651
  slots
@@ -2687,18 +2719,24 @@ var stdin_default$1l = defineComponent({
2687
2719
  state.status = "unvalidated";
2688
2720
  state.validateMessage = "";
2689
2721
  };
2722
+ const endValidate = () => emit("end-validate", {
2723
+ status: state.status
2724
+ });
2690
2725
  const validate = (rules = props.rules) => new Promise((resolve) => {
2691
2726
  resetValidation();
2692
2727
  if (rules) {
2728
+ emit("start-validate");
2693
2729
  runRules(rules).then(() => {
2694
2730
  if (state.status === "failed") {
2695
2731
  resolve({
2696
2732
  name: props.name,
2697
2733
  message: state.validateMessage
2698
2734
  });
2735
+ endValidate();
2699
2736
  } else {
2700
2737
  state.status = "passed";
2701
2738
  resolve();
2739
+ endValidate();
2702
2740
  }
2703
2741
  });
2704
2742
  } else {
@@ -3327,6 +3365,7 @@ var stdin_default$1j = defineComponent({
3327
3365
  };
3328
3366
  useCustomFieldValue(() => props.modelValue);
3329
3367
  return () => {
3368
+ var _a;
3330
3369
  const {
3331
3370
  size,
3332
3371
  loading,
@@ -3352,7 +3391,7 @@ var stdin_default$1j = defineComponent({
3352
3391
  "onClick": onClick
3353
3392
  }, [createVNode("div", {
3354
3393
  "class": bem$18("node")
3355
- }, [renderLoading()])]);
3394
+ }, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
3356
3395
  };
3357
3396
  }
3358
3397
  });
@@ -4242,17 +4281,6 @@ const proxyPickerMethods = (picker, callback) => {
4242
4281
  }
4243
4282
  });
4244
4283
  };
4245
- const useHeight = (element) => {
4246
- const height = ref();
4247
- const setHeight = () => {
4248
- height.value = useRect(element).height;
4249
- };
4250
- onMounted(() => {
4251
- nextTick(setHeight);
4252
- setTimeout(setHeight, 100);
4253
- });
4254
- return height;
4255
- };
4256
4284
  const [name$13] = createNamespace("calendar-day");
4257
4285
  var stdin_default$1a = defineComponent({
4258
4286
  name: name$13,
@@ -4724,6 +4752,9 @@ var stdin_default$17 = defineComponent({
4724
4752
  const months = computed(() => {
4725
4753
  const months2 = [];
4726
4754
  const cursor = new Date(props.minDate);
4755
+ if (props.lazyRender && !props.show && props.poppable) {
4756
+ return months2;
4757
+ }
4727
4758
  cursor.setDate(1);
4728
4759
  do {
4729
4760
  months2.push(new Date(cursor));
@@ -8601,8 +8632,10 @@ const dialogProps = extend({}, popupSharedProps, {
8601
8632
  showCancelButton: Boolean,
8602
8633
  cancelButtonText: String,
8603
8634
  cancelButtonColor: String,
8635
+ cancelButtonDisabled: Boolean,
8604
8636
  confirmButtonText: String,
8605
8637
  confirmButtonColor: String,
8638
+ confirmButtonDisabled: Boolean,
8606
8639
  showConfirmButton: truthProp,
8607
8640
  closeOnClickOverlay: Boolean
8608
8641
  });
@@ -8723,6 +8756,7 @@ var stdin_default$F = defineComponent({
8723
8756
  color: props.cancelButtonColor
8724
8757
  },
8725
8758
  "loading": loading.cancel,
8759
+ "disabled": props.cancelButtonDisabled,
8726
8760
  "onClick": onCancel
8727
8761
  }, null), props.showConfirmButton && createVNode(Button, {
8728
8762
  "size": "large",
@@ -8734,6 +8768,7 @@ var stdin_default$F = defineComponent({
8734
8768
  color: props.confirmButtonColor
8735
8769
  },
8736
8770
  "loading": loading.confirm,
8771
+ "disabled": props.confirmButtonDisabled,
8737
8772
  "onClick": onConfirm
8738
8773
  }, null)]);
8739
8774
  const renderRoundButtons = () => createVNode(ActionBar, {
@@ -8745,6 +8780,7 @@ var stdin_default$F = defineComponent({
8745
8780
  "class": bem$A("cancel"),
8746
8781
  "color": props.cancelButtonColor,
8747
8782
  "loading": loading.cancel,
8783
+ "disabled": props.cancelButtonDisabled,
8748
8784
  "onClick": onCancel
8749
8785
  }, null), props.showConfirmButton && createVNode(ActionBarButton, {
8750
8786
  "type": "danger",
@@ -8752,6 +8788,7 @@ var stdin_default$F = defineComponent({
8752
8788
  "class": bem$A("confirm"),
8753
8789
  "color": props.confirmButtonColor,
8754
8790
  "loading": loading.confirm,
8791
+ "disabled": props.confirmButtonDisabled,
8755
8792
  "onClick": onConfirm
8756
8793
  }, null)]
8757
8794
  });
@@ -8836,8 +8873,10 @@ Dialog.defaultOptions = {
8836
8873
  messageAlign: "",
8837
8874
  cancelButtonText: "",
8838
8875
  cancelButtonColor: null,
8876
+ cancelButtonDisabled: false,
8839
8877
  confirmButtonText: "",
8840
8878
  confirmButtonColor: null,
8879
+ confirmButtonDisabled: false,
8841
8880
  showConfirmButton: true,
8842
8881
  showCancelButton: false,
8843
8882
  closeOnPopstate: true,
@@ -10218,15 +10257,6 @@ var stdin_default$v = defineComponent({
10218
10257
  }
10219
10258
  });
10220
10259
  const List = withInstall(stdin_default$v);
10221
- function usePlaceholder(contentRef, bem2) {
10222
- const height = useHeight(contentRef);
10223
- return (renderContent) => createVNode("div", {
10224
- "class": bem2("placeholder"),
10225
- "style": {
10226
- height: height.value ? `${height.value}px` : void 0
10227
- }
10228
- }, [renderContent()]);
10229
- }
10230
10260
  const [name$p, bem$p] = createNamespace("nav-bar");
10231
10261
  const navBarProps = {
10232
10262
  title: String,
@@ -11344,7 +11374,7 @@ const pullRefreshProps = {
11344
11374
  var stdin_default$l = defineComponent({
11345
11375
  name: name$g,
11346
11376
  props: pullRefreshProps,
11347
- emits: ["refresh", "update:modelValue"],
11377
+ emits: ["change", "refresh", "update:modelValue"],
11348
11378
  setup(props, {
11349
11379
  emit,
11350
11380
  slots
@@ -11389,6 +11419,10 @@ var stdin_default$l = defineComponent({
11389
11419
  } else {
11390
11420
  state.status = "loosing";
11391
11421
  }
11422
+ emit("change", {
11423
+ status: state.status,
11424
+ distance
11425
+ });
11392
11426
  };
11393
11427
  const getStatusText = () => {
11394
11428
  const {
@@ -12773,6 +12807,7 @@ const submitBarProps = {
12773
12807
  buttonType: makeStringProp("danger"),
12774
12808
  buttonColor: String,
12775
12809
  suffixLabel: String,
12810
+ placeholder: Boolean,
12776
12811
  decimalLength: makeNumericProp(2),
12777
12812
  safeAreaInsetBottom: truthProp
12778
12813
  };
@@ -12784,6 +12819,8 @@ var stdin_default$a = defineComponent({
12784
12819
  emit,
12785
12820
  slots
12786
12821
  }) {
12822
+ const root = ref();
12823
+ const renderPlaceholder = usePlaceholder(root, bem$5);
12787
12824
  const renderText = () => {
12788
12825
  const {
12789
12826
  price,
@@ -12843,9 +12880,10 @@ var stdin_default$a = defineComponent({
12843
12880
  "onClick": onClickButton
12844
12881
  }, null);
12845
12882
  };
12846
- return () => {
12883
+ const renderSubmitBar = () => {
12847
12884
  var _a, _b;
12848
12885
  return createVNode("div", {
12886
+ "ref": root,
12849
12887
  "class": [bem$5(), {
12850
12888
  "van-safe-area-bottom": props.safeAreaInsetBottom
12851
12889
  }]
@@ -12853,6 +12891,12 @@ var stdin_default$a = defineComponent({
12853
12891
  "class": bem$5("bar")
12854
12892
  }, [(_b = slots.default) == null ? void 0 : _b.call(slots), renderText(), renderButton()])]);
12855
12893
  };
12894
+ return () => {
12895
+ if (props.placeholder) {
12896
+ return renderPlaceholder(renderSubmitBar);
12897
+ }
12898
+ return renderSubmitBar();
12899
+ };
12856
12900
  }
12857
12901
  });
12858
12902
  const SubmitBar = withInstall(stdin_default$a);
@@ -14545,7 +14589,7 @@ const Lazyload = {
14545
14589
  });
14546
14590
  }
14547
14591
  };
14548
- const version = "3.5.0-beta.1";
14592
+ const version = "3.5.2";
14549
14593
  function install(app) {
14550
14594
  const components = [
14551
14595
  ActionBar,