[RFC] New Component: WaterMark 水印 #38865
MadCcc
announced in
RFCs - archive
Replies: 3 comments 1 reply
-
What is the significance of this watermark? Doesn’t deleting the |
Beta Was this translation helpful? Give feedback.
0 replies
-
这个组件如果是之前antd4的版本,可以单独引入这个WaterMark 组件吗?如果不可以的话。4.20升级5.20会有冲突吗? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
新增 WaterMark 组件,给页面的某个区域加上水印。
API
string
string
|string[]
{ color?: string, fontSize?: number, fontWeight?: 'normal' | 'light' | 'weight' | number; fontFamily?: string; fontStyle?: 'none' | 'normal' | 'italic' | 'oblique' }
{color?: 'rgba(0,0,0,.15)', fontSize?: 16, fontWeight?: 'normal'; fontFamily?: 'sans-serif'; fontStyle?: 'normal'}
[number, number]
[212, 222]
offset = gap / 2
[number, number]
[gap[0] / 2, gap[1] / 2]
Basic Example
https://procomponents.ant.design/components/water-mark
Detailed Design
迁移 procomponents 下的 WaterMark 组件:https://github.com/ant-design/pro-components/tree/master/packages/layout/src/components/WaterMark
需要做的迁移工作包括但不限于:
genComponentStyleHook
,减少 hashId 的使用,token 调整;Drawbacks
暂无。
Bonus
Beta Was this translation helpful? Give feedback.
All reactions