vant 3.5.2 → 3.5.3
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.
- package/README.md +13 -13
- package/changelog.generated.md +67 -0
- package/es/button/index.less +1 -1
- package/es/calendar/Calendar.mjs +3 -1
- package/es/calendar/types.d.ts +1 -0
- package/es/cell/Cell.d.ts +1 -1
- package/es/cell/index.d.ts +1 -1
- package/es/collapse/Collapse.d.ts +8 -1
- package/es/collapse/Collapse.mjs +28 -1
- package/es/collapse/index.d.ts +1 -1
- package/es/collapse-item/CollapseItem.d.ts +1 -1
- package/es/collapse-item/CollapseItem.mjs +3 -1
- package/es/collapse-item/index.d.ts +1 -1
- package/es/collapse-item/index.less +1 -1
- package/es/composables/use-height.d.ts +1 -1
- package/es/composables/use-height.mjs +6 -2
- package/es/composables/use-placeholder.mjs +1 -1
- package/es/dialog/Dialog.d.ts +1 -1
- package/es/field/Field.d.ts +1 -1
- package/es/field/index.d.ts +1 -1
- package/es/field/index.less +1 -1
- package/es/grid-item/index.less +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/locale/index.d.ts +1 -1
- package/es/popover/Popover.mjs +17 -18
- package/es/sidebar-item/index.less +1 -1
- package/es/swipe/index.less +1 -1
- package/es/switch/index.less +1 -1
- package/es/toast/index.less +1 -1
- package/es/uploader/Uploader.mjs +1 -1
- package/es/utils/basic.d.ts +3 -3
- package/es/utils/create.d.ts +1 -1
- package/lib/.DS_Store +0 -0
- package/lib/action-bar/.DS_Store +0 -0
- package/lib/action-bar-button/.DS_Store +0 -0
- package/lib/action-bar-icon/.DS_Store +0 -0
- package/lib/action-sheet/.DS_Store +0 -0
- package/lib/address-edit/.DS_Store +0 -0
- package/lib/address-list/.DS_Store +0 -0
- package/lib/area/.DS_Store +0 -0
- package/lib/badge/.DS_Store +0 -0
- package/lib/button/.DS_Store +0 -0
- package/lib/button/index.less +1 -1
- package/lib/calendar/.DS_Store +0 -0
- package/lib/calendar/Calendar.js +3 -1
- package/lib/calendar/types.d.ts +1 -0
- package/lib/card/.DS_Store +0 -0
- package/lib/cascader/.DS_Store +0 -0
- package/lib/cell/.DS_Store +0 -0
- package/lib/cell/Cell.d.ts +1 -1
- package/lib/cell/index.d.ts +1 -1
- package/lib/cell-group/.DS_Store +0 -0
- package/lib/checkbox/.DS_Store +0 -0
- package/lib/checkbox-group/.DS_Store +0 -0
- package/lib/circle/.DS_Store +0 -0
- package/lib/col/.DS_Store +0 -0
- package/lib/collapse/.DS_Store +0 -0
- package/lib/collapse/Collapse.d.ts +8 -1
- package/lib/collapse/Collapse.js +28 -1
- package/lib/collapse/index.d.ts +1 -1
- package/lib/collapse-item/.DS_Store +0 -0
- package/lib/collapse-item/CollapseItem.d.ts +1 -1
- package/lib/collapse-item/CollapseItem.js +3 -1
- package/lib/collapse-item/index.d.ts +1 -1
- package/lib/collapse-item/index.less +1 -1
- package/lib/composables/use-height.d.ts +1 -1
- package/lib/composables/use-height.js +6 -2
- package/lib/composables/use-placeholder.js +1 -1
- package/lib/config-provider/.DS_Store +0 -0
- package/lib/contact-card/.DS_Store +0 -0
- package/lib/contact-edit/.DS_Store +0 -0
- package/lib/contact-list/.DS_Store +0 -0
- package/lib/count-down/.DS_Store +0 -0
- package/lib/coupon/.DS_Store +0 -0
- package/lib/coupon-cell/.DS_Store +0 -0
- package/lib/coupon-list/.DS_Store +0 -0
- package/lib/datetime-picker/.DS_Store +0 -0
- package/lib/dialog/.DS_Store +0 -0
- package/lib/dialog/Dialog.d.ts +1 -1
- package/lib/divider/.DS_Store +0 -0
- package/lib/dropdown-item/.DS_Store +0 -0
- package/lib/dropdown-menu/.DS_Store +0 -0
- package/lib/empty/.DS_Store +0 -0
- package/lib/field/.DS_Store +0 -0
- package/lib/field/Field.d.ts +1 -1
- package/lib/field/index.d.ts +1 -1
- package/lib/field/index.less +1 -1
- package/lib/form/.DS_Store +0 -0
- package/lib/grid/.DS_Store +0 -0
- package/lib/grid-item/.DS_Store +0 -0
- package/lib/grid-item/index.less +1 -1
- package/lib/icon/.DS_Store +0 -0
- package/lib/image/.DS_Store +0 -0
- package/lib/image-preview/.DS_Store +0 -0
- package/lib/index-anchor/.DS_Store +0 -0
- package/lib/index-bar/.DS_Store +0 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/lazyload/.DS_Store +0 -0
- package/lib/list/.DS_Store +0 -0
- package/lib/loading/.DS_Store +0 -0
- package/lib/locale/.DS_Store +0 -0
- package/lib/locale/index.d.ts +1 -1
- package/lib/nav-bar/.DS_Store +0 -0
- package/lib/notice-bar/.DS_Store +0 -0
- package/lib/notify/.DS_Store +0 -0
- package/lib/number-keyboard/.DS_Store +0 -0
- package/lib/overlay/.DS_Store +0 -0
- package/lib/pagination/.DS_Store +0 -0
- package/lib/password-input/.DS_Store +0 -0
- package/lib/picker/.DS_Store +0 -0
- package/lib/popover/.DS_Store +0 -0
- package/lib/popover/Popover.js +17 -18
- package/lib/popup/.DS_Store +0 -0
- package/lib/progress/.DS_Store +0 -0
- package/lib/pull-refresh/.DS_Store +0 -0
- package/lib/radio/.DS_Store +0 -0
- package/lib/radio-group/.DS_Store +0 -0
- package/lib/rate/.DS_Store +0 -0
- package/lib/row/.DS_Store +0 -0
- package/lib/search/.DS_Store +0 -0
- package/lib/share-sheet/.DS_Store +0 -0
- package/lib/sidebar/.DS_Store +0 -0
- package/lib/sidebar-item/.DS_Store +0 -0
- package/lib/sidebar-item/index.less +1 -1
- package/lib/skeleton/.DS_Store +0 -0
- package/lib/slider/.DS_Store +0 -0
- package/lib/step/.DS_Store +0 -0
- package/lib/stepper/.DS_Store +0 -0
- package/lib/steps/.DS_Store +0 -0
- package/lib/sticky/.DS_Store +0 -0
- package/lib/submit-bar/.DS_Store +0 -0
- package/lib/swipe/.DS_Store +0 -0
- package/lib/swipe/index.less +1 -1
- package/lib/swipe-cell/.DS_Store +0 -0
- package/lib/swipe-item/.DS_Store +0 -0
- package/lib/switch/.DS_Store +0 -0
- package/lib/switch/index.less +1 -1
- package/lib/tab/.DS_Store +0 -0
- package/lib/tabbar/.DS_Store +0 -0
- package/lib/tabbar-item/.DS_Store +0 -0
- package/lib/tabs/.DS_Store +0 -0
- package/lib/tag/.DS_Store +0 -0
- package/lib/toast/.DS_Store +0 -0
- package/lib/toast/index.less +1 -1
- package/lib/tree-select/.DS_Store +0 -0
- package/lib/uploader/.DS_Store +0 -0
- package/lib/uploader/Uploader.js +1 -1
- package/lib/utils/basic.d.ts +3 -3
- package/lib/utils/create.d.ts +1 -1
- package/lib/vant.cjs.js +136 -30
- package/lib/vant.es.js +224 -28
- package/lib/vant.js +133 -27
- package/lib/vant.min.js +1 -1
- package/{vetur → lib}/web-types.json +1369 -1369
- package/package.json +9 -14
- package/vetur/attributes.json +0 -3482
- package/vetur/tags.json +0 -1204
package/lib/vant.js
CHANGED
@@ -747,19 +747,23 @@
|
|
747
747
|
};
|
748
748
|
return options;
|
749
749
|
}
|
750
|
-
const useHeight = (element) => {
|
750
|
+
const useHeight = (element, withSafeArea) => {
|
751
751
|
const height2 = vue.ref();
|
752
752
|
const setHeight = () => {
|
753
753
|
height2.value = useRect(element).height;
|
754
754
|
};
|
755
755
|
vue.onMounted(() => {
|
756
756
|
vue.nextTick(setHeight);
|
757
|
-
|
757
|
+
if (withSafeArea) {
|
758
|
+
for (let i = 1; i <= 3; i++) {
|
759
|
+
setTimeout(setHeight, 100 * i);
|
760
|
+
}
|
761
|
+
}
|
758
762
|
});
|
759
763
|
return height2;
|
760
764
|
};
|
761
765
|
function usePlaceholder(contentRef, bem2) {
|
762
|
-
const height2 = useHeight(contentRef);
|
766
|
+
const height2 = useHeight(contentRef, true);
|
763
767
|
return (renderContent) => vue.createVNode("div", {
|
764
768
|
"class": bem2("placeholder"),
|
765
769
|
"style": {
|
@@ -2097,6 +2101,14 @@
|
|
2097
2101
|
emit,
|
2098
2102
|
slots
|
2099
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
|
+
}
|
2100
2112
|
const hasOptions = vue.ref(false);
|
2101
2113
|
const formattedColumns = vue.ref([]);
|
2102
2114
|
const columnsFieldNames = vue.computed(() => {
|
@@ -2947,6 +2959,9 @@
|
|
2947
2959
|
function useId$1() {
|
2948
2960
|
const vm = vue.getCurrentInstance();
|
2949
2961
|
const { name: name2 = "unknown" } = (vm == null ? void 0 : vm.type) || {};
|
2962
|
+
if (process.env.NODE_ENV === "test") {
|
2963
|
+
return name2;
|
2964
|
+
}
|
2950
2965
|
return `${name2}-${++current}`;
|
2951
2966
|
}
|
2952
2967
|
const [name$1e, bem$1a] = createNamespace("field");
|
@@ -5127,6 +5142,7 @@
|
|
5127
5142
|
}
|
5128
5143
|
return !currentDate.value;
|
5129
5144
|
});
|
5145
|
+
const getSelectedDate = () => currentDate.value;
|
5130
5146
|
const onScroll = () => {
|
5131
5147
|
const top2 = getScrollTop(bodyRef.value);
|
5132
5148
|
const bottom2 = top2 + bodyHeight;
|
@@ -5369,7 +5385,8 @@
|
|
5369
5385
|
});
|
5370
5386
|
useExpose({
|
5371
5387
|
reset,
|
5372
|
-
scrollToDate
|
5388
|
+
scrollToDate,
|
5389
|
+
getSelectedDate
|
5373
5390
|
});
|
5374
5391
|
onMountedOrActivated(init);
|
5375
5392
|
return () => {
|
@@ -6335,6 +6352,16 @@
|
|
6335
6352
|
emit,
|
6336
6353
|
slots
|
6337
6354
|
}) {
|
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
|
+
}
|
6338
6365
|
let tabHeight;
|
6339
6366
|
let lockScroll;
|
6340
6367
|
let stickyFixed;
|
@@ -6660,6 +6687,9 @@
|
|
6660
6687
|
index
|
6661
6688
|
} = useParent(SWIPE_KEY);
|
6662
6689
|
if (!parent) {
|
6690
|
+
if (process.env.NODE_ENV !== "production") {
|
6691
|
+
console.error("[Vant] <SwipeItem> must be a child component of <Swipe>.");
|
6692
|
+
}
|
6663
6693
|
return;
|
6664
6694
|
}
|
6665
6695
|
const style = vue.computed(() => {
|
@@ -6738,6 +6768,9 @@
|
|
6738
6768
|
index
|
6739
6769
|
} = useParent(TABS_KEY);
|
6740
6770
|
if (!parent) {
|
6771
|
+
if (process.env.NODE_ENV !== "production") {
|
6772
|
+
console.error("[Vant] <Tab> must be a child component of <Tabs>.");
|
6773
|
+
}
|
6741
6774
|
return;
|
6742
6775
|
}
|
6743
6776
|
const getName = () => {
|
@@ -7500,6 +7533,17 @@
|
|
7500
7533
|
default: ""
|
7501
7534
|
}
|
7502
7535
|
};
|
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
|
+
}
|
7503
7547
|
var stdin_default$S = vue.defineComponent({
|
7504
7548
|
name: name$M,
|
7505
7549
|
props: collapseProps,
|
@@ -7509,7 +7553,8 @@
|
|
7509
7553
|
slots
|
7510
7554
|
}) {
|
7511
7555
|
const {
|
7512
|
-
linkChildren
|
7556
|
+
linkChildren,
|
7557
|
+
children
|
7513
7558
|
} = useChildren(COLLAPSE_KEY);
|
7514
7559
|
const updateName = (name2) => {
|
7515
7560
|
emit("change", name2);
|
@@ -7528,13 +7573,41 @@
|
|
7528
7573
|
updateName(modelValue.filter((activeName) => activeName !== name2));
|
7529
7574
|
}
|
7530
7575
|
};
|
7576
|
+
const toggleAll = (options = {}) => {
|
7577
|
+
if (props.accordion) {
|
7578
|
+
return;
|
7579
|
+
}
|
7580
|
+
if (typeof options === "boolean") {
|
7581
|
+
options = {
|
7582
|
+
expanded: options
|
7583
|
+
};
|
7584
|
+
}
|
7585
|
+
const {
|
7586
|
+
expanded,
|
7587
|
+
skipDisabled
|
7588
|
+
} = options;
|
7589
|
+
const expandedChildren = children.filter((item) => {
|
7590
|
+
if (item.disabled && skipDisabled) {
|
7591
|
+
return item.expanded.value;
|
7592
|
+
}
|
7593
|
+
return expanded != null ? expanded : !item.expanded.value;
|
7594
|
+
});
|
7595
|
+
const names = expandedChildren.map((item) => item.itemName.value);
|
7596
|
+
updateName(names);
|
7597
|
+
};
|
7531
7598
|
const isExpanded = (name2) => {
|
7532
7599
|
const {
|
7533
7600
|
accordion,
|
7534
7601
|
modelValue
|
7535
7602
|
} = props;
|
7603
|
+
if (process.env.NODE_ENV !== "production" && !validateModelValue(modelValue, accordion)) {
|
7604
|
+
return false;
|
7605
|
+
}
|
7536
7606
|
return accordion ? modelValue === name2 : modelValue.includes(name2);
|
7537
7607
|
};
|
7608
|
+
useExpose({
|
7609
|
+
toggleAll
|
7610
|
+
});
|
7538
7611
|
linkChildren({
|
7539
7612
|
toggle,
|
7540
7613
|
isExpanded
|
@@ -7572,6 +7645,9 @@
|
|
7572
7645
|
index
|
7573
7646
|
} = useParent(COLLAPSE_KEY);
|
7574
7647
|
if (!parent) {
|
7648
|
+
if (process.env.NODE_ENV !== "production") {
|
7649
|
+
console.error("[Vant] <CollapseItem> must be a child component of <Collapse>.");
|
7650
|
+
}
|
7575
7651
|
return;
|
7576
7652
|
}
|
7577
7653
|
const name2 = vue.computed(() => {
|
@@ -7660,7 +7736,9 @@
|
|
7660
7736
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]), [[vue.vShow, show.value]]);
|
7661
7737
|
});
|
7662
7738
|
useExpose({
|
7663
|
-
toggle
|
7739
|
+
toggle,
|
7740
|
+
expanded,
|
7741
|
+
itemName: name2
|
7664
7742
|
});
|
7665
7743
|
return () => vue.createVNode("div", {
|
7666
7744
|
"class": [bem$K({
|
@@ -9437,6 +9515,9 @@
|
|
9437
9515
|
index
|
9438
9516
|
} = useParent(DROPDOWN_KEY);
|
9439
9517
|
if (!parent) {
|
9518
|
+
if (process.env.NODE_ENV !== "production") {
|
9519
|
+
console.error("[Vant] <DropdownItem> must be a child component of <DropdownMenu>.");
|
9520
|
+
}
|
9440
9521
|
return;
|
9441
9522
|
}
|
9442
9523
|
const getEmitter = (name2) => () => emit(name2);
|
@@ -9637,6 +9718,9 @@
|
|
9637
9718
|
} = useParent(GRID_KEY);
|
9638
9719
|
const route2 = useRoute();
|
9639
9720
|
if (!parent) {
|
9721
|
+
if (process.env.NODE_ENV !== "production") {
|
9722
|
+
console.error("[Vant] <GridItem> must be a child component of <Grid>.");
|
9723
|
+
}
|
9640
9724
|
return;
|
9641
9725
|
}
|
9642
9726
|
const rootStyle = vue.computed(() => {
|
@@ -10431,6 +10515,9 @@
|
|
10431
10515
|
parent
|
10432
10516
|
} = useParent(INDEX_BAR_KEY);
|
10433
10517
|
if (!parent) {
|
10518
|
+
if (process.env.NODE_ENV !== "production") {
|
10519
|
+
console.error("[Vant] <IndexAnchor> must be a child component of <IndexBar>.");
|
10520
|
+
}
|
10434
10521
|
return;
|
10435
10522
|
}
|
10436
10523
|
const isSticky = () => state.active && parent.props.sticky;
|
@@ -12403,22 +12490,23 @@
|
|
12403
12490
|
let popper;
|
12404
12491
|
const wrapperRef = vue.ref();
|
12405
12492
|
const popoverRef = vue.ref();
|
12493
|
+
const getPopoverOptions = () => ({
|
12494
|
+
placement: props.placement,
|
12495
|
+
modifiers: [{
|
12496
|
+
name: "computeStyles",
|
12497
|
+
options: {
|
12498
|
+
adaptive: false,
|
12499
|
+
gpuAcceleration: false
|
12500
|
+
}
|
12501
|
+
}, extend({}, offset_default, {
|
12502
|
+
options: {
|
12503
|
+
offset: props.offset
|
12504
|
+
}
|
12505
|
+
})]
|
12506
|
+
});
|
12406
12507
|
const createPopperInstance = () => {
|
12407
12508
|
if (wrapperRef.value && popoverRef.value) {
|
12408
|
-
return createPopper(wrapperRef.value, popoverRef.value.popupRef.value,
|
12409
|
-
placement: props.placement,
|
12410
|
-
modifiers: [{
|
12411
|
-
name: "computeStyles",
|
12412
|
-
options: {
|
12413
|
-
adaptive: false,
|
12414
|
-
gpuAcceleration: false
|
12415
|
-
}
|
12416
|
-
}, extend({}, offset_default, {
|
12417
|
-
options: {
|
12418
|
-
offset: props.offset
|
12419
|
-
}
|
12420
|
-
})]
|
12421
|
-
});
|
12509
|
+
return createPopper(wrapperRef.value, popoverRef.value.popupRef.value, getPopoverOptions());
|
12422
12510
|
}
|
12423
12511
|
return null;
|
12424
12512
|
};
|
@@ -12430,9 +12518,7 @@
|
|
12430
12518
|
if (!popper) {
|
12431
12519
|
popper = createPopperInstance();
|
12432
12520
|
} else {
|
12433
|
-
popper.setOptions(
|
12434
|
-
placement: props.placement
|
12435
|
-
});
|
12521
|
+
popper.setOptions(getPopoverOptions());
|
12436
12522
|
}
|
12437
12523
|
});
|
12438
12524
|
};
|
@@ -12503,7 +12589,7 @@
|
|
12503
12589
|
popper = null;
|
12504
12590
|
}
|
12505
12591
|
});
|
12506
|
-
vue.watch(() => [props.show, props.placement], updateLocation);
|
12592
|
+
vue.watch(() => [props.show, props.offset, props.placement], updateLocation);
|
12507
12593
|
useClickAway(wrapperRef, onClickAway, {
|
12508
12594
|
eventName: "touchstart"
|
12509
12595
|
});
|
@@ -13276,6 +13362,9 @@
|
|
13276
13362
|
index
|
13277
13363
|
} = useParent(SIDEBAR_KEY);
|
13278
13364
|
if (!parent) {
|
13365
|
+
if (process.env.NODE_ENV !== "production") {
|
13366
|
+
console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");
|
13367
|
+
}
|
13279
13368
|
return;
|
13280
13369
|
}
|
13281
13370
|
const onClick = () => {
|
@@ -13703,6 +13792,9 @@
|
|
13703
13792
|
index
|
13704
13793
|
} = useParent(STEPS_KEY);
|
13705
13794
|
if (!parent) {
|
13795
|
+
if (process.env.NODE_ENV !== "production") {
|
13796
|
+
console.error("[Vant] <Step> must be a child component of <Steps>.");
|
13797
|
+
}
|
13706
13798
|
return;
|
13707
13799
|
}
|
13708
13800
|
const parentProps = parent.props;
|
@@ -14400,6 +14492,9 @@
|
|
14400
14492
|
index
|
14401
14493
|
} = useParent(TABBAR_KEY);
|
14402
14494
|
if (!parent) {
|
14495
|
+
if (process.env.NODE_ENV !== "production") {
|
14496
|
+
console.error("[Vant] <TabbarItem> must be a child component of <Tabbar>.");
|
14497
|
+
}
|
14403
14498
|
return;
|
14404
14499
|
}
|
14405
14500
|
const active = vue.computed(() => {
|
@@ -14893,7 +14988,7 @@
|
|
14893
14988
|
if (props.previewFullImage) {
|
14894
14989
|
const imageFiles = props.modelValue.filter(isImageFile);
|
14895
14990
|
const images = imageFiles.map((item2) => {
|
14896
|
-
if (item2.file && !item2.url) {
|
14991
|
+
if (item2.file && !item2.url && item2.status !== "failed") {
|
14897
14992
|
item2.url = URL.createObjectURL(item2.file);
|
14898
14993
|
urls.push(item2.url);
|
14899
14994
|
}
|
@@ -15221,10 +15316,15 @@
|
|
15221
15316
|
}, () => {
|
15222
15317
|
cb();
|
15223
15318
|
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})`);
|
15224
15321
|
});
|
15225
15322
|
}
|
15226
15323
|
load(onFinish = noop) {
|
15227
15324
|
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
|
+
}
|
15228
15328
|
onFinish();
|
15229
15329
|
return;
|
15230
15330
|
}
|
@@ -15611,6 +15711,9 @@
|
|
15611
15711
|
let src = value;
|
15612
15712
|
let { loading, error } = this.options;
|
15613
15713
|
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
|
+
}
|
15614
15717
|
({ src } = value);
|
15615
15718
|
loading = value.loading || this.options.loading;
|
15616
15719
|
error = value.error || this.options.error;
|
@@ -15798,6 +15901,9 @@
|
|
15798
15901
|
},
|
15799
15902
|
load(onFinish = noop) {
|
15800
15903
|
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
|
+
}
|
15801
15907
|
onFinish();
|
15802
15908
|
return;
|
15803
15909
|
}
|
@@ -15837,7 +15943,7 @@
|
|
15837
15943
|
});
|
15838
15944
|
}
|
15839
15945
|
};
|
15840
|
-
const version = "3.5.
|
15946
|
+
const version = "3.5.3";
|
15841
15947
|
function install(app) {
|
15842
15948
|
const components = [
|
15843
15949
|
ActionBar,
|
@@ -16024,7 +16130,7 @@
|
|
16024
16130
|
exports2.Toast = Toast;
|
16025
16131
|
exports2.TreeSelect = TreeSelect;
|
16026
16132
|
exports2.Uploader = Uploader;
|
16027
|
-
exports2
|
16133
|
+
exports2.default = stdin_default;
|
16028
16134
|
exports2.install = install;
|
16029
16135
|
exports2.version = version;
|
16030
16136
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|