fix(watermark): fix wrong font-weight enum (#55922)

Co-authored-by: Mio <miohwang@tencent.com>
This commit is contained in:
Mio
2025-11-26 16:55:41 +08:00
committed by GitHub
parent f3fcb1416f
commit 09d9a92398
3 changed files with 3 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ Common props ref[Common props](/docs/react/common-props)
| --- | --- | --- | --- | --- |
| color | font color | [CanvasFillStrokeStyles.fillStyle](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillStyle) | rgba(0,0,0,.15) | |
| fontSize | font size | number | 16 | |
| fontWeight | font weight | `normal` \| `light` \| `weight` \| number | normal | |
| fontWeight | font weight | `normal` \| `lighter` \| `bold` \| `bolder` \| number | normal | |
| fontFamily | font family | string | sans-serif | |
| fontStyle | font style | `none` \| `normal` \| `italic` \| `oblique` | normal | |
| textAlign | specify the text alignment direction | [CanvasTextAlign](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textAlign) | `center` | 5.10.0 |

View File

@@ -24,7 +24,7 @@ export interface WatermarkProps {
font?: {
color?: CanvasFillStrokeStyles['fillStyle'];
fontSize?: number | string;
fontWeight?: 'normal' | 'light' | 'weight' | number;
fontWeight?: 'normal' | 'lighter' | 'bold' | 'bolder' | number;
fontStyle?: 'none' | 'normal' | 'italic' | 'oblique';
fontFamily?: string;
textAlign?: CanvasTextAlign;

View File

@@ -54,7 +54,7 @@ tag: 5.1.0
| --- | --- | --- | --- | --- |
| color | 字体颜色 | [CanvasFillStrokeStyles.fillStyle](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillStyle) | rgba(0,0,0,.15) | |
| fontSize | 字体大小 | number | 16 | |
| fontWeight | 字体粗细 | `normal` \| `light` \| `weight` \| number | normal | |
| fontWeight | 字体粗细 | `normal` \| `lighter` \| `bold` \| `bolder` \| number | normal | |
| fontFamily | 字体类型 | string | sans-serif | |
| fontStyle | 字体样式 | `none` \| `normal` \| `italic` \| `oblique` | normal | |
| textAlign | 指定文本对齐方向 | [CanvasTextAlign](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textAlign) | `center` | 5.10.0 |