vant 4.9.18 → 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 +1 -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/tabbar-item/TabbarItem.mjs +1 -1
- package/es/tabs/Tabs.mjs +2 -3
- package/es/watermark/Watermark.mjs +15 -18
- 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.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/tabbar-item/TabbarItem.js +1 -1
- package/lib/tabs/Tabs.js +2 -3
- package/lib/vant.cjs.js +39 -35
- package/lib/vant.es.js +41 -37
- package/lib/vant.js +42 -39
- package/lib/vant.min.js +2 -2
- package/lib/watermark/Watermark.js +14 -17
- package/lib/web-types.json +1 -1
- package/package.json +11 -11
@@ -111,28 +111,25 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
111
111
|
});
|
112
112
|
return URL.createObjectURL(svgBlob);
|
113
113
|
};
|
114
|
+
const revokeWatermarkUrl = () => {
|
115
|
+
if (watermarkUrl.value) {
|
116
|
+
URL.revokeObjectURL(watermarkUrl.value);
|
117
|
+
}
|
118
|
+
};
|
119
|
+
const generateWatermarkUrl = () => {
|
120
|
+
if (svgElRef.value) {
|
121
|
+
revokeWatermarkUrl();
|
122
|
+
watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
|
123
|
+
}
|
124
|
+
};
|
114
125
|
(0, import_vue.watchEffect)(() => {
|
115
126
|
if (props.image) {
|
116
127
|
makeImageToBase64(props.image);
|
117
128
|
}
|
118
129
|
});
|
119
|
-
(0, import_vue.watch)(() => [imageBase64.value, props.content, props.textColor, props.height, props.width, props.rotate, props.gapX, props.gapY],
|
120
|
-
|
121
|
-
|
122
|
-
if (watermarkUrl.value) {
|
123
|
-
URL.revokeObjectURL(watermarkUrl.value);
|
124
|
-
}
|
125
|
-
watermarkUrl.value = makeSvgToBlobUrl(svgElRef.value.innerHTML);
|
126
|
-
}
|
127
|
-
});
|
128
|
-
}, {
|
129
|
-
immediate: true
|
130
|
-
});
|
131
|
-
(0, import_vue.onUnmounted)(() => {
|
132
|
-
if (watermarkUrl.value) {
|
133
|
-
URL.revokeObjectURL(watermarkUrl.value);
|
134
|
-
}
|
135
|
-
});
|
130
|
+
(0, import_vue.watch)(() => [imageBase64.value, props.content, props.textColor, props.height, props.width, props.rotate, props.gapX, props.gapY], generateWatermarkUrl);
|
131
|
+
(0, import_vue.onMounted)(generateWatermarkUrl);
|
132
|
+
(0, import_vue.onUnmounted)(revokeWatermarkUrl);
|
136
133
|
return () => {
|
137
134
|
const style = (0, import_utils.extend)({
|
138
135
|
backgroundImage: `url(${watermarkUrl.value})`
|