vant 4.9.17 → 4.9.19
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 +2 -0
- package/es/button/index.css +1 -1
- package/es/dialog/Dialog.d.ts +4 -0
- package/es/dialog/Dialog.mjs +3 -2
- package/es/dialog/function-call.mjs +2 -1
- package/es/dialog/index.d.ts +3 -0
- package/es/dialog/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/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/overlay/Overlay.mjs +5 -3
- package/es/picker/Picker.mjs +2 -1
- package/es/picker/utils.mjs +1 -1
- package/es/signature/Signature.mjs +3 -2
- package/es/swipe-cell/SwipeCell.mjs +4 -4
- package/es/tabbar-item/TabbarItem.mjs +1 -1
- package/es/tabs/Tabs.mjs +2 -3
- package/es/watermark/Watermark.mjs +15 -18
- package/lib/button/index.css +1 -1
- package/lib/dialog/Dialog.d.ts +4 -0
- package/lib/dialog/Dialog.js +3 -2
- package/lib/dialog/function-call.js +2 -1
- package/lib/dialog/index.d.ts +3 -0
- package/lib/dialog/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/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/overlay/Overlay.js +4 -2
- package/lib/picker/Picker.js +2 -1
- package/lib/picker/utils.js +1 -1
- package/lib/signature/Signature.js +3 -2
- package/lib/swipe-cell/SwipeCell.js +4 -4
- package/lib/tabbar-item/TabbarItem.js +1 -1
- package/lib/tabs/Tabs.js +2 -3
- package/lib/vant.cjs.js +51 -44
- package/lib/vant.es.js +53 -46
- package/lib/vant.js +68 -62
- package/lib/vant.min.js +2 -2
- package/lib/watermark/Watermark.js +14 -17
- package/lib/web-types.json +1 -1
- package/package.json +9 -9
@@ -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;
|