vant 4.9.18 → 4.9.20
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 +1 -0
- package/es/action-sheet/ActionSheet.d.ts +3 -0
- package/es/action-sheet/index.d.ts +2 -0
- package/es/barrage/Barrage.mjs +1 -1
- package/es/dialog/Dialog.d.ts +3 -0
- package/es/dialog/index.d.ts +2 -0
- package/es/dialog/types.d.ts +2 -0
- package/es/dropdown-item/DropdownItem.mjs +3 -0
- package/es/dropdown-menu/DropdownMenu.mjs +3 -1
- package/es/dropdown-menu/types.d.ts +2 -0
- package/es/floating-bubble/FloatingBubble.d.ts +5 -5
- package/es/floating-bubble/FloatingBubble.mjs +14 -9
- package/es/floating-bubble/index.d.ts +3 -3
- package/es/floating-bubble/types.d.ts +4 -0
- package/es/image/Image.d.ts +3 -0
- package/es/image/Image.mjs +3 -1
- package/es/image/index.d.ts +2 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/notify/Notify.d.ts +3 -0
- package/es/notify/index.d.ts +2 -0
- package/es/overlay/Overlay.mjs +5 -3
- package/es/picker/Picker.mjs +8 -3
- package/es/picker/utils.mjs +1 -1
- package/es/popup/Popup.d.ts +3 -0
- package/es/popup/Popup.mjs +10 -9
- package/es/popup/index.d.ts +2 -0
- package/es/popup/shared.d.ts +2 -0
- package/es/popup/shared.mjs +2 -0
- package/es/share-sheet/ShareSheet.d.ts +3 -0
- package/es/share-sheet/index.d.ts +2 -0
- package/es/tabbar-item/TabbarItem.mjs +1 -1
- package/es/tabs/Tabs.mjs +2 -3
- package/es/watermark/Watermark.mjs +17 -17
- package/lib/action-sheet/ActionSheet.d.ts +3 -0
- package/lib/action-sheet/index.d.ts +2 -0
- package/lib/barrage/Barrage.js +1 -1
- package/lib/dialog/Dialog.d.ts +3 -0
- package/lib/dialog/index.d.ts +2 -0
- package/lib/dialog/types.d.ts +2 -0
- package/lib/dropdown-item/DropdownItem.js +3 -0
- package/lib/dropdown-menu/DropdownMenu.js +3 -1
- package/lib/dropdown-menu/types.d.ts +2 -0
- package/lib/floating-bubble/FloatingBubble.d.ts +5 -5
- package/lib/floating-bubble/FloatingBubble.js +13 -8
- package/lib/floating-bubble/index.d.ts +3 -3
- package/lib/floating-bubble/types.d.ts +4 -0
- package/lib/image/Image.d.ts +3 -0
- package/lib/image/Image.js +3 -1
- package/lib/image/index.d.ts +2 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/notify/Notify.d.ts +3 -0
- package/lib/notify/index.d.ts +2 -0
- package/lib/overlay/Overlay.js +4 -2
- package/lib/picker/Picker.js +8 -3
- package/lib/picker/utils.js +1 -1
- package/lib/popup/Popup.d.ts +3 -0
- package/lib/popup/Popup.js +10 -9
- package/lib/popup/index.d.ts +2 -0
- package/lib/popup/shared.d.ts +2 -0
- package/lib/popup/shared.js +2 -0
- package/lib/share-sheet/ShareSheet.d.ts +3 -0
- package/lib/share-sheet/index.d.ts +2 -0
- package/lib/tabbar-item/TabbarItem.js +1 -1
- package/lib/tabs/Tabs.js +2 -3
- package/lib/vant.cjs.js +69 -48
- package/lib/vant.es.js +71 -50
- package/lib/vant.js +1333 -1330
- package/lib/vant.min.js +3 -3
- package/lib/watermark/Watermark.js +16 -16
- package/lib/web-types.json +1 -1
- package/package.json +13 -13
@@ -16,6 +16,7 @@ export declare const ShareSheet: import("../utils").WithInstall<import("vue").De
|
|
16
16
|
default: true;
|
17
17
|
};
|
18
18
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
19
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
19
20
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
20
21
|
overlayClass: import("vue").PropType<unknown>;
|
21
22
|
transitionAppear: BooleanConstructor;
|
@@ -61,6 +62,7 @@ export declare const ShareSheet: import("../utils").WithInstall<import("vue").De
|
|
61
62
|
default: true;
|
62
63
|
};
|
63
64
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
65
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
64
66
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
65
67
|
overlayClass: import("vue").PropType<unknown>;
|
66
68
|
transitionAppear: BooleanConstructor;
|
@@ -73,7 +73,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
73
73
|
const config = (0, import_utils.isObject)(to) ? to : {
|
74
74
|
path: to
|
75
75
|
};
|
76
|
-
return
|
76
|
+
return $route.matched.some((val) => {
|
77
77
|
const pathMatched = "path" in config && config.path === val.path;
|
78
78
|
const nameMatched = "name" in config && config.name === val.name;
|
79
79
|
return pathMatched || nameMatched;
|
package/lib/tabs/Tabs.js
CHANGED
@@ -196,9 +196,8 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
196
196
|
}
|
197
197
|
};
|
198
198
|
const setCurrentIndexByName = (name2, skipScrollIntoView) => {
|
199
|
-
const
|
200
|
-
|
201
|
-
setCurrentIndex(index, skipScrollIntoView);
|
199
|
+
const index = children.findIndex((tab, index2) => getTabName(tab, index2) === name2);
|
200
|
+
setCurrentIndex(index === -1 ? 0 : index, skipScrollIntoView);
|
202
201
|
};
|
203
202
|
const scrollToCurrentContent = (immediate = false) => {
|
204
203
|
if (props.scrollspy) {
|
package/lib/vant.cjs.js
CHANGED
@@ -1128,6 +1128,8 @@ const popupSharedProps = {
|
|
1128
1128
|
lazyRender: truthProp,
|
1129
1129
|
// callback function before close
|
1130
1130
|
beforeClose: Function,
|
1131
|
+
// overlay props
|
1132
|
+
overlayProps: Object,
|
1131
1133
|
// overlay custom style
|
1132
1134
|
overlayStyle: Object,
|
1133
1135
|
// overlay custom class name
|
@@ -1285,8 +1287,10 @@ const overlayProps = {
|
|
1285
1287
|
};
|
1286
1288
|
var stdin_default$1L = vue.defineComponent({
|
1287
1289
|
name: name$1C,
|
1290
|
+
inheritAttrs: false,
|
1288
1291
|
props: overlayProps,
|
1289
1292
|
setup(props2, {
|
1293
|
+
attrs,
|
1290
1294
|
slots
|
1291
1295
|
}) {
|
1292
1296
|
const root = vue.ref();
|
@@ -1302,11 +1306,11 @@ var stdin_default$1L = vue.defineComponent({
|
|
1302
1306
|
if (isDef(props2.duration)) {
|
1303
1307
|
style.animationDuration = `${props2.duration}s`;
|
1304
1308
|
}
|
1305
|
-
return vue.withDirectives(vue.createVNode("div", {
|
1309
|
+
return vue.withDirectives(vue.createVNode("div", vue.mergeProps({
|
1306
1310
|
"ref": root,
|
1307
1311
|
"style": style,
|
1308
1312
|
"class": [bem$1x(), props2.className]
|
1309
|
-
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vue.vShow, props2.show]]);
|
1313
|
+
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vue.vShow, props2.show]]);
|
1310
1314
|
});
|
1311
1315
|
use.useEventListener("touchmove", onTouchMove, {
|
1312
1316
|
target: root
|
@@ -1395,15 +1399,16 @@ var stdin_default$1K = vue.defineComponent({
|
|
1395
1399
|
};
|
1396
1400
|
const renderOverlay = () => {
|
1397
1401
|
if (props2.overlay) {
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
},
|
1402
|
+
const overlayProps2 = extend({
|
1403
|
+
show: props2.show,
|
1404
|
+
class: props2.overlayClass,
|
1405
|
+
zIndex: zIndex.value,
|
1406
|
+
duration: props2.duration,
|
1407
|
+
customStyle: props2.overlayStyle,
|
1408
|
+
role: props2.closeOnClickOverlay ? "button" : void 0,
|
1409
|
+
tabindex: props2.closeOnClickOverlay ? 0 : void 0
|
1410
|
+
}, props2.overlayProps);
|
1411
|
+
return vue.createVNode(Overlay, vue.mergeProps(overlayProps2, useScopeId(), {
|
1407
1412
|
"onClick": onClickOverlay
|
1408
1413
|
}), {
|
1409
1414
|
default: slots["overlay-content"]
|
@@ -1689,7 +1694,7 @@ function findIndexOfEnabledOption(options, index) {
|
|
1689
1694
|
}
|
1690
1695
|
return 0;
|
1691
1696
|
}
|
1692
|
-
const isOptionExist = (options, value, fields) => value !== void 0 &&
|
1697
|
+
const isOptionExist = (options, value, fields) => value !== void 0 && options.some((option) => option[fields.value] === value);
|
1693
1698
|
function findOptionByValue(options, value, fields) {
|
1694
1699
|
const index = options.findIndex((option) => option[fields.value] === value);
|
1695
1700
|
const enabledIndex = findIndexOfEnabledOption(options, index);
|
@@ -2029,7 +2034,7 @@ function scrollTopTo(scroller, to, duration, callback) {
|
|
2029
2034
|
setScrollTop(scroller, current2);
|
2030
2035
|
if (isDown && current2 < to || !isDown && current2 > to) {
|
2031
2036
|
rafId = use.raf(animate);
|
2032
|
-
} else {
|
2037
|
+
} else if (callback) {
|
2033
2038
|
rafId = use.raf(callback);
|
2034
2039
|
}
|
2035
2040
|
}
|
@@ -2793,9 +2798,8 @@ var stdin_default$1D = vue.defineComponent({
|
|
2793
2798
|
}
|
2794
2799
|
};
|
2795
2800
|
const setCurrentIndexByName = (name2, skipScrollIntoView) => {
|
2796
|
-
const
|
2797
|
-
|
2798
|
-
setCurrentIndex(index, skipScrollIntoView);
|
2801
|
+
const index = children.findIndex((tab, index2) => getTabName(tab, index2) === name2);
|
2802
|
+
setCurrentIndex(index === -1 ? 0 : index, skipScrollIntoView);
|
2799
2803
|
};
|
2800
2804
|
const scrollToCurrentContent = (immediate = false) => {
|
2801
2805
|
if (props2.scrollspy) {
|
@@ -3443,7 +3447,8 @@ var stdin_default$1z = vue.defineComponent({
|
|
3443
3447
|
children.forEach((child) => child.stopMomentum());
|
3444
3448
|
const params = getEventParams();
|
3445
3449
|
vue.nextTick(() => {
|
3446
|
-
|
3450
|
+
const params2 = getEventParams();
|
3451
|
+
emit("confirm", params2);
|
3447
3452
|
});
|
3448
3453
|
return params;
|
3449
3454
|
};
|
@@ -3507,13 +3512,14 @@ var stdin_default$1z = vue.defineComponent({
|
|
3507
3512
|
}), pick(slots, pickerToolbarSlots));
|
3508
3513
|
}
|
3509
3514
|
};
|
3510
|
-
|
3515
|
+
const resetSelectedValues = (columns) => {
|
3511
3516
|
columns.forEach((options, index) => {
|
3512
3517
|
if (options.length && !isOptionExist(options, selectedValues.value[index], fields.value)) {
|
3513
3518
|
setValue(index, getFirstEnabledOption(options)[fields.value.value]);
|
3514
3519
|
}
|
3515
3520
|
});
|
3516
|
-
}
|
3521
|
+
};
|
3522
|
+
vue.watch(currentColumns, (columns) => resetSelectedValues(columns), {
|
3517
3523
|
immediate: true
|
3518
3524
|
});
|
3519
3525
|
let lastEmittedModelValue;
|
@@ -3522,6 +3528,9 @@ var stdin_default$1z = vue.defineComponent({
|
|
3522
3528
|
selectedValues.value = newValues.slice(0);
|
3523
3529
|
lastEmittedModelValue = newValues.slice(0);
|
3524
3530
|
}
|
3531
|
+
if (props2.modelValue.length === 0) {
|
3532
|
+
resetSelectedValues(currentColumns.value);
|
3533
|
+
}
|
3525
3534
|
}, {
|
3526
3535
|
deep: true
|
3527
3536
|
});
|
@@ -6293,7 +6302,7 @@ var stdin_default$1h = vue.defineComponent({
|
|
6293
6302
|
deep: true
|
6294
6303
|
});
|
6295
6304
|
const rootStyle = vue.ref({});
|
6296
|
-
vue.onMounted(() => __async(
|
6305
|
+
vue.onMounted(() => __async(null, null, function* () {
|
6297
6306
|
var _a;
|
6298
6307
|
rootStyle.value["--move-distance"] = `-${(_a = barrageWrapper.value) == null ? void 0 : _a.offsetWidth}px`;
|
6299
6308
|
yield vue.nextTick();
|
@@ -7321,7 +7330,8 @@ const imageProps = {
|
|
7321
7330
|
showLoading: truthProp,
|
7322
7331
|
loadingIcon: makeStringProp("photo"),
|
7323
7332
|
crossorigin: String,
|
7324
|
-
referrerpolicy: String
|
7333
|
+
referrerpolicy: String,
|
7334
|
+
decoding: String
|
7325
7335
|
};
|
7326
7336
|
var stdin_default$1c = vue.defineComponent({
|
7327
7337
|
name: name$13,
|
@@ -7401,6 +7411,7 @@ var stdin_default$1c = vue.defineComponent({
|
|
7401
7411
|
const attrs = {
|
7402
7412
|
alt: props2.alt,
|
7403
7413
|
class: bem$12("img"),
|
7414
|
+
decoding: props2.decoding,
|
7404
7415
|
style: {
|
7405
7416
|
objectFit: props2.fit,
|
7406
7417
|
objectPosition: props2.position
|
@@ -9925,12 +9936,14 @@ var stdin_default$U = vue.defineComponent({
|
|
9925
9936
|
}, [item.renderTitle()])])]);
|
9926
9937
|
};
|
9927
9938
|
useExpose({
|
9928
|
-
close
|
9939
|
+
close,
|
9940
|
+
opened
|
9929
9941
|
});
|
9930
9942
|
linkChildren({
|
9931
9943
|
id,
|
9932
9944
|
props: props2,
|
9933
9945
|
offset,
|
9946
|
+
opened,
|
9934
9947
|
updateOffset
|
9935
9948
|
});
|
9936
9949
|
use.useClickAway(root, onClickAway);
|
@@ -10106,6 +10119,9 @@ var stdin_default$T = vue.defineComponent({
|
|
10106
10119
|
"role": "menu",
|
10107
10120
|
"class": bem$K("content"),
|
10108
10121
|
"overlay": overlay,
|
10122
|
+
"overlayProps": {
|
10123
|
+
duration: state.transition && !parent.opened.value ? duration : 0
|
10124
|
+
},
|
10109
10125
|
"position": direction === "down" ? "top" : "bottom",
|
10110
10126
|
"duration": state.transition ? duration : 0,
|
10111
10127
|
"lazyRender": props2.lazyRender,
|
@@ -10146,7 +10162,10 @@ var stdin_default$T = vue.defineComponent({
|
|
10146
10162
|
const DropdownItem = withInstall(stdin_default$T);
|
10147
10163
|
const DropdownMenu = withInstall(stdin_default$U);
|
10148
10164
|
const floatingBubbleProps = {
|
10149
|
-
gap:
|
10165
|
+
gap: {
|
10166
|
+
type: [Number, Object],
|
10167
|
+
default: 24
|
10168
|
+
},
|
10150
10169
|
icon: String,
|
10151
10170
|
axis: makeStringProp("y"),
|
10152
10171
|
magnetic: String,
|
@@ -10180,11 +10199,13 @@ var stdin_default$S = vue.defineComponent({
|
|
10180
10199
|
width: 0,
|
10181
10200
|
height: 0
|
10182
10201
|
});
|
10202
|
+
const gapX = vue.computed(() => isObject(props2.gap) ? props2.gap.x : props2.gap);
|
10203
|
+
const gapY = vue.computed(() => isObject(props2.gap) ? props2.gap.y : props2.gap);
|
10183
10204
|
const boundary = vue.computed(() => ({
|
10184
|
-
top:
|
10185
|
-
right: windowWidth.value - state.value.width -
|
10186
|
-
bottom: windowHeight.value - state.value.height -
|
10187
|
-
left:
|
10205
|
+
top: gapY.value,
|
10206
|
+
right: windowWidth.value - state.value.width - gapX.value,
|
10207
|
+
bottom: windowHeight.value - state.value.height - gapY.value,
|
10208
|
+
left: gapX.value
|
10188
10209
|
}));
|
10189
10210
|
const dragging = vue.ref(false);
|
10190
10211
|
let initialized = false;
|
@@ -10208,8 +10229,8 @@ var stdin_default$S = vue.defineComponent({
|
|
10208
10229
|
offset
|
10209
10230
|
} = props2;
|
10210
10231
|
state.value = {
|
10211
|
-
x: offset.x > -1 ? offset.x : windowWidth.value - width -
|
10212
|
-
y: offset.y > -1 ? offset.y : windowHeight.value - height -
|
10232
|
+
x: offset.x > -1 ? offset.x : windowWidth.value - width - gapX.value,
|
10233
|
+
y: offset.y > -1 ? offset.y : windowHeight.value - height - gapY.value,
|
10213
10234
|
width,
|
10214
10235
|
height
|
10215
10236
|
};
|
@@ -10277,7 +10298,7 @@ var stdin_default$S = vue.defineComponent({
|
|
10277
10298
|
initialized = true;
|
10278
10299
|
});
|
10279
10300
|
});
|
10280
|
-
vue.watch([windowWidth, windowHeight,
|
10301
|
+
vue.watch([windowWidth, windowHeight, gapX, gapY, () => props2.offset], updateState, {
|
10281
10302
|
deep: true
|
10282
10303
|
});
|
10283
10304
|
const show = vue.ref(true);
|
@@ -15199,7 +15220,7 @@ var stdin_default$a = vue.defineComponent({
|
|
15199
15220
|
const config = isObject(to) ? to : {
|
15200
15221
|
path: to
|
15201
15222
|
};
|
15202
|
-
return
|
15223
|
+
return $route.matched.some((val) => {
|
15203
15224
|
const pathMatched = "path" in config && config.path === val.path;
|
15204
15225
|
const nameMatched = "name" in config && config.name === val.name;
|
15205
15226
|
return pathMatched || nameMatched;
|
@@ -16178,28 +16199,28 @@ var stdin_default$4 = vue.defineComponent({
|
|
16178
16199
|
});
|
16179
16200
|
return URL.createObjectURL(svgBlob);
|
16180
16201
|
};
|
16202
|
+
const revokeWatermarkUrl = () => {
|
16203
|
+
if (watermarkUrl.value) {
|
16204
|
+
URL.revokeObjectURL(watermarkUrl.value);
|
16205
|
+
}
|
16206
|
+
};
|
16207
|
+
const generateWatermarkUrl = () => {
|
16208
|
+
if (svgElRef.value) {
|
16209
|
+
revokeWatermarkUrl();
|
16210
|
+
watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
|
16211
|
+
}
|
16212
|
+
};
|
16181
16213
|
vue.watchEffect(() => {
|
16182
16214
|
if (props2.image) {
|
16183
16215
|
makeImageToBase64(props2.image);
|
16184
16216
|
}
|
16185
16217
|
});
|
16186
|
-
vue.watch(() => [
|
16187
|
-
|
16188
|
-
|
16189
|
-
if (watermarkUrl.value) {
|
16190
|
-
URL.revokeObjectURL(watermarkUrl.value);
|
16191
|
-
}
|
16192
|
-
watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
|
16193
|
-
}
|
16194
|
-
});
|
16195
|
-
}, {
|
16196
|
-
immediate: true
|
16197
|
-
});
|
16198
|
-
vue.onUnmounted(() => {
|
16199
|
-
if (watermarkUrl.value) {
|
16200
|
-
URL.revokeObjectURL(watermarkUrl.value);
|
16201
|
-
}
|
16218
|
+
vue.watch(() => [props2.content, props2.textColor, props2.height, props2.width, props2.rotate, props2.gapX, props2.gapY], generateWatermarkUrl);
|
16219
|
+
vue.watch(imageBase64, () => {
|
16220
|
+
vue.nextTick(generateWatermarkUrl);
|
16202
16221
|
});
|
16222
|
+
vue.onMounted(generateWatermarkUrl);
|
16223
|
+
vue.onUnmounted(revokeWatermarkUrl);
|
16203
16224
|
return () => {
|
16204
16225
|
const style = extend({
|
16205
16226
|
backgroundImage: `url(${watermarkUrl.value})`
|
@@ -17080,7 +17101,7 @@ const Lazyload = {
|
|
17080
17101
|
});
|
17081
17102
|
}
|
17082
17103
|
};
|
17083
|
-
const version = "4.9.
|
17104
|
+
const version = "4.9.20";
|
17084
17105
|
function install(app) {
|
17085
17106
|
const components = [
|
17086
17107
|
ActionBar,
|
package/lib/vant.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { unref, ref, reactive, inject, watch, onMounted, nextTick, createVNode, defineComponent, getCurrentInstance, computed, onActivated, onDeactivated, onBeforeUnmount, provide, watchEffect, mergeProps, Transition, Teleport, withDirectives, vShow, Fragment, onBeforeUpdate, Comment, createTextVNode, onUnmounted, createApp, resolveDirective, withKeys, onUpdated, Text, h } from "vue";
|
2
|
-
import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener,
|
2
|
+
import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, raf, cancelRaf, useScrollParent, usePageVisibility, doubleRaf, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, inBrowser as inBrowser$1, useToggle, useCountDown, useClickAway } from "@vant/use";
|
3
3
|
import { normalizeClass, stringifyStyle, normalizeStyle } from "@vue/shared";
|
4
|
-
import {
|
4
|
+
import { createPopper, offsetModifier } from "@vant/popperjs";
|
5
5
|
function noop() {
|
6
6
|
}
|
7
7
|
const extend = Object.assign;
|
@@ -1126,6 +1126,8 @@ const popupSharedProps = {
|
|
1126
1126
|
lazyRender: truthProp,
|
1127
1127
|
// callback function before close
|
1128
1128
|
beforeClose: Function,
|
1129
|
+
// overlay props
|
1130
|
+
overlayProps: Object,
|
1129
1131
|
// overlay custom style
|
1130
1132
|
overlayStyle: Object,
|
1131
1133
|
// overlay custom class name
|
@@ -1283,8 +1285,10 @@ const overlayProps = {
|
|
1283
1285
|
};
|
1284
1286
|
var stdin_default$1L = defineComponent({
|
1285
1287
|
name: name$1C,
|
1288
|
+
inheritAttrs: false,
|
1286
1289
|
props: overlayProps,
|
1287
1290
|
setup(props2, {
|
1291
|
+
attrs,
|
1288
1292
|
slots
|
1289
1293
|
}) {
|
1290
1294
|
const root = ref();
|
@@ -1300,11 +1304,11 @@ var stdin_default$1L = defineComponent({
|
|
1300
1304
|
if (isDef(props2.duration)) {
|
1301
1305
|
style.animationDuration = `${props2.duration}s`;
|
1302
1306
|
}
|
1303
|
-
return withDirectives(createVNode("div", {
|
1307
|
+
return withDirectives(createVNode("div", mergeProps({
|
1304
1308
|
"ref": root,
|
1305
1309
|
"style": style,
|
1306
1310
|
"class": [bem$1x(), props2.className]
|
1307
|
-
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vShow, props2.show]]);
|
1311
|
+
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vShow, props2.show]]);
|
1308
1312
|
});
|
1309
1313
|
useEventListener("touchmove", onTouchMove, {
|
1310
1314
|
target: root
|
@@ -1393,15 +1397,16 @@ var stdin_default$1K = defineComponent({
|
|
1393
1397
|
};
|
1394
1398
|
const renderOverlay = () => {
|
1395
1399
|
if (props2.overlay) {
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
},
|
1400
|
+
const overlayProps2 = extend({
|
1401
|
+
show: props2.show,
|
1402
|
+
class: props2.overlayClass,
|
1403
|
+
zIndex: zIndex.value,
|
1404
|
+
duration: props2.duration,
|
1405
|
+
customStyle: props2.overlayStyle,
|
1406
|
+
role: props2.closeOnClickOverlay ? "button" : void 0,
|
1407
|
+
tabindex: props2.closeOnClickOverlay ? 0 : void 0
|
1408
|
+
}, props2.overlayProps);
|
1409
|
+
return createVNode(Overlay, mergeProps(overlayProps2, useScopeId(), {
|
1405
1410
|
"onClick": onClickOverlay
|
1406
1411
|
}), {
|
1407
1412
|
default: slots["overlay-content"]
|
@@ -1687,7 +1692,7 @@ function findIndexOfEnabledOption(options, index) {
|
|
1687
1692
|
}
|
1688
1693
|
return 0;
|
1689
1694
|
}
|
1690
|
-
const isOptionExist = (options, value, fields) => value !== void 0 &&
|
1695
|
+
const isOptionExist = (options, value, fields) => value !== void 0 && options.some((option) => option[fields.value] === value);
|
1691
1696
|
function findOptionByValue(options, value, fields) {
|
1692
1697
|
const index = options.findIndex((option) => option[fields.value] === value);
|
1693
1698
|
const enabledIndex = findIndexOfEnabledOption(options, index);
|
@@ -2027,7 +2032,7 @@ function scrollTopTo(scroller, to, duration, callback) {
|
|
2027
2032
|
setScrollTop(scroller, current2);
|
2028
2033
|
if (isDown && current2 < to || !isDown && current2 > to) {
|
2029
2034
|
rafId = raf(animate);
|
2030
|
-
} else {
|
2035
|
+
} else if (callback) {
|
2031
2036
|
rafId = raf(callback);
|
2032
2037
|
}
|
2033
2038
|
}
|
@@ -2791,9 +2796,8 @@ var stdin_default$1D = defineComponent({
|
|
2791
2796
|
}
|
2792
2797
|
};
|
2793
2798
|
const setCurrentIndexByName = (name2, skipScrollIntoView) => {
|
2794
|
-
const
|
2795
|
-
|
2796
|
-
setCurrentIndex(index, skipScrollIntoView);
|
2799
|
+
const index = children.findIndex((tab, index2) => getTabName(tab, index2) === name2);
|
2800
|
+
setCurrentIndex(index === -1 ? 0 : index, skipScrollIntoView);
|
2797
2801
|
};
|
2798
2802
|
const scrollToCurrentContent = (immediate = false) => {
|
2799
2803
|
if (props2.scrollspy) {
|
@@ -3441,7 +3445,8 @@ var stdin_default$1z = defineComponent({
|
|
3441
3445
|
children.forEach((child) => child.stopMomentum());
|
3442
3446
|
const params = getEventParams();
|
3443
3447
|
nextTick(() => {
|
3444
|
-
|
3448
|
+
const params2 = getEventParams();
|
3449
|
+
emit("confirm", params2);
|
3445
3450
|
});
|
3446
3451
|
return params;
|
3447
3452
|
};
|
@@ -3505,13 +3510,14 @@ var stdin_default$1z = defineComponent({
|
|
3505
3510
|
}), pick(slots, pickerToolbarSlots));
|
3506
3511
|
}
|
3507
3512
|
};
|
3508
|
-
|
3513
|
+
const resetSelectedValues = (columns) => {
|
3509
3514
|
columns.forEach((options, index) => {
|
3510
3515
|
if (options.length && !isOptionExist(options, selectedValues.value[index], fields.value)) {
|
3511
3516
|
setValue(index, getFirstEnabledOption(options)[fields.value.value]);
|
3512
3517
|
}
|
3513
3518
|
});
|
3514
|
-
}
|
3519
|
+
};
|
3520
|
+
watch(currentColumns, (columns) => resetSelectedValues(columns), {
|
3515
3521
|
immediate: true
|
3516
3522
|
});
|
3517
3523
|
let lastEmittedModelValue;
|
@@ -3520,6 +3526,9 @@ var stdin_default$1z = defineComponent({
|
|
3520
3526
|
selectedValues.value = newValues.slice(0);
|
3521
3527
|
lastEmittedModelValue = newValues.slice(0);
|
3522
3528
|
}
|
3529
|
+
if (props2.modelValue.length === 0) {
|
3530
|
+
resetSelectedValues(currentColumns.value);
|
3531
|
+
}
|
3523
3532
|
}, {
|
3524
3533
|
deep: true
|
3525
3534
|
});
|
@@ -6291,7 +6300,7 @@ var stdin_default$1h = defineComponent({
|
|
6291
6300
|
deep: true
|
6292
6301
|
});
|
6293
6302
|
const rootStyle = ref({});
|
6294
|
-
onMounted(() => __async(
|
6303
|
+
onMounted(() => __async(null, null, function* () {
|
6295
6304
|
var _a;
|
6296
6305
|
rootStyle.value["--move-distance"] = `-${(_a = barrageWrapper.value) == null ? void 0 : _a.offsetWidth}px`;
|
6297
6306
|
yield nextTick();
|
@@ -7319,7 +7328,8 @@ const imageProps = {
|
|
7319
7328
|
showLoading: truthProp,
|
7320
7329
|
loadingIcon: makeStringProp("photo"),
|
7321
7330
|
crossorigin: String,
|
7322
|
-
referrerpolicy: String
|
7331
|
+
referrerpolicy: String,
|
7332
|
+
decoding: String
|
7323
7333
|
};
|
7324
7334
|
var stdin_default$1c = defineComponent({
|
7325
7335
|
name: name$13,
|
@@ -7399,6 +7409,7 @@ var stdin_default$1c = defineComponent({
|
|
7399
7409
|
const attrs = {
|
7400
7410
|
alt: props2.alt,
|
7401
7411
|
class: bem$12("img"),
|
7412
|
+
decoding: props2.decoding,
|
7402
7413
|
style: {
|
7403
7414
|
objectFit: props2.fit,
|
7404
7415
|
objectPosition: props2.position
|
@@ -9923,12 +9934,14 @@ var stdin_default$U = defineComponent({
|
|
9923
9934
|
}, [item.renderTitle()])])]);
|
9924
9935
|
};
|
9925
9936
|
useExpose({
|
9926
|
-
close
|
9937
|
+
close,
|
9938
|
+
opened
|
9927
9939
|
});
|
9928
9940
|
linkChildren({
|
9929
9941
|
id,
|
9930
9942
|
props: props2,
|
9931
9943
|
offset,
|
9944
|
+
opened,
|
9932
9945
|
updateOffset
|
9933
9946
|
});
|
9934
9947
|
useClickAway(root, onClickAway);
|
@@ -10104,6 +10117,9 @@ var stdin_default$T = defineComponent({
|
|
10104
10117
|
"role": "menu",
|
10105
10118
|
"class": bem$K("content"),
|
10106
10119
|
"overlay": overlay,
|
10120
|
+
"overlayProps": {
|
10121
|
+
duration: state.transition && !parent.opened.value ? duration : 0
|
10122
|
+
},
|
10107
10123
|
"position": direction === "down" ? "top" : "bottom",
|
10108
10124
|
"duration": state.transition ? duration : 0,
|
10109
10125
|
"lazyRender": props2.lazyRender,
|
@@ -10144,7 +10160,10 @@ var stdin_default$T = defineComponent({
|
|
10144
10160
|
const DropdownItem = withInstall(stdin_default$T);
|
10145
10161
|
const DropdownMenu = withInstall(stdin_default$U);
|
10146
10162
|
const floatingBubbleProps = {
|
10147
|
-
gap:
|
10163
|
+
gap: {
|
10164
|
+
type: [Number, Object],
|
10165
|
+
default: 24
|
10166
|
+
},
|
10148
10167
|
icon: String,
|
10149
10168
|
axis: makeStringProp("y"),
|
10150
10169
|
magnetic: String,
|
@@ -10178,11 +10197,13 @@ var stdin_default$S = defineComponent({
|
|
10178
10197
|
width: 0,
|
10179
10198
|
height: 0
|
10180
10199
|
});
|
10200
|
+
const gapX = computed(() => isObject(props2.gap) ? props2.gap.x : props2.gap);
|
10201
|
+
const gapY = computed(() => isObject(props2.gap) ? props2.gap.y : props2.gap);
|
10181
10202
|
const boundary = computed(() => ({
|
10182
|
-
top:
|
10183
|
-
right: windowWidth.value - state.value.width -
|
10184
|
-
bottom: windowHeight.value - state.value.height -
|
10185
|
-
left:
|
10203
|
+
top: gapY.value,
|
10204
|
+
right: windowWidth.value - state.value.width - gapX.value,
|
10205
|
+
bottom: windowHeight.value - state.value.height - gapY.value,
|
10206
|
+
left: gapX.value
|
10186
10207
|
}));
|
10187
10208
|
const dragging = ref(false);
|
10188
10209
|
let initialized = false;
|
@@ -10206,8 +10227,8 @@ var stdin_default$S = defineComponent({
|
|
10206
10227
|
offset
|
10207
10228
|
} = props2;
|
10208
10229
|
state.value = {
|
10209
|
-
x: offset.x > -1 ? offset.x : windowWidth.value - width -
|
10210
|
-
y: offset.y > -1 ? offset.y : windowHeight.value - height -
|
10230
|
+
x: offset.x > -1 ? offset.x : windowWidth.value - width - gapX.value,
|
10231
|
+
y: offset.y > -1 ? offset.y : windowHeight.value - height - gapY.value,
|
10211
10232
|
width,
|
10212
10233
|
height
|
10213
10234
|
};
|
@@ -10275,7 +10296,7 @@ var stdin_default$S = defineComponent({
|
|
10275
10296
|
initialized = true;
|
10276
10297
|
});
|
10277
10298
|
});
|
10278
|
-
watch([windowWidth, windowHeight,
|
10299
|
+
watch([windowWidth, windowHeight, gapX, gapY, () => props2.offset], updateState, {
|
10279
10300
|
deep: true
|
10280
10301
|
});
|
10281
10302
|
const show = ref(true);
|
@@ -15197,7 +15218,7 @@ var stdin_default$a = defineComponent({
|
|
15197
15218
|
const config = isObject(to) ? to : {
|
15198
15219
|
path: to
|
15199
15220
|
};
|
15200
|
-
return
|
15221
|
+
return $route.matched.some((val) => {
|
15201
15222
|
const pathMatched = "path" in config && config.path === val.path;
|
15202
15223
|
const nameMatched = "name" in config && config.name === val.name;
|
15203
15224
|
return pathMatched || nameMatched;
|
@@ -16176,28 +16197,28 @@ var stdin_default$4 = defineComponent({
|
|
16176
16197
|
});
|
16177
16198
|
return URL.createObjectURL(svgBlob);
|
16178
16199
|
};
|
16200
|
+
const revokeWatermarkUrl = () => {
|
16201
|
+
if (watermarkUrl.value) {
|
16202
|
+
URL.revokeObjectURL(watermarkUrl.value);
|
16203
|
+
}
|
16204
|
+
};
|
16205
|
+
const generateWatermarkUrl = () => {
|
16206
|
+
if (svgElRef.value) {
|
16207
|
+
revokeWatermarkUrl();
|
16208
|
+
watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
|
16209
|
+
}
|
16210
|
+
};
|
16179
16211
|
watchEffect(() => {
|
16180
16212
|
if (props2.image) {
|
16181
16213
|
makeImageToBase64(props2.image);
|
16182
16214
|
}
|
16183
16215
|
});
|
16184
|
-
watch(() => [
|
16185
|
-
|
16186
|
-
|
16187
|
-
if (watermarkUrl.value) {
|
16188
|
-
URL.revokeObjectURL(watermarkUrl.value);
|
16189
|
-
}
|
16190
|
-
watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
|
16191
|
-
}
|
16192
|
-
});
|
16193
|
-
}, {
|
16194
|
-
immediate: true
|
16195
|
-
});
|
16196
|
-
onUnmounted(() => {
|
16197
|
-
if (watermarkUrl.value) {
|
16198
|
-
URL.revokeObjectURL(watermarkUrl.value);
|
16199
|
-
}
|
16216
|
+
watch(() => [props2.content, props2.textColor, props2.height, props2.width, props2.rotate, props2.gapX, props2.gapY], generateWatermarkUrl);
|
16217
|
+
watch(imageBase64, () => {
|
16218
|
+
nextTick(generateWatermarkUrl);
|
16200
16219
|
});
|
16220
|
+
onMounted(generateWatermarkUrl);
|
16221
|
+
onUnmounted(revokeWatermarkUrl);
|
16201
16222
|
return () => {
|
16202
16223
|
const style = extend({
|
16203
16224
|
backgroundImage: `url(${watermarkUrl.value})`
|
@@ -17078,7 +17099,7 @@ const Lazyload = {
|
|
17078
17099
|
});
|
17079
17100
|
}
|
17080
17101
|
};
|
17081
|
-
const version = "4.9.
|
17102
|
+
const version = "4.9.20";
|
17082
17103
|
function install(app) {
|
17083
17104
|
const components = [
|
17084
17105
|
ActionBar,
|