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.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
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 {
|
3
|
+
import { offsetModifier, createPopper } from "@vant/popperjs";
|
4
4
|
function noop() {
|
5
5
|
}
|
6
6
|
const extend = Object.assign;
|
@@ -393,19 +393,23 @@ function withInstall(options) {
|
|
393
393
|
};
|
394
394
|
return options;
|
395
395
|
}
|
396
|
-
const useHeight = (element) => {
|
396
|
+
const useHeight = (element, withSafeArea) => {
|
397
397
|
const height = ref();
|
398
398
|
const setHeight = () => {
|
399
399
|
height.value = useRect(element).height;
|
400
400
|
};
|
401
401
|
onMounted(() => {
|
402
402
|
nextTick(setHeight);
|
403
|
-
|
403
|
+
if (withSafeArea) {
|
404
|
+
for (let i = 1; i <= 3; i++) {
|
405
|
+
setTimeout(setHeight, 100 * i);
|
406
|
+
}
|
407
|
+
}
|
404
408
|
});
|
405
409
|
return height;
|
406
410
|
};
|
407
411
|
function usePlaceholder(contentRef, bem2) {
|
408
|
-
const height = useHeight(contentRef);
|
412
|
+
const height = useHeight(contentRef, true);
|
409
413
|
return (renderContent) => createVNode("div", {
|
410
414
|
"class": bem2("placeholder"),
|
411
415
|
"style": {
|
@@ -1743,6 +1747,14 @@ var stdin_default$1p = defineComponent({
|
|
1743
1747
|
emit,
|
1744
1748
|
slots
|
1745
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
|
+
}
|
1746
1758
|
const hasOptions = ref(false);
|
1747
1759
|
const formattedColumns = ref([]);
|
1748
1760
|
const columnsFieldNames = computed(() => {
|
@@ -2593,6 +2605,9 @@ let current = 0;
|
|
2593
2605
|
function useId$1() {
|
2594
2606
|
const vm = getCurrentInstance();
|
2595
2607
|
const { name: name2 = "unknown" } = (vm == null ? void 0 : vm.type) || {};
|
2608
|
+
if (process.env.NODE_ENV === "test") {
|
2609
|
+
return name2;
|
2610
|
+
}
|
2596
2611
|
return `${name2}-${++current}`;
|
2597
2612
|
}
|
2598
2613
|
const [name$1e, bem$1a] = createNamespace("field");
|
@@ -4773,6 +4788,7 @@ var stdin_default$17 = defineComponent({
|
|
4773
4788
|
}
|
4774
4789
|
return !currentDate.value;
|
4775
4790
|
});
|
4791
|
+
const getSelectedDate = () => currentDate.value;
|
4776
4792
|
const onScroll = () => {
|
4777
4793
|
const top = getScrollTop(bodyRef.value);
|
4778
4794
|
const bottom = top + bodyHeight;
|
@@ -5015,7 +5031,8 @@ var stdin_default$17 = defineComponent({
|
|
5015
5031
|
});
|
5016
5032
|
useExpose({
|
5017
5033
|
reset,
|
5018
|
-
scrollToDate
|
5034
|
+
scrollToDate,
|
5035
|
+
getSelectedDate
|
5019
5036
|
});
|
5020
5037
|
onMountedOrActivated(init);
|
5021
5038
|
return () => {
|
@@ -5981,6 +5998,16 @@ var stdin_default$10 = defineComponent({
|
|
5981
5998
|
emit,
|
5982
5999
|
slots
|
5983
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
|
+
}
|
5984
6011
|
let tabHeight;
|
5985
6012
|
let lockScroll;
|
5986
6013
|
let stickyFixed;
|
@@ -6306,6 +6333,9 @@ var stdin_default$$ = defineComponent({
|
|
6306
6333
|
index
|
6307
6334
|
} = useParent(SWIPE_KEY);
|
6308
6335
|
if (!parent) {
|
6336
|
+
if (process.env.NODE_ENV !== "production") {
|
6337
|
+
console.error("[Vant] <SwipeItem> must be a child component of <Swipe>.");
|
6338
|
+
}
|
6309
6339
|
return;
|
6310
6340
|
}
|
6311
6341
|
const style = computed(() => {
|
@@ -6384,6 +6414,9 @@ var stdin_default$_ = defineComponent({
|
|
6384
6414
|
index
|
6385
6415
|
} = useParent(TABS_KEY);
|
6386
6416
|
if (!parent) {
|
6417
|
+
if (process.env.NODE_ENV !== "production") {
|
6418
|
+
console.error("[Vant] <Tab> must be a child component of <Tabs>.");
|
6419
|
+
}
|
6387
6420
|
return;
|
6388
6421
|
}
|
6389
6422
|
const getName = () => {
|
@@ -7146,6 +7179,17 @@ const collapseProps = {
|
|
7146
7179
|
default: ""
|
7147
7180
|
}
|
7148
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
|
+
}
|
7149
7193
|
var stdin_default$S = defineComponent({
|
7150
7194
|
name: name$M,
|
7151
7195
|
props: collapseProps,
|
@@ -7155,7 +7199,8 @@ var stdin_default$S = defineComponent({
|
|
7155
7199
|
slots
|
7156
7200
|
}) {
|
7157
7201
|
const {
|
7158
|
-
linkChildren
|
7202
|
+
linkChildren,
|
7203
|
+
children
|
7159
7204
|
} = useChildren(COLLAPSE_KEY);
|
7160
7205
|
const updateName = (name2) => {
|
7161
7206
|
emit("change", name2);
|
@@ -7174,13 +7219,41 @@ var stdin_default$S = defineComponent({
|
|
7174
7219
|
updateName(modelValue.filter((activeName) => activeName !== name2));
|
7175
7220
|
}
|
7176
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
|
+
};
|
7177
7244
|
const isExpanded = (name2) => {
|
7178
7245
|
const {
|
7179
7246
|
accordion,
|
7180
7247
|
modelValue
|
7181
7248
|
} = props;
|
7249
|
+
if (process.env.NODE_ENV !== "production" && !validateModelValue(modelValue, accordion)) {
|
7250
|
+
return false;
|
7251
|
+
}
|
7182
7252
|
return accordion ? modelValue === name2 : modelValue.includes(name2);
|
7183
7253
|
};
|
7254
|
+
useExpose({
|
7255
|
+
toggleAll
|
7256
|
+
});
|
7184
7257
|
linkChildren({
|
7185
7258
|
toggle,
|
7186
7259
|
isExpanded
|
@@ -7218,6 +7291,9 @@ var stdin_default$R = defineComponent({
|
|
7218
7291
|
index
|
7219
7292
|
} = useParent(COLLAPSE_KEY);
|
7220
7293
|
if (!parent) {
|
7294
|
+
if (process.env.NODE_ENV !== "production") {
|
7295
|
+
console.error("[Vant] <CollapseItem> must be a child component of <Collapse>.");
|
7296
|
+
}
|
7221
7297
|
return;
|
7222
7298
|
}
|
7223
7299
|
const name2 = computed(() => {
|
@@ -7306,7 +7382,9 @@ var stdin_default$R = defineComponent({
|
|
7306
7382
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]), [[vShow, show.value]]);
|
7307
7383
|
});
|
7308
7384
|
useExpose({
|
7309
|
-
toggle
|
7385
|
+
toggle,
|
7386
|
+
expanded,
|
7387
|
+
itemName: name2
|
7310
7388
|
});
|
7311
7389
|
return () => createVNode("div", {
|
7312
7390
|
"class": [bem$K({
|
@@ -9083,6 +9161,9 @@ var stdin_default$C = defineComponent({
|
|
9083
9161
|
index
|
9084
9162
|
} = useParent(DROPDOWN_KEY);
|
9085
9163
|
if (!parent) {
|
9164
|
+
if (process.env.NODE_ENV !== "production") {
|
9165
|
+
console.error("[Vant] <DropdownItem> must be a child component of <DropdownMenu>.");
|
9166
|
+
}
|
9086
9167
|
return;
|
9087
9168
|
}
|
9088
9169
|
const getEmitter = (name2) => () => emit(name2);
|
@@ -9283,6 +9364,9 @@ var stdin_default$A = defineComponent({
|
|
9283
9364
|
} = useParent(GRID_KEY);
|
9284
9365
|
const route2 = useRoute();
|
9285
9366
|
if (!parent) {
|
9367
|
+
if (process.env.NODE_ENV !== "production") {
|
9368
|
+
console.error("[Vant] <GridItem> must be a child component of <Grid>.");
|
9369
|
+
}
|
9286
9370
|
return;
|
9287
9371
|
}
|
9288
9372
|
const rootStyle = computed(() => {
|
@@ -10077,6 +10161,9 @@ var stdin_default$w = defineComponent({
|
|
10077
10161
|
parent
|
10078
10162
|
} = useParent(INDEX_BAR_KEY);
|
10079
10163
|
if (!parent) {
|
10164
|
+
if (process.env.NODE_ENV !== "production") {
|
10165
|
+
console.error("[Vant] <IndexAnchor> must be a child component of <IndexBar>.");
|
10166
|
+
}
|
10080
10167
|
return;
|
10081
10168
|
}
|
10082
10169
|
const isSticky = () => state.active && parent.props.sticky;
|
@@ -11155,22 +11242,23 @@ var stdin_default$n = defineComponent({
|
|
11155
11242
|
let popper;
|
11156
11243
|
const wrapperRef = ref();
|
11157
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
|
+
});
|
11158
11259
|
const createPopperInstance = () => {
|
11159
11260
|
if (wrapperRef.value && popoverRef.value) {
|
11160
|
-
return createPopper(wrapperRef.value, popoverRef.value.popupRef.value,
|
11161
|
-
placement: props.placement,
|
11162
|
-
modifiers: [{
|
11163
|
-
name: "computeStyles",
|
11164
|
-
options: {
|
11165
|
-
adaptive: false,
|
11166
|
-
gpuAcceleration: false
|
11167
|
-
}
|
11168
|
-
}, extend({}, offsetModifier, {
|
11169
|
-
options: {
|
11170
|
-
offset: props.offset
|
11171
|
-
}
|
11172
|
-
})]
|
11173
|
-
});
|
11261
|
+
return createPopper(wrapperRef.value, popoverRef.value.popupRef.value, getPopoverOptions());
|
11174
11262
|
}
|
11175
11263
|
return null;
|
11176
11264
|
};
|
@@ -11182,9 +11270,7 @@ var stdin_default$n = defineComponent({
|
|
11182
11270
|
if (!popper) {
|
11183
11271
|
popper = createPopperInstance();
|
11184
11272
|
} else {
|
11185
|
-
popper.setOptions(
|
11186
|
-
placement: props.placement
|
11187
|
-
});
|
11273
|
+
popper.setOptions(getPopoverOptions());
|
11188
11274
|
}
|
11189
11275
|
});
|
11190
11276
|
};
|
@@ -11255,7 +11341,7 @@ var stdin_default$n = defineComponent({
|
|
11255
11341
|
popper = null;
|
11256
11342
|
}
|
11257
11343
|
});
|
11258
|
-
watch(() => [props.show, props.placement], updateLocation);
|
11344
|
+
watch(() => [props.show, props.offset, props.placement], updateLocation);
|
11259
11345
|
useClickAway(wrapperRef, onClickAway, {
|
11260
11346
|
eventName: "touchstart"
|
11261
11347
|
});
|
@@ -12028,6 +12114,9 @@ var stdin_default$g = defineComponent({
|
|
12028
12114
|
index
|
12029
12115
|
} = useParent(SIDEBAR_KEY);
|
12030
12116
|
if (!parent) {
|
12117
|
+
if (process.env.NODE_ENV !== "production") {
|
12118
|
+
console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");
|
12119
|
+
}
|
12031
12120
|
return;
|
12032
12121
|
}
|
12033
12122
|
const onClick = () => {
|
@@ -12455,6 +12544,9 @@ var stdin_default$c = defineComponent({
|
|
12455
12544
|
index
|
12456
12545
|
} = useParent(STEPS_KEY);
|
12457
12546
|
if (!parent) {
|
12547
|
+
if (process.env.NODE_ENV !== "production") {
|
12548
|
+
console.error("[Vant] <Step> must be a child component of <Steps>.");
|
12549
|
+
}
|
12458
12550
|
return;
|
12459
12551
|
}
|
12460
12552
|
const parentProps = parent.props;
|
@@ -13152,6 +13244,9 @@ var stdin_default$7 = defineComponent({
|
|
13152
13244
|
index
|
13153
13245
|
} = useParent(TABBAR_KEY);
|
13154
13246
|
if (!parent) {
|
13247
|
+
if (process.env.NODE_ENV !== "production") {
|
13248
|
+
console.error("[Vant] <TabbarItem> must be a child component of <Tabbar>.");
|
13249
|
+
}
|
13155
13250
|
return;
|
13156
13251
|
}
|
13157
13252
|
const active = computed(() => {
|
@@ -13645,7 +13740,7 @@ var stdin_default$4 = defineComponent({
|
|
13645
13740
|
if (props.previewFullImage) {
|
13646
13741
|
const imageFiles = props.modelValue.filter(isImageFile);
|
13647
13742
|
const images = imageFiles.map((item2) => {
|
13648
|
-
if (item2.file && !item2.url) {
|
13743
|
+
if (item2.file && !item2.url && item2.status !== "failed") {
|
13649
13744
|
item2.url = URL.createObjectURL(item2.file);
|
13650
13745
|
urls.push(item2.url);
|
13651
13746
|
}
|
@@ -13973,10 +14068,15 @@ class ReactiveListener {
|
|
13973
14068
|
}, () => {
|
13974
14069
|
cb();
|
13975
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})`);
|
13976
14073
|
});
|
13977
14074
|
}
|
13978
14075
|
load(onFinish = noop) {
|
13979
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
|
+
}
|
13980
14080
|
onFinish();
|
13981
14081
|
return;
|
13982
14082
|
}
|
@@ -14363,6 +14463,9 @@ function stdin_default$3() {
|
|
14363
14463
|
let src = value;
|
14364
14464
|
let { loading, error } = this.options;
|
14365
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
|
+
}
|
14366
14469
|
({ src } = value);
|
14367
14470
|
loading = value.loading || this.options.loading;
|
14368
14471
|
error = value.error || this.options.error;
|
@@ -14550,6 +14653,9 @@ var stdin_default$1 = (lazyManager) => ({
|
|
14550
14653
|
},
|
14551
14654
|
load(onFinish = noop) {
|
14552
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
|
+
}
|
14553
14659
|
onFinish();
|
14554
14660
|
return;
|
14555
14661
|
}
|
@@ -14589,7 +14695,7 @@ const Lazyload = {
|
|
14589
14695
|
});
|
14590
14696
|
}
|
14591
14697
|
};
|
14592
|
-
const version = "3.5.
|
14698
|
+
const version = "3.5.3";
|
14593
14699
|
function install(app) {
|
14594
14700
|
const components = [
|
14595
14701
|
ActionBar,
|
@@ -14690,4 +14796,94 @@ var stdin_default = {
|
|
14690
14796
|
install,
|
14691
14797
|
version
|
14692
14798
|
};
|
14693
|
-
export {
|
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
|
+
};
|