diff --git a/packages/vant/src/watermark/Watermark.tsx b/packages/vant/src/watermark/Watermark.tsx index f4133e8f5..4a89516cd 100644 --- a/packages/vant/src/watermark/Watermark.tsx +++ b/packages/vant/src/watermark/Watermark.tsx @@ -57,6 +57,10 @@ export default defineComponent({ return ( { + // svg MIME type: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types const svgBlob = new Blob([svgStr], { - type: 'image/svg+xml;charset=utf-8', + type: 'image/svg+xml', }); return URL.createObjectURL(svgBlob); }; diff --git a/packages/vant/src/watermark/test/__snapshots__/index.spec.ts.snap b/packages/vant/src/watermark/test/__snapshots__/index.spec.ts.snap index e0c656263..cd9edea6f 100644 --- a/packages/vant/src/watermark/test/__snapshots__/index.spec.ts.snap +++ b/packages/vant/src/watermark/test/__snapshots__/index.spec.ts.snap @@ -9,6 +9,7 @@ exports[`watermark should render content 1`] = ` width="100" height="100" xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" style="padding: 0px 0px 0px 0px;" >