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
|
@@ -111,28 +111,28 @@ 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)(() => [
|
|
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
|
-
}
|
|
130
|
+
(0, import_vue.watch)(() => [props.content, props.textColor, props.height, props.width, props.rotate, props.gapX, props.gapY], generateWatermarkUrl);
|
|
131
|
+
(0, import_vue.watch)(imageBase64, () => {
|
|
132
|
+
(0, import_vue.nextTick)(generateWatermarkUrl);
|
|
135
133
|
});
|
|
134
|
+
(0, import_vue.onMounted)(generateWatermarkUrl);
|
|
135
|
+
(0, import_vue.onUnmounted)(revokeWatermarkUrl);
|
|
136
136
|
return () => {
|
|
137
137
|
const style = (0, import_utils.extend)({
|
|
138
138
|
backgroundImage: `url(${watermarkUrl.value})`
|