From 88c15e718db67ea6e7c64ddc1662eafe9ae40407 Mon Sep 17 00:00:00 2001 From: jAIBot <148948963+javasbot@users.noreply.github.com> Date: Thu, 29 Aug 2024 00:09:25 +0800 Subject: [PATCH] Update WaterMark.tsx (#743) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(m): 修复font属性覆盖错误 --- packages/react-vant/src/components/water-mark/WaterMark.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-vant/src/components/water-mark/WaterMark.tsx b/packages/react-vant/src/components/water-mark/WaterMark.tsx index f4210e9e3..c618df17a 100644 --- a/packages/react-vant/src/components/water-mark/WaterMark.tsx +++ b/packages/react-vant/src/components/water-mark/WaterMark.tsx @@ -68,7 +68,7 @@ const WaterMark: React.FC = p => { setBase64Url(canvas.toDataURL()) } } else if (content) { - const frontProps = { ...font, ...DEFAULT_FONT } + const frontProps = { ...DEFAULT_FONT, ...font } const { size, family, style, weight, color } = frontProps ctx.textBaseline = 'middle' ctx.textAlign = 'center'