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
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, nextTick, onUnmounted, ref, watch, watchEffect, createVNode as _createVNode } from "vue";
|
1
|
+
import { defineComponent, nextTick, onMounted, onUnmounted, ref, watch, watchEffect, createVNode as _createVNode } from "vue";
|
2
2
|
import { extend, truthProp, numericProp, createNamespace, getZIndexStyle, makeNumberProp, makeNumericProp, makeStringProp } from "../utils/index.mjs";
|
3
3
|
const [name, bem] = createNamespace("watermark");
|
4
4
|
const watermarkProps = {
|
@@ -88,28 +88,28 @@ var stdin_default = defineComponent({
|
|
88
88
|
});
|
89
89
|
return URL.createObjectURL(svgBlob);
|
90
90
|
};
|
91
|
+
const revokeWatermarkUrl = () => {
|
92
|
+
if (watermarkUrl.value) {
|
93
|
+
URL.revokeObjectURL(watermarkUrl.value);
|
94
|
+
}
|
95
|
+
};
|
96
|
+
const generateWatermarkUrl = () => {
|
97
|
+
if (svgElRef.value) {
|
98
|
+
revokeWatermarkUrl();
|
99
|
+
watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
|
100
|
+
}
|
101
|
+
};
|
91
102
|
watchEffect(() => {
|
92
103
|
if (props.image) {
|
93
104
|
makeImageToBase64(props.image);
|
94
105
|
}
|
95
106
|
});
|
96
|
-
watch(() => [
|
97
|
-
|
98
|
-
|
99
|
-
if (watermarkUrl.value) {
|
100
|
-
URL.revokeObjectURL(watermarkUrl.value);
|
101
|
-
}
|
102
|
-
watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
|
103
|
-
}
|
104
|
-
});
|
105
|
-
}, {
|
106
|
-
immediate: true
|
107
|
-
});
|
108
|
-
onUnmounted(() => {
|
109
|
-
if (watermarkUrl.value) {
|
110
|
-
URL.revokeObjectURL(watermarkUrl.value);
|
111
|
-
}
|
107
|
+
watch(() => [props.content, props.textColor, props.height, props.width, props.rotate, props.gapX, props.gapY], generateWatermarkUrl);
|
108
|
+
watch(imageBase64, () => {
|
109
|
+
nextTick(generateWatermarkUrl);
|
112
110
|
});
|
111
|
+
onMounted(generateWatermarkUrl);
|
112
|
+
onUnmounted(revokeWatermarkUrl);
|
113
113
|
return () => {
|
114
114
|
const style = extend({
|
115
115
|
backgroundImage: `url(${watermarkUrl.value})`
|
@@ -27,6 +27,7 @@ export declare const actionSheetProps: {
|
|
27
27
|
default: true;
|
28
28
|
};
|
29
29
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
30
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
30
31
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
31
32
|
overlayClass: import("vue").PropType<unknown>;
|
32
33
|
transitionAppear: BooleanConstructor;
|
@@ -83,6 +84,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
83
84
|
default: true;
|
84
85
|
};
|
85
86
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
87
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
86
88
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
87
89
|
overlayClass: import("vue").PropType<unknown>;
|
88
90
|
transitionAppear: BooleanConstructor;
|
@@ -137,6 +139,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
137
139
|
default: true;
|
138
140
|
};
|
139
141
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
142
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
140
143
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
141
144
|
overlayClass: import("vue").PropType<unknown>;
|
142
145
|
transitionAppear: BooleanConstructor;
|
@@ -16,6 +16,7 @@ export declare const ActionSheet: import("../utils").WithInstall<import("vue").D
|
|
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;
|
@@ -70,6 +71,7 @@ export declare const ActionSheet: import("../utils").WithInstall<import("vue").D
|
|
70
71
|
default: true;
|
71
72
|
};
|
72
73
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
74
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
73
75
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
74
76
|
overlayClass: import("vue").PropType<unknown>;
|
75
77
|
transitionAppear: BooleanConstructor;
|
package/lib/barrage/Barrage.js
CHANGED
@@ -118,7 +118,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
118
118
|
deep: true
|
119
119
|
});
|
120
120
|
const rootStyle = (0, import_vue.ref)({});
|
121
|
-
(0, import_vue.onMounted)(() => __async(
|
121
|
+
(0, import_vue.onMounted)(() => __async(null, null, function* () {
|
122
122
|
var _a;
|
123
123
|
rootStyle.value["--move-distance"] = `-${(_a = barrageWrapper.value) == null ? void 0 : _a.offsetWidth}px`;
|
124
124
|
yield (0, import_vue.nextTick)();
|
package/lib/dialog/Dialog.d.ts
CHANGED
@@ -18,6 +18,7 @@ export declare const dialogProps: {
|
|
18
18
|
default: true;
|
19
19
|
};
|
20
20
|
beforeClose: PropType<import("../utils").Interceptor>;
|
21
|
+
overlayProps: PropType<Partial<import("..").OverlayProps>>;
|
21
22
|
overlayStyle: PropType<import("vue").CSSProperties>;
|
22
23
|
overlayClass: PropType<unknown>;
|
23
24
|
transitionAppear: BooleanConstructor;
|
@@ -79,6 +80,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
79
80
|
default: true;
|
80
81
|
};
|
81
82
|
beforeClose: PropType<import("../utils").Interceptor>;
|
83
|
+
overlayProps: PropType<Partial<import("..").OverlayProps>>;
|
82
84
|
overlayStyle: PropType<import("vue").CSSProperties>;
|
83
85
|
overlayClass: PropType<unknown>;
|
84
86
|
transitionAppear: BooleanConstructor;
|
@@ -138,6 +140,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
138
140
|
default: true;
|
139
141
|
};
|
140
142
|
beforeClose: PropType<import("../utils").Interceptor>;
|
143
|
+
overlayProps: PropType<Partial<import("..").OverlayProps>>;
|
141
144
|
overlayStyle: PropType<import("vue").CSSProperties>;
|
142
145
|
overlayClass: PropType<unknown>;
|
143
146
|
transitionAppear: BooleanConstructor;
|
package/lib/dialog/index.d.ts
CHANGED
@@ -16,6 +16,7 @@ export declare const Dialog: import("../utils").WithInstall<import("vue").Define
|
|
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;
|
@@ -75,6 +76,7 @@ export declare const Dialog: import("../utils").WithInstall<import("vue").Define
|
|
75
76
|
default: true;
|
76
77
|
};
|
77
78
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
79
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
78
80
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
79
81
|
overlayClass: import("vue").PropType<unknown>;
|
80
82
|
transitionAppear: BooleanConstructor;
|
package/lib/dialog/types.d.ts
CHANGED
@@ -181,6 +181,9 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
181
181
|
"role": "menu",
|
182
182
|
"class": bem("content"),
|
183
183
|
"overlay": overlay,
|
184
|
+
"overlayProps": {
|
185
|
+
duration: state.transition && !parent.opened.value ? duration : 0
|
186
|
+
},
|
184
187
|
"position": direction === "down" ? "top" : "bottom",
|
185
188
|
"duration": state.transition ? duration : 0,
|
186
189
|
"lazyRender": props.lazyRender,
|
@@ -137,12 +137,14 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
137
137
|
}, [item.renderTitle()])])]);
|
138
138
|
};
|
139
139
|
(0, import_use_expose.useExpose)({
|
140
|
-
close
|
140
|
+
close,
|
141
|
+
opened
|
141
142
|
});
|
142
143
|
linkChildren({
|
143
144
|
id,
|
144
145
|
props,
|
145
146
|
offset,
|
147
|
+
opened,
|
146
148
|
updateOffset
|
147
149
|
});
|
148
150
|
(0, import_use.useClickAway)(root, onClickAway);
|
@@ -5,9 +5,11 @@ export type DropdownMenuProvide = {
|
|
5
5
|
id: string;
|
6
6
|
props: DropdownMenuProps;
|
7
7
|
offset: Ref<number>;
|
8
|
+
opened: Ref<boolean>;
|
8
9
|
updateOffset: () => void;
|
9
10
|
};
|
10
11
|
export type DropdownMenuExpose = {
|
12
|
+
opened: Ref<boolean>;
|
11
13
|
close: () => void;
|
12
14
|
};
|
13
15
|
export type DropdownMenuInstance = ComponentPublicInstance<DropdownMenuProps, DropdownMenuExpose>;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { PropType, TeleportProps, type ExtractPropTypes } from 'vue';
|
2
|
-
import { FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset } from './types';
|
2
|
+
import { FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset, FloatingBubbleGap } from './types';
|
3
3
|
export declare const floatingBubbleProps: {
|
4
4
|
gap: {
|
5
|
-
type:
|
5
|
+
type: PropType<FloatingBubbleGap>;
|
6
6
|
default: number;
|
7
7
|
};
|
8
8
|
icon: StringConstructor;
|
@@ -26,7 +26,7 @@ export declare const floatingBubbleProps: {
|
|
26
26
|
export type FloatingBubbleProps = ExtractPropTypes<typeof floatingBubbleProps>;
|
27
27
|
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
28
28
|
gap: {
|
29
|
-
type:
|
29
|
+
type: PropType<FloatingBubbleGap>;
|
30
30
|
default: number;
|
31
31
|
};
|
32
32
|
icon: StringConstructor;
|
@@ -48,7 +48,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
48
48
|
};
|
49
49
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:offset" | "offsetChange")[], "click" | "update:offset" | "offsetChange", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
50
50
|
gap: {
|
51
|
-
type:
|
51
|
+
type: PropType<FloatingBubbleGap>;
|
52
52
|
default: number;
|
53
53
|
};
|
54
54
|
icon: StringConstructor;
|
@@ -75,7 +75,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
75
75
|
}>, {
|
76
76
|
offset: FloatingBubbleOffset;
|
77
77
|
teleport: string | import("vue").RendererElement | null | undefined;
|
78
|
-
gap:
|
78
|
+
gap: FloatingBubbleGap;
|
79
79
|
axis: FloatingBubbleAxis;
|
80
80
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
81
81
|
export default _default;
|
@@ -37,7 +37,10 @@ var import_use = require("@vant/use");
|
|
37
37
|
var import_use_touch = require("../composables/use-touch");
|
38
38
|
var import_icon = __toESM(require("../icon"));
|
39
39
|
const floatingBubbleProps = {
|
40
|
-
gap:
|
40
|
+
gap: {
|
41
|
+
type: [Number, Object],
|
42
|
+
default: 24
|
43
|
+
},
|
41
44
|
icon: String,
|
42
45
|
axis: (0, import_utils.makeStringProp)("y"),
|
43
46
|
magnetic: String,
|
@@ -71,11 +74,13 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
71
74
|
width: 0,
|
72
75
|
height: 0
|
73
76
|
});
|
77
|
+
const gapX = (0, import_vue.computed)(() => (0, import_utils.isObject)(props.gap) ? props.gap.x : props.gap);
|
78
|
+
const gapY = (0, import_vue.computed)(() => (0, import_utils.isObject)(props.gap) ? props.gap.y : props.gap);
|
74
79
|
const boundary = (0, import_vue.computed)(() => ({
|
75
|
-
top:
|
76
|
-
right: import_utils.windowWidth.value - state.value.width -
|
77
|
-
bottom: import_utils.windowHeight.value - state.value.height -
|
78
|
-
left:
|
80
|
+
top: gapY.value,
|
81
|
+
right: import_utils.windowWidth.value - state.value.width - gapX.value,
|
82
|
+
bottom: import_utils.windowHeight.value - state.value.height - gapY.value,
|
83
|
+
left: gapX.value
|
79
84
|
}));
|
80
85
|
const dragging = (0, import_vue.ref)(false);
|
81
86
|
let initialized = false;
|
@@ -99,8 +104,8 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
99
104
|
offset
|
100
105
|
} = props;
|
101
106
|
state.value = {
|
102
|
-
x: offset.x > -1 ? offset.x : import_utils.windowWidth.value - width -
|
103
|
-
y: offset.y > -1 ? offset.y : import_utils.windowHeight.value - height -
|
107
|
+
x: offset.x > -1 ? offset.x : import_utils.windowWidth.value - width - gapX.value,
|
108
|
+
y: offset.y > -1 ? offset.y : import_utils.windowHeight.value - height - gapY.value,
|
104
109
|
width,
|
105
110
|
height
|
106
111
|
};
|
@@ -168,7 +173,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
168
173
|
initialized = true;
|
169
174
|
});
|
170
175
|
});
|
171
|
-
(0, import_vue.watch)([import_utils.windowWidth, import_utils.windowHeight,
|
176
|
+
(0, import_vue.watch)([import_utils.windowWidth, import_utils.windowHeight, gapX, gapY, () => props.offset], updateState, {
|
172
177
|
deep: true
|
173
178
|
});
|
174
179
|
const show = (0, import_vue.ref)(true);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export declare const FloatingBubble: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
2
2
|
gap: {
|
3
|
-
type:
|
3
|
+
type: import("vue").PropType<import("./types").FloatingBubbleGap>;
|
4
4
|
default: number;
|
5
5
|
};
|
6
6
|
icon: StringConstructor;
|
@@ -22,7 +22,7 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
|
|
22
22
|
};
|
23
23
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:offset" | "offsetChange")[], "click" | "update:offset" | "offsetChange", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
24
24
|
gap: {
|
25
|
-
type:
|
25
|
+
type: import("vue").PropType<import("./types").FloatingBubbleGap>;
|
26
26
|
default: number;
|
27
27
|
};
|
28
28
|
icon: StringConstructor;
|
@@ -49,7 +49,7 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
|
|
49
49
|
}>, {
|
50
50
|
offset: import("./types").FloatingBubbleOffset;
|
51
51
|
teleport: string | import("vue").RendererElement | null | undefined;
|
52
|
-
gap:
|
52
|
+
gap: import("./types").FloatingBubbleGap;
|
53
53
|
axis: import("./types").FloatingBubbleAxis;
|
54
54
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
55
55
|
export default FloatingBubble;
|
package/lib/image/Image.d.ts
CHANGED
@@ -31,6 +31,7 @@ export declare const imageProps: {
|
|
31
31
|
};
|
32
32
|
crossorigin: PropType<ImgHTMLAttributes["crossorigin"]>;
|
33
33
|
referrerpolicy: PropType<ImgHTMLAttributes["referrerpolicy"]>;
|
34
|
+
decoding: PropType<ImgHTMLAttributes["decoding"]>;
|
34
35
|
};
|
35
36
|
export type ImageProps = ExtractPropTypes<typeof imageProps>;
|
36
37
|
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
@@ -64,6 +65,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
64
65
|
};
|
65
66
|
crossorigin: PropType<ImgHTMLAttributes["crossorigin"]>;
|
66
67
|
referrerpolicy: PropType<ImgHTMLAttributes["referrerpolicy"]>;
|
68
|
+
decoding: PropType<ImgHTMLAttributes["decoding"]>;
|
67
69
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("error" | "load")[], "error" | "load", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
68
70
|
src: StringConstructor;
|
69
71
|
alt: StringConstructor;
|
@@ -95,6 +97,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
95
97
|
};
|
96
98
|
crossorigin: PropType<ImgHTMLAttributes["crossorigin"]>;
|
97
99
|
referrerpolicy: PropType<ImgHTMLAttributes["referrerpolicy"]>;
|
100
|
+
decoding: PropType<ImgHTMLAttributes["decoding"]>;
|
98
101
|
}>> & Readonly<{
|
99
102
|
onLoad?: ((...args: any[]) => any) | undefined;
|
100
103
|
onError?: ((...args: any[]) => any) | undefined;
|
package/lib/image/Image.js
CHANGED
@@ -43,7 +43,8 @@ const imageProps = {
|
|
43
43
|
showLoading: import_utils.truthProp,
|
44
44
|
loadingIcon: (0, import_utils.makeStringProp)("photo"),
|
45
45
|
crossorigin: String,
|
46
|
-
referrerpolicy: String
|
46
|
+
referrerpolicy: String,
|
47
|
+
decoding: String
|
47
48
|
};
|
48
49
|
var stdin_default = (0, import_vue.defineComponent)({
|
49
50
|
name,
|
@@ -123,6 +124,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
123
124
|
const attrs = {
|
124
125
|
alt: props.alt,
|
125
126
|
class: bem("img"),
|
127
|
+
decoding: props.decoding,
|
126
128
|
style: {
|
127
129
|
objectFit: props.fit,
|
128
130
|
objectPosition: props.position
|
package/lib/image/index.d.ts
CHANGED
@@ -29,6 +29,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
|
|
29
29
|
};
|
30
30
|
crossorigin: import("vue").PropType<import("vue").ImgHTMLAttributes["crossorigin"]>;
|
31
31
|
referrerpolicy: import("vue").PropType<import("vue").ImgHTMLAttributes["referrerpolicy"]>;
|
32
|
+
decoding: import("vue").PropType<import("vue").ImgHTMLAttributes["decoding"]>;
|
32
33
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("error" | "load")[], "error" | "load", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
33
34
|
src: StringConstructor;
|
34
35
|
alt: StringConstructor;
|
@@ -60,6 +61,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
|
|
60
61
|
};
|
61
62
|
crossorigin: import("vue").PropType<import("vue").ImgHTMLAttributes["crossorigin"]>;
|
62
63
|
referrerpolicy: import("vue").PropType<import("vue").ImgHTMLAttributes["referrerpolicy"]>;
|
64
|
+
decoding: import("vue").PropType<import("vue").ImgHTMLAttributes["decoding"]>;
|
63
65
|
}>> & Readonly<{
|
64
66
|
onLoad?: ((...args: any[]) => any) | undefined;
|
65
67
|
onError?: ((...args: any[]) => any) | undefined;
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
@@ -226,7 +226,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
|
|
226
226
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
227
227
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
228
228
|
__reExport(stdin_exports, require("./watermark"), module.exports);
|
229
|
-
const version = "4.9.
|
229
|
+
const version = "4.9.20";
|
230
230
|
function install(app) {
|
231
231
|
const components = [
|
232
232
|
import_action_bar.ActionBar,
|
package/lib/notify/Notify.d.ts
CHANGED
@@ -18,6 +18,7 @@ export declare const notifyProps: {
|
|
18
18
|
default: true;
|
19
19
|
};
|
20
20
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
21
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
21
22
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
22
23
|
overlayClass: import("vue").PropType<unknown>;
|
23
24
|
transitionAppear: BooleanConstructor;
|
@@ -59,6 +60,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
59
60
|
default: true;
|
60
61
|
};
|
61
62
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
63
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
62
64
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
63
65
|
overlayClass: import("vue").PropType<unknown>;
|
64
66
|
transitionAppear: BooleanConstructor;
|
@@ -98,6 +100,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
98
100
|
default: true;
|
99
101
|
};
|
100
102
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
103
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
101
104
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
102
105
|
overlayClass: import("vue").PropType<unknown>;
|
103
106
|
transitionAppear: BooleanConstructor;
|
package/lib/notify/index.d.ts
CHANGED
@@ -16,6 +16,7 @@ export declare const Notify: import("../utils").WithInstall<import("vue").Define
|
|
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;
|
@@ -55,6 +56,7 @@ export declare const Notify: import("../utils").WithInstall<import("vue").Define
|
|
55
56
|
default: true;
|
56
57
|
};
|
57
58
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
59
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
58
60
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
59
61
|
overlayClass: import("vue").PropType<unknown>;
|
60
62
|
transitionAppear: BooleanConstructor;
|
package/lib/overlay/Overlay.js
CHANGED
@@ -38,8 +38,10 @@ const overlayProps = {
|
|
38
38
|
};
|
39
39
|
var stdin_default = (0, import_vue.defineComponent)({
|
40
40
|
name,
|
41
|
+
inheritAttrs: false,
|
41
42
|
props: overlayProps,
|
42
43
|
setup(props, {
|
44
|
+
attrs,
|
43
45
|
slots
|
44
46
|
}) {
|
45
47
|
const root = (0, import_vue.ref)();
|
@@ -55,11 +57,11 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
55
57
|
if ((0, import_utils.isDef)(props.duration)) {
|
56
58
|
style.animationDuration = `${props.duration}s`;
|
57
59
|
}
|
58
|
-
return (0, import_vue.withDirectives)((0, import_vue.createVNode)("div", {
|
60
|
+
return (0, import_vue.withDirectives)((0, import_vue.createVNode)("div", (0, import_vue.mergeProps)({
|
59
61
|
"ref": root,
|
60
62
|
"style": style,
|
61
63
|
"class": [bem(), props.className]
|
62
|
-
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[import_vue.vShow, props.show]]);
|
64
|
+
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[import_vue.vShow, props.show]]);
|
63
65
|
});
|
64
66
|
(0, import_use.useEventListener)("touchmove", onTouchMove, {
|
65
67
|
target: root
|
package/lib/picker/Picker.js
CHANGED
@@ -133,7 +133,8 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
133
133
|
children.forEach((child) => child.stopMomentum());
|
134
134
|
const params = getEventParams();
|
135
135
|
(0, import_vue.nextTick)(() => {
|
136
|
-
|
136
|
+
const params2 = getEventParams();
|
137
|
+
emit("confirm", params2);
|
137
138
|
});
|
138
139
|
return params;
|
139
140
|
};
|
@@ -197,13 +198,14 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
197
198
|
}), (0, import_utils.pick)(slots, import_PickerToolbar.pickerToolbarSlots));
|
198
199
|
}
|
199
200
|
};
|
200
|
-
|
201
|
+
const resetSelectedValues = (columns) => {
|
201
202
|
columns.forEach((options, index) => {
|
202
203
|
if (options.length && !(0, import_utils2.isOptionExist)(options, selectedValues.value[index], fields.value)) {
|
203
204
|
setValue(index, (0, import_utils2.getFirstEnabledOption)(options)[fields.value.value]);
|
204
205
|
}
|
205
206
|
});
|
206
|
-
}
|
207
|
+
};
|
208
|
+
(0, import_vue.watch)(currentColumns, (columns) => resetSelectedValues(columns), {
|
207
209
|
immediate: true
|
208
210
|
});
|
209
211
|
let lastEmittedModelValue;
|
@@ -212,6 +214,9 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
212
214
|
selectedValues.value = newValues.slice(0);
|
213
215
|
lastEmittedModelValue = newValues.slice(0);
|
214
216
|
}
|
217
|
+
if (props.modelValue.length === 0) {
|
218
|
+
resetSelectedValues(currentColumns.value);
|
219
|
+
}
|
215
220
|
}, {
|
216
221
|
deep: true
|
217
222
|
});
|
package/lib/picker/utils.js
CHANGED
@@ -55,7 +55,7 @@ function findIndexOfEnabledOption(options, index) {
|
|
55
55
|
}
|
56
56
|
return 0;
|
57
57
|
}
|
58
|
-
const isOptionExist = (options, value, fields) => value !== void 0 &&
|
58
|
+
const isOptionExist = (options, value, fields) => value !== void 0 && options.some((option) => option[fields.value] === value);
|
59
59
|
function findOptionByValue(options, value, fields) {
|
60
60
|
const index = options.findIndex((option) => option[fields.value] === value);
|
61
61
|
const enabledIndex = findIndexOfEnabledOption(options, index);
|
package/lib/popup/Popup.d.ts
CHANGED
@@ -18,6 +18,7 @@ export declare const popupProps: {
|
|
18
18
|
default: true;
|
19
19
|
};
|
20
20
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
21
|
+
overlayProps: import("vue").PropType<Partial<import("../overlay").OverlayProps>>;
|
21
22
|
overlayStyle: import("vue").PropType<CSSProperties>;
|
22
23
|
overlayClass: import("vue").PropType<unknown>;
|
23
24
|
transitionAppear: BooleanConstructor;
|
@@ -66,6 +67,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
66
67
|
default: true;
|
67
68
|
};
|
68
69
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
70
|
+
overlayProps: import("vue").PropType<Partial<import("../overlay").OverlayProps>>;
|
69
71
|
overlayStyle: import("vue").PropType<CSSProperties>;
|
70
72
|
overlayClass: import("vue").PropType<unknown>;
|
71
73
|
transitionAppear: BooleanConstructor;
|
@@ -112,6 +114,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
112
114
|
default: true;
|
113
115
|
};
|
114
116
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
117
|
+
overlayProps: import("vue").PropType<Partial<import("../overlay").OverlayProps>>;
|
115
118
|
overlayStyle: import("vue").PropType<CSSProperties>;
|
116
119
|
overlayClass: import("vue").PropType<unknown>;
|
117
120
|
transitionAppear: BooleanConstructor;
|
package/lib/popup/Popup.js
CHANGED
@@ -98,15 +98,16 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
98
98
|
};
|
99
99
|
const renderOverlay = () => {
|
100
100
|
if (props.overlay) {
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
},
|
101
|
+
const overlayProps = (0, import_utils.extend)({
|
102
|
+
show: props.show,
|
103
|
+
class: props.overlayClass,
|
104
|
+
zIndex: zIndex.value,
|
105
|
+
duration: props.duration,
|
106
|
+
customStyle: props.overlayStyle,
|
107
|
+
role: props.closeOnClickOverlay ? "button" : void 0,
|
108
|
+
tabindex: props.closeOnClickOverlay ? 0 : void 0
|
109
|
+
}, props.overlayProps);
|
110
|
+
return (0, import_vue.createVNode)(import_overlay.Overlay, (0, import_vue.mergeProps)(overlayProps, (0, import_use_scope_id.useScopeId)(), {
|
110
111
|
"onClick": onClickOverlay
|
111
112
|
}), {
|
112
113
|
default: slots["overlay-content"]
|
package/lib/popup/index.d.ts
CHANGED
@@ -16,6 +16,7 @@ export declare const Popup: import("../utils").WithInstall<import("vue").DefineC
|
|
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;
|
@@ -62,6 +63,7 @@ export declare const Popup: import("../utils").WithInstall<import("vue").DefineC
|
|
62
63
|
default: true;
|
63
64
|
};
|
64
65
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
66
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
65
67
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
66
68
|
overlayClass: import("vue").PropType<unknown>;
|
67
69
|
transitionAppear: BooleanConstructor;
|
package/lib/popup/shared.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { OverlayProps } from '../overlay';
|
1
2
|
import { Interceptor } from '../utils';
|
2
3
|
import type { PropType, CSSProperties, TeleportProps } from 'vue';
|
3
4
|
export declare const popupSharedProps: {
|
@@ -18,6 +19,7 @@ export declare const popupSharedProps: {
|
|
18
19
|
default: true;
|
19
20
|
};
|
20
21
|
beforeClose: PropType<Interceptor>;
|
22
|
+
overlayProps: PropType<Partial<OverlayProps>>;
|
21
23
|
overlayStyle: PropType<CSSProperties>;
|
22
24
|
overlayClass: PropType<unknown>;
|
23
25
|
transitionAppear: BooleanConstructor;
|
package/lib/popup/shared.js
CHANGED
@@ -24,6 +24,7 @@ export declare const shareSheetProps: {
|
|
24
24
|
default: true;
|
25
25
|
};
|
26
26
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
27
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
27
28
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
28
29
|
overlayClass: import("vue").PropType<unknown>;
|
29
30
|
transitionAppear: BooleanConstructor;
|
@@ -71,6 +72,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
71
72
|
default: true;
|
72
73
|
};
|
73
74
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
75
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
74
76
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
75
77
|
overlayClass: import("vue").PropType<unknown>;
|
76
78
|
transitionAppear: BooleanConstructor;
|
@@ -116,6 +118,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
116
118
|
default: true;
|
117
119
|
};
|
118
120
|
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
121
|
+
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
119
122
|
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
120
123
|
overlayClass: import("vue").PropType<unknown>;
|
121
124
|
transitionAppear: BooleanConstructor;
|