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/utils/basic.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { ComponentPublicInstance } from 'vue';
|
2
2
|
export declare function noop(): void;
|
3
3
|
export declare const extend: {
|
4
|
-
<T, U>(target: T, source: U): T & U;
|
5
|
-
<T_1, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
|
6
|
-
<T_2, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
|
4
|
+
<T extends {}, U>(target: T, source: U): T & U;
|
5
|
+
<T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
|
6
|
+
<T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
|
7
7
|
(target: object, ...sources: any[]): any;
|
8
8
|
};
|
9
9
|
export declare const inBrowser: boolean;
|
package/lib/utils/create.d.ts
CHANGED
@@ -12,6 +12,6 @@ export declare type Mods = Mod | Mod[];
|
|
12
12
|
* b('text', { disabled }) // 'button__text button__text--disabled'
|
13
13
|
* b(['disabled', 'primary']) // 'button button--disabled button--primary'
|
14
14
|
*/
|
15
|
-
export declare function createBEM(name: string): (el?: Mods
|
15
|
+
export declare function createBEM(name: string): (el?: Mods, mods?: Mods) => Mods;
|
16
16
|
export declare type BEM = ReturnType<typeof createBEM>;
|
17
17
|
export declare function createNamespace(name: string): readonly [string, (el?: Mods | undefined, mods?: Mods | undefined) => Mods, (path: string, ...args: unknown[]) => any];
|
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
|
-
|
4
|
-
|
5
|
-
|
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,19 +395,23 @@ function withInstall(options) {
|
|
395
395
|
};
|
396
396
|
return options;
|
397
397
|
}
|
398
|
-
const useHeight = (element) => {
|
398
|
+
const useHeight = (element, withSafeArea) => {
|
399
399
|
const height = vue.ref();
|
400
400
|
const setHeight = () => {
|
401
401
|
height.value = use.useRect(element).height;
|
402
402
|
};
|
403
403
|
vue.onMounted(() => {
|
404
404
|
vue.nextTick(setHeight);
|
405
|
-
|
405
|
+
if (withSafeArea) {
|
406
|
+
for (let i = 1; i <= 3; i++) {
|
407
|
+
setTimeout(setHeight, 100 * i);
|
408
|
+
}
|
409
|
+
}
|
406
410
|
});
|
407
411
|
return height;
|
408
412
|
};
|
409
413
|
function usePlaceholder(contentRef, bem2) {
|
410
|
-
const height = useHeight(contentRef);
|
414
|
+
const height = useHeight(contentRef, true);
|
411
415
|
return (renderContent) => vue.createVNode("div", {
|
412
416
|
"class": bem2("placeholder"),
|
413
417
|
"style": {
|
@@ -1745,6 +1749,14 @@ var stdin_default$1p = vue.defineComponent({
|
|
1745
1749
|
emit,
|
1746
1750
|
slots
|
1747
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
|
+
}
|
1748
1760
|
const hasOptions = vue.ref(false);
|
1749
1761
|
const formattedColumns = vue.ref([]);
|
1750
1762
|
const columnsFieldNames = vue.computed(() => {
|
@@ -2595,6 +2607,9 @@ let current = 0;
|
|
2595
2607
|
function useId$1() {
|
2596
2608
|
const vm = vue.getCurrentInstance();
|
2597
2609
|
const { name: name2 = "unknown" } = (vm == null ? void 0 : vm.type) || {};
|
2610
|
+
if (process.env.NODE_ENV === "test") {
|
2611
|
+
return name2;
|
2612
|
+
}
|
2598
2613
|
return `${name2}-${++current}`;
|
2599
2614
|
}
|
2600
2615
|
const [name$1e, bem$1a] = createNamespace("field");
|
@@ -4775,6 +4790,7 @@ var stdin_default$17 = vue.defineComponent({
|
|
4775
4790
|
}
|
4776
4791
|
return !currentDate.value;
|
4777
4792
|
});
|
4793
|
+
const getSelectedDate = () => currentDate.value;
|
4778
4794
|
const onScroll = () => {
|
4779
4795
|
const top = getScrollTop(bodyRef.value);
|
4780
4796
|
const bottom = top + bodyHeight;
|
@@ -5017,7 +5033,8 @@ var stdin_default$17 = vue.defineComponent({
|
|
5017
5033
|
});
|
5018
5034
|
useExpose({
|
5019
5035
|
reset,
|
5020
|
-
scrollToDate
|
5036
|
+
scrollToDate,
|
5037
|
+
getSelectedDate
|
5021
5038
|
});
|
5022
5039
|
use.onMountedOrActivated(init);
|
5023
5040
|
return () => {
|
@@ -5983,6 +6000,16 @@ var stdin_default$10 = vue.defineComponent({
|
|
5983
6000
|
emit,
|
5984
6001
|
slots
|
5985
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
|
+
}
|
5986
6013
|
let tabHeight;
|
5987
6014
|
let lockScroll;
|
5988
6015
|
let stickyFixed;
|
@@ -6308,6 +6335,9 @@ var stdin_default$$ = vue.defineComponent({
|
|
6308
6335
|
index
|
6309
6336
|
} = use.useParent(SWIPE_KEY);
|
6310
6337
|
if (!parent) {
|
6338
|
+
if (process.env.NODE_ENV !== "production") {
|
6339
|
+
console.error("[Vant] <SwipeItem> must be a child component of <Swipe>.");
|
6340
|
+
}
|
6311
6341
|
return;
|
6312
6342
|
}
|
6313
6343
|
const style = vue.computed(() => {
|
@@ -6386,6 +6416,9 @@ var stdin_default$_ = vue.defineComponent({
|
|
6386
6416
|
index
|
6387
6417
|
} = use.useParent(TABS_KEY);
|
6388
6418
|
if (!parent) {
|
6419
|
+
if (process.env.NODE_ENV !== "production") {
|
6420
|
+
console.error("[Vant] <Tab> must be a child component of <Tabs>.");
|
6421
|
+
}
|
6389
6422
|
return;
|
6390
6423
|
}
|
6391
6424
|
const getName = () => {
|
@@ -7148,6 +7181,17 @@ const collapseProps = {
|
|
7148
7181
|
default: ""
|
7149
7182
|
}
|
7150
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
|
+
}
|
7151
7195
|
var stdin_default$S = vue.defineComponent({
|
7152
7196
|
name: name$M,
|
7153
7197
|
props: collapseProps,
|
@@ -7157,7 +7201,8 @@ var stdin_default$S = vue.defineComponent({
|
|
7157
7201
|
slots
|
7158
7202
|
}) {
|
7159
7203
|
const {
|
7160
|
-
linkChildren
|
7204
|
+
linkChildren,
|
7205
|
+
children
|
7161
7206
|
} = use.useChildren(COLLAPSE_KEY);
|
7162
7207
|
const updateName = (name2) => {
|
7163
7208
|
emit("change", name2);
|
@@ -7176,13 +7221,41 @@ var stdin_default$S = vue.defineComponent({
|
|
7176
7221
|
updateName(modelValue.filter((activeName) => activeName !== name2));
|
7177
7222
|
}
|
7178
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
|
+
};
|
7179
7246
|
const isExpanded = (name2) => {
|
7180
7247
|
const {
|
7181
7248
|
accordion,
|
7182
7249
|
modelValue
|
7183
7250
|
} = props;
|
7251
|
+
if (process.env.NODE_ENV !== "production" && !validateModelValue(modelValue, accordion)) {
|
7252
|
+
return false;
|
7253
|
+
}
|
7184
7254
|
return accordion ? modelValue === name2 : modelValue.includes(name2);
|
7185
7255
|
};
|
7256
|
+
useExpose({
|
7257
|
+
toggleAll
|
7258
|
+
});
|
7186
7259
|
linkChildren({
|
7187
7260
|
toggle,
|
7188
7261
|
isExpanded
|
@@ -7220,6 +7293,9 @@ var stdin_default$R = vue.defineComponent({
|
|
7220
7293
|
index
|
7221
7294
|
} = use.useParent(COLLAPSE_KEY);
|
7222
7295
|
if (!parent) {
|
7296
|
+
if (process.env.NODE_ENV !== "production") {
|
7297
|
+
console.error("[Vant] <CollapseItem> must be a child component of <Collapse>.");
|
7298
|
+
}
|
7223
7299
|
return;
|
7224
7300
|
}
|
7225
7301
|
const name2 = vue.computed(() => {
|
@@ -7308,7 +7384,9 @@ var stdin_default$R = vue.defineComponent({
|
|
7308
7384
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]), [[vue.vShow, show.value]]);
|
7309
7385
|
});
|
7310
7386
|
useExpose({
|
7311
|
-
toggle
|
7387
|
+
toggle,
|
7388
|
+
expanded,
|
7389
|
+
itemName: name2
|
7312
7390
|
});
|
7313
7391
|
return () => vue.createVNode("div", {
|
7314
7392
|
"class": [bem$K({
|
@@ -9085,6 +9163,9 @@ var stdin_default$C = vue.defineComponent({
|
|
9085
9163
|
index
|
9086
9164
|
} = use.useParent(DROPDOWN_KEY);
|
9087
9165
|
if (!parent) {
|
9166
|
+
if (process.env.NODE_ENV !== "production") {
|
9167
|
+
console.error("[Vant] <DropdownItem> must be a child component of <DropdownMenu>.");
|
9168
|
+
}
|
9088
9169
|
return;
|
9089
9170
|
}
|
9090
9171
|
const getEmitter = (name2) => () => emit(name2);
|
@@ -9285,6 +9366,9 @@ var stdin_default$A = vue.defineComponent({
|
|
9285
9366
|
} = use.useParent(GRID_KEY);
|
9286
9367
|
const route2 = useRoute();
|
9287
9368
|
if (!parent) {
|
9369
|
+
if (process.env.NODE_ENV !== "production") {
|
9370
|
+
console.error("[Vant] <GridItem> must be a child component of <Grid>.");
|
9371
|
+
}
|
9288
9372
|
return;
|
9289
9373
|
}
|
9290
9374
|
const rootStyle = vue.computed(() => {
|
@@ -10079,6 +10163,9 @@ var stdin_default$w = vue.defineComponent({
|
|
10079
10163
|
parent
|
10080
10164
|
} = use.useParent(INDEX_BAR_KEY);
|
10081
10165
|
if (!parent) {
|
10166
|
+
if (process.env.NODE_ENV !== "production") {
|
10167
|
+
console.error("[Vant] <IndexAnchor> must be a child component of <IndexBar>.");
|
10168
|
+
}
|
10082
10169
|
return;
|
10083
10170
|
}
|
10084
10171
|
const isSticky = () => state.active && parent.props.sticky;
|
@@ -11157,22 +11244,23 @@ var stdin_default$n = vue.defineComponent({
|
|
11157
11244
|
let popper;
|
11158
11245
|
const wrapperRef = vue.ref();
|
11159
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
|
+
});
|
11160
11261
|
const createPopperInstance = () => {
|
11161
11262
|
if (wrapperRef.value && popoverRef.value) {
|
11162
|
-
return popperjs.createPopper(wrapperRef.value, popoverRef.value.popupRef.value,
|
11163
|
-
placement: props.placement,
|
11164
|
-
modifiers: [{
|
11165
|
-
name: "computeStyles",
|
11166
|
-
options: {
|
11167
|
-
adaptive: false,
|
11168
|
-
gpuAcceleration: false
|
11169
|
-
}
|
11170
|
-
}, extend({}, popperjs.offsetModifier, {
|
11171
|
-
options: {
|
11172
|
-
offset: props.offset
|
11173
|
-
}
|
11174
|
-
})]
|
11175
|
-
});
|
11263
|
+
return popperjs.createPopper(wrapperRef.value, popoverRef.value.popupRef.value, getPopoverOptions());
|
11176
11264
|
}
|
11177
11265
|
return null;
|
11178
11266
|
};
|
@@ -11184,9 +11272,7 @@ var stdin_default$n = vue.defineComponent({
|
|
11184
11272
|
if (!popper) {
|
11185
11273
|
popper = createPopperInstance();
|
11186
11274
|
} else {
|
11187
|
-
popper.setOptions(
|
11188
|
-
placement: props.placement
|
11189
|
-
});
|
11275
|
+
popper.setOptions(getPopoverOptions());
|
11190
11276
|
}
|
11191
11277
|
});
|
11192
11278
|
};
|
@@ -11257,7 +11343,7 @@ var stdin_default$n = vue.defineComponent({
|
|
11257
11343
|
popper = null;
|
11258
11344
|
}
|
11259
11345
|
});
|
11260
|
-
vue.watch(() => [props.show, props.placement], updateLocation);
|
11346
|
+
vue.watch(() => [props.show, props.offset, props.placement], updateLocation);
|
11261
11347
|
use.useClickAway(wrapperRef, onClickAway, {
|
11262
11348
|
eventName: "touchstart"
|
11263
11349
|
});
|
@@ -12030,6 +12116,9 @@ var stdin_default$g = vue.defineComponent({
|
|
12030
12116
|
index
|
12031
12117
|
} = use.useParent(SIDEBAR_KEY);
|
12032
12118
|
if (!parent) {
|
12119
|
+
if (process.env.NODE_ENV !== "production") {
|
12120
|
+
console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");
|
12121
|
+
}
|
12033
12122
|
return;
|
12034
12123
|
}
|
12035
12124
|
const onClick = () => {
|
@@ -12457,6 +12546,9 @@ var stdin_default$c = vue.defineComponent({
|
|
12457
12546
|
index
|
12458
12547
|
} = use.useParent(STEPS_KEY);
|
12459
12548
|
if (!parent) {
|
12549
|
+
if (process.env.NODE_ENV !== "production") {
|
12550
|
+
console.error("[Vant] <Step> must be a child component of <Steps>.");
|
12551
|
+
}
|
12460
12552
|
return;
|
12461
12553
|
}
|
12462
12554
|
const parentProps = parent.props;
|
@@ -13154,6 +13246,9 @@ var stdin_default$7 = vue.defineComponent({
|
|
13154
13246
|
index
|
13155
13247
|
} = use.useParent(TABBAR_KEY);
|
13156
13248
|
if (!parent) {
|
13249
|
+
if (process.env.NODE_ENV !== "production") {
|
13250
|
+
console.error("[Vant] <TabbarItem> must be a child component of <Tabbar>.");
|
13251
|
+
}
|
13157
13252
|
return;
|
13158
13253
|
}
|
13159
13254
|
const active = vue.computed(() => {
|
@@ -13647,7 +13742,7 @@ var stdin_default$4 = vue.defineComponent({
|
|
13647
13742
|
if (props.previewFullImage) {
|
13648
13743
|
const imageFiles = props.modelValue.filter(isImageFile);
|
13649
13744
|
const images = imageFiles.map((item2) => {
|
13650
|
-
if (item2.file && !item2.url) {
|
13745
|
+
if (item2.file && !item2.url && item2.status !== "failed") {
|
13651
13746
|
item2.url = URL.createObjectURL(item2.file);
|
13652
13747
|
urls.push(item2.url);
|
13653
13748
|
}
|
@@ -13975,10 +14070,15 @@ class ReactiveListener {
|
|
13975
14070
|
}, () => {
|
13976
14071
|
cb();
|
13977
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})`);
|
13978
14075
|
});
|
13979
14076
|
}
|
13980
14077
|
load(onFinish = noop) {
|
13981
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
|
+
}
|
13982
14082
|
onFinish();
|
13983
14083
|
return;
|
13984
14084
|
}
|
@@ -14365,6 +14465,9 @@ function stdin_default$3() {
|
|
14365
14465
|
let src = value;
|
14366
14466
|
let { loading, error } = this.options;
|
14367
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
|
+
}
|
14368
14471
|
({ src } = value);
|
14369
14472
|
loading = value.loading || this.options.loading;
|
14370
14473
|
error = value.error || this.options.error;
|
@@ -14552,6 +14655,9 @@ var stdin_default$1 = (lazyManager) => ({
|
|
14552
14655
|
},
|
14553
14656
|
load(onFinish = noop) {
|
14554
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
|
+
}
|
14555
14661
|
onFinish();
|
14556
14662
|
return;
|
14557
14663
|
}
|
@@ -14591,7 +14697,7 @@ const Lazyload = {
|
|
14591
14697
|
});
|
14592
14698
|
}
|
14593
14699
|
};
|
14594
|
-
const version = "3.5.
|
14700
|
+
const version = "3.5.3";
|
14595
14701
|
function install(app) {
|
14596
14702
|
const components = [
|
14597
14703
|
ActionBar,
|
@@ -14778,6 +14884,6 @@ exports.Tag = Tag;
|
|
14778
14884
|
exports.Toast = Toast;
|
14779
14885
|
exports.TreeSelect = TreeSelect;
|
14780
14886
|
exports.Uploader = Uploader;
|
14781
|
-
exports
|
14887
|
+
exports.default = stdin_default;
|
14782
14888
|
exports.install = install;
|
14783
14889
|
exports.version = version;
|