Skip to content

Commit

Permalink
refactor: 优化水印 hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyh2001 committed Sep 28, 2023
1 parent 42ba852 commit 50cf79d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/fighting-design/_hooks/use-watermark/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 50cf79d

Please sign in to comment.