From 50cf79db3573d6d294b3862f63e84e78afa7cb29 Mon Sep 17 00:00:00 2001 From: Tyh2001 <1469442737@qq.com> Date: Thu, 28 Sep 2023 16:14:35 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E6=B0=B4?= =?UTF-8?q?=E5=8D=B0=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fighting-design/_hooks/use-watermark/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/fighting-design/_hooks/use-watermark/index.ts b/packages/fighting-design/_hooks/use-watermark/index.ts index b877f09553..320851cd45 100644 --- a/packages/fighting-design/_hooks/use-watermark/index.ts +++ b/packages/fighting-design/_hooks/use-watermark/index.ts @@ -41,8 +41,6 @@ export const useWatermark = (prop: WatermarkProps): UseWatermarkReturn => { */ const ctx = canvas.getContext('2d') as CanvasRenderingContext2D - ctx.font = font - const { width } = ctx.measureText(prop.content) const cavasSize = Math.max(100, width) * devicePixeRatio + prop.gap