mirror of
https://github.com/youzan/vant.git
synced 2025-10-14 15:10:36 +00:00
fix(Watermark): ensure watermark updates on imageBase64 change (#13474)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
defineComponent,
|
||||
nextTick,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
ref,
|
||||
@@ -158,7 +159,6 @@ export default defineComponent({
|
||||
|
||||
watch(
|
||||
() => [
|
||||
imageBase64.value,
|
||||
props.content,
|
||||
props.textColor,
|
||||
props.height,
|
||||
@@ -170,6 +170,10 @@ export default defineComponent({
|
||||
generateWatermarkUrl,
|
||||
);
|
||||
|
||||
watch(imageBase64, () => {
|
||||
nextTick(generateWatermarkUrl);
|
||||
});
|
||||
|
||||
onMounted(generateWatermarkUrl);
|
||||
|
||||
onUnmounted(revokeWatermarkUrl);
|
||||
|
Reference in New Issue
Block a user