demo: update Watermark demo (#46899)

* feat: CP support Table expandIcon

* revert

* demo: update demo
This commit is contained in:
lijianan 2024-01-13 14:27:42 +08:00 committed by GitHub
parent 9e5d3e350f
commit c157a3f9ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 663 additions and 732 deletions

View File

@ -958,7 +958,10 @@ describe('ConfigProvider support style and className props', () => {
it('Should Table className & style works', () => {
const { container } = render(
<ConfigProvider table={{ className: 'cp-table', style: { backgroundColor: 'blue' } }}>
<Table dataSource={[]} />
<Table
columns={[{ title: 'Address', dataIndex: 'address', key: 'address 1', ellipsis: true }]}
dataSource={[{ key: '1', name: 'Jim Green', age: 40, address: 'test', tags: ['loser'] }]}
/>
</ConfigProvider>,
);
const element = container.querySelector<HTMLDivElement>('.ant-table-wrapper');

View File

@ -18,7 +18,7 @@ exports[`renders components/watermark/demo/basic.tsx extend context correctly 2`
exports[`renders components/watermark/demo/custom.tsx extend context correctly 1`] = `
<div
style="display: flex;"
class="ant-flex ant-flex-gap-middle"
>
<div
class=""
@ -44,7 +44,7 @@ exports[`renders components/watermark/demo/custom.tsx extend context correctly 1
</div>
</article>
<img
alt="示例图片"
alt="img"
src="https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ"
style="z-index: 10; width: 100%; max-width: 800px; position: relative;"
/>
@ -54,7 +54,7 @@ exports[`renders components/watermark/demo/custom.tsx extend context correctly 1
</div>
<form
class="ant-form ant-form-vertical"
style="width: 280px; flex-shrink: 0; border-left: 1px solid #eee; padding-left: 20px; margin-left: 20px;"
style="width: 280px; flex-shrink: 0; border-left: 1px solid #eee; padding-inline-start: 16px;"
>
<div
class="ant-form-item"
@ -758,103 +758,98 @@ exports[`renders components/watermark/demo/custom.tsx extend context correctly 1
class="ant-form-item-control-input-content"
>
<div
class="ant-space ant-space-horizontal ant-space-align-baseline ant-space-gap-row-small ant-space-gap-col-small"
style="display: flex;"
class="ant-flex ant-flex-gap-small"
>
<div
class="ant-space-item"
class="ant-form-item"
>
<div
class="ant-form-item"
class="ant-row ant-form-item-row"
>
<div
class="ant-row ant-form-item-row"
class="ant-col ant-form-item-control"
>
<div
class="ant-col ant-form-item-control"
class="ant-form-item-control-input"
>
<div
class="ant-form-item-control-input"
class="ant-form-item-control-input-content"
>
<div
class="ant-form-item-control-input-content"
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width: 100%;"
>
<div
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width: 100%;"
class="ant-input-number-handler-wrap"
>
<div
class="ant-input-number-handler-wrap"
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
>
<span
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<input
aria-valuenow="100"
autocomplete="off"
class="ant-input-number-input"
id="gap_0"
placeholder="gapX"
role="spinbutton"
step="1"
value="100"
/>
</div>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
>
<input
aria-valuenow="100"
autocomplete="off"
class="ant-input-number-input"
id="gap_0"
placeholder="gapX"
role="spinbutton"
step="1"
value="100"
/>
</div>
</div>
</div>
@ -863,99 +858,95 @@ exports[`renders components/watermark/demo/custom.tsx extend context correctly 1
</div>
</div>
<div
class="ant-space-item"
class="ant-form-item"
>
<div
class="ant-form-item"
class="ant-row ant-form-item-row"
>
<div
class="ant-row ant-form-item-row"
class="ant-col ant-form-item-control"
>
<div
class="ant-col ant-form-item-control"
class="ant-form-item-control-input"
>
<div
class="ant-form-item-control-input"
class="ant-form-item-control-input-content"
>
<div
class="ant-form-item-control-input-content"
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width: 100%;"
>
<div
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width: 100%;"
class="ant-input-number-handler-wrap"
>
<div
class="ant-input-number-handler-wrap"
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
>
<span
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<input
aria-valuenow="100"
autocomplete="off"
class="ant-input-number-input"
id="gap_1"
placeholder="gapY"
role="spinbutton"
step="1"
value="100"
/>
</div>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
>
<input
aria-valuenow="100"
autocomplete="off"
class="ant-input-number-input"
id="gap_1"
placeholder="gapY"
role="spinbutton"
step="1"
value="100"
/>
</div>
</div>
</div>
@ -996,102 +987,97 @@ exports[`renders components/watermark/demo/custom.tsx extend context correctly 1
class="ant-form-item-control-input-content"
>
<div
class="ant-space ant-space-horizontal ant-space-align-baseline ant-space-gap-row-small ant-space-gap-col-small"
style="display: flex;"
class="ant-flex ant-flex-gap-small"
>
<div
class="ant-space-item"
class="ant-form-item"
>
<div
class="ant-form-item"
class="ant-row ant-form-item-row"
>
<div
class="ant-row ant-form-item-row"
class="ant-col ant-form-item-control"
>
<div
class="ant-col ant-form-item-control"
class="ant-form-item-control-input"
>
<div
class="ant-form-item-control-input"
class="ant-form-item-control-input-content"
>
<div
class="ant-form-item-control-input-content"
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width: 100%;"
>
<div
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width: 100%;"
class="ant-input-number-handler-wrap"
>
<div
class="ant-input-number-handler-wrap"
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
>
<span
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<input
autocomplete="off"
class="ant-input-number-input"
id="offset_0"
placeholder="offsetLeft"
role="spinbutton"
step="1"
value=""
/>
</div>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
>
<input
autocomplete="off"
class="ant-input-number-input"
id="offset_0"
placeholder="offsetLeft"
role="spinbutton"
step="1"
value=""
/>
</div>
</div>
</div>
@ -1100,98 +1086,94 @@ exports[`renders components/watermark/demo/custom.tsx extend context correctly 1
</div>
</div>
<div
class="ant-space-item"
class="ant-form-item"
>
<div
class="ant-form-item"
class="ant-row ant-form-item-row"
>
<div
class="ant-row ant-form-item-row"
class="ant-col ant-form-item-control"
>
<div
class="ant-col ant-form-item-control"
class="ant-form-item-control-input"
>
<div
class="ant-form-item-control-input"
class="ant-form-item-control-input-content"
>
<div
class="ant-form-item-control-input-content"
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width: 100%;"
>
<div
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width: 100%;"
class="ant-input-number-handler-wrap"
>
<div
class="ant-input-number-handler-wrap"
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
>
<span
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<input
autocomplete="off"
class="ant-input-number-input"
id="offset_1"
placeholder="offsetTop"
role="spinbutton"
step="1"
value=""
/>
</div>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
>
<input
autocomplete="off"
class="ant-input-number-input"
id="offset_1"
placeholder="offsetTop"
role="spinbutton"
step="1"
value=""
/>
</div>
</div>
</div>
@ -1243,44 +1225,32 @@ exports[`renders components/watermark/demo/multi-line.tsx extend context correct
exports[`renders components/watermark/demo/portal.tsx extend context correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center ant-space-gap-row-small ant-space-gap-col-small"
class="ant-flex ant-flex-gap-middle"
>
<div
class="ant-space-item"
<button
class="ant-btn ant-btn-primary"
type="button"
>
<button
class="ant-btn ant-btn-default"
type="button"
>
<span>
Show in Modal
</span>
</button>
</div>
<div
class="ant-space-item"
<span>
Show in Modal
</span>
</button>
<button
class="ant-btn ant-btn-primary"
type="button"
>
<button
class="ant-btn ant-btn-default"
type="button"
>
<span>
Show in Drawer
</span>
</button>
</div>
<div
class="ant-space-item"
<span>
Show in Drawer
</span>
</button>
<button
class="ant-btn ant-btn-primary"
type="button"
>
<button
class="ant-btn ant-btn-default"
type="button"
>
<span>
Not Show in Drawer
</span>
</button>
</div>
<span>
Not Show in Drawer
</span>
</button>
</div>,
<div
class=""

View File

@ -13,7 +13,7 @@ exports[`renders components/watermark/demo/basic.tsx correctly 1`] = `
exports[`renders components/watermark/demo/custom.tsx correctly 1`] = `
<div
style="display:flex"
class="ant-flex ant-flex-gap-middle"
>
<div
class=""
@ -39,14 +39,14 @@ exports[`renders components/watermark/demo/custom.tsx correctly 1`] = `
</div>
</article>
<img
alt="示例图片"
alt="img"
src="https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ"
style="z-index:10;width:100%;max-width:800px;position:relative"
/>
</div>
<form
class="ant-form ant-form-vertical"
style="width:280px;flex-shrink:0;border-left:1px solid #eee;padding-left:20px;margin-left:20px"
style="width:280px;flex-shrink:0;border-left:1px solid #eee;padding-inline-start:16px"
>
<div
class="ant-form-item"
@ -325,103 +325,98 @@ exports[`renders components/watermark/demo/custom.tsx correctly 1`] = `
class="ant-form-item-control-input-content"
>
<div
class="ant-space ant-space-horizontal ant-space-align-baseline ant-space-gap-row-small ant-space-gap-col-small"
style="display:flex"
class="ant-flex ant-flex-gap-small"
>
<div
class="ant-space-item"
class="ant-form-item"
>
<div
class="ant-form-item"
class="ant-row ant-form-item-row"
>
<div
class="ant-row ant-form-item-row"
class="ant-col ant-form-item-control"
>
<div
class="ant-col ant-form-item-control"
class="ant-form-item-control-input"
>
<div
class="ant-form-item-control-input"
class="ant-form-item-control-input-content"
>
<div
class="ant-form-item-control-input-content"
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width:100%"
>
<div
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width:100%"
class="ant-input-number-handler-wrap"
>
<div
class="ant-input-number-handler-wrap"
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
>
<span
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<input
aria-valuenow="100"
autocomplete="off"
class="ant-input-number-input"
id="gap_0"
placeholder="gapX"
role="spinbutton"
step="1"
value="100"
/>
</div>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
>
<input
aria-valuenow="100"
autocomplete="off"
class="ant-input-number-input"
id="gap_0"
placeholder="gapX"
role="spinbutton"
step="1"
value="100"
/>
</div>
</div>
</div>
@ -430,99 +425,95 @@ exports[`renders components/watermark/demo/custom.tsx correctly 1`] = `
</div>
</div>
<div
class="ant-space-item"
class="ant-form-item"
>
<div
class="ant-form-item"
class="ant-row ant-form-item-row"
>
<div
class="ant-row ant-form-item-row"
class="ant-col ant-form-item-control"
>
<div
class="ant-col ant-form-item-control"
class="ant-form-item-control-input"
>
<div
class="ant-form-item-control-input"
class="ant-form-item-control-input-content"
>
<div
class="ant-form-item-control-input-content"
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width:100%"
>
<div
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width:100%"
class="ant-input-number-handler-wrap"
>
<div
class="ant-input-number-handler-wrap"
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
>
<span
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<input
aria-valuenow="100"
autocomplete="off"
class="ant-input-number-input"
id="gap_1"
placeholder="gapY"
role="spinbutton"
step="1"
value="100"
/>
</div>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
>
<input
aria-valuenow="100"
autocomplete="off"
class="ant-input-number-input"
id="gap_1"
placeholder="gapY"
role="spinbutton"
step="1"
value="100"
/>
</div>
</div>
</div>
@ -563,102 +554,97 @@ exports[`renders components/watermark/demo/custom.tsx correctly 1`] = `
class="ant-form-item-control-input-content"
>
<div
class="ant-space ant-space-horizontal ant-space-align-baseline ant-space-gap-row-small ant-space-gap-col-small"
style="display:flex"
class="ant-flex ant-flex-gap-small"
>
<div
class="ant-space-item"
class="ant-form-item"
>
<div
class="ant-form-item"
class="ant-row ant-form-item-row"
>
<div
class="ant-row ant-form-item-row"
class="ant-col ant-form-item-control"
>
<div
class="ant-col ant-form-item-control"
class="ant-form-item-control-input"
>
<div
class="ant-form-item-control-input"
class="ant-form-item-control-input-content"
>
<div
class="ant-form-item-control-input-content"
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width:100%"
>
<div
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width:100%"
class="ant-input-number-handler-wrap"
>
<div
class="ant-input-number-handler-wrap"
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
>
<span
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<input
autocomplete="off"
class="ant-input-number-input"
id="offset_0"
placeholder="offsetLeft"
role="spinbutton"
step="1"
value=""
/>
</div>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
>
<input
autocomplete="off"
class="ant-input-number-input"
id="offset_0"
placeholder="offsetLeft"
role="spinbutton"
step="1"
value=""
/>
</div>
</div>
</div>
@ -667,98 +653,94 @@ exports[`renders components/watermark/demo/custom.tsx correctly 1`] = `
</div>
</div>
<div
class="ant-space-item"
class="ant-form-item"
>
<div
class="ant-form-item"
class="ant-row ant-form-item-row"
>
<div
class="ant-row ant-form-item-row"
class="ant-col ant-form-item-control"
>
<div
class="ant-col ant-form-item-control"
class="ant-form-item-control-input"
>
<div
class="ant-form-item-control-input"
class="ant-form-item-control-input-content"
>
<div
class="ant-form-item-control-input-content"
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width:100%"
>
<div
class="ant-input-number ant-input-number-in-form-item ant-input-number-outlined"
style="width:100%"
class="ant-input-number-handler-wrap"
>
<div
class="ant-input-number-handler-wrap"
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
unselectable="on"
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
>
<span
aria-label="up"
class="anticon anticon-up ant-input-number-handler-up-inner"
role="img"
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
unselectable="on"
>
<input
autocomplete="off"
class="ant-input-number-input"
id="offset_1"
placeholder="offsetTop"
role="spinbutton"
step="1"
value=""
/>
</div>
<span
aria-label="down"
class="anticon anticon-down ant-input-number-handler-down-inner"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-input-number-input-wrap"
>
<input
autocomplete="off"
class="ant-input-number-input"
id="offset_1"
placeholder="offsetTop"
role="spinbutton"
step="1"
value=""
/>
</div>
</div>
</div>
@ -801,44 +783,32 @@ exports[`renders components/watermark/demo/multi-line.tsx correctly 1`] = `
exports[`renders components/watermark/demo/portal.tsx correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center ant-space-gap-row-small ant-space-gap-col-small"
class="ant-flex ant-flex-gap-middle"
>
<div
class="ant-space-item"
<button
class="ant-btn ant-btn-primary"
type="button"
>
<button
class="ant-btn ant-btn-default"
type="button"
>
<span>
Show in Modal
</span>
</button>
</div>
<div
class="ant-space-item"
<span>
Show in Modal
</span>
</button>
<button
class="ant-btn ant-btn-primary"
type="button"
>
<button
class="ant-btn ant-btn-default"
type="button"
>
<span>
Show in Drawer
</span>
</button>
</div>
<div
class="ant-space-item"
<span>
Show in Drawer
</span>
</button>
<button
class="ant-btn ant-btn-primary"
type="button"
>
<button
class="ant-btn ant-btn-default"
type="button"
>
<span>
Not Show in Drawer
</span>
</button>
</div>
<span>
Not Show in Drawer
</span>
</button>
</div>,
<div
class=""

View File

@ -1,6 +1,6 @@
import React, { useMemo, useState } from 'react';
import { ColorPicker, Form, Input, InputNumber, Slider, Space, Typography, Watermark } from 'antd';
import type { ColorPickerProps, GetProp } from 'antd';
import React, { useState } from 'react';
import { ColorPicker, Flex, Form, Input, InputNumber, Slider, Typography, Watermark } from 'antd';
import type { ColorPickerProps, GetProp, WatermarkProps } from 'antd';
type Color = GetProp<ColorPickerProps, 'color'>;
@ -29,23 +29,17 @@ const App: React.FC = () => {
});
const { content, color, fontSize, zIndex, rotate, gap, offset } = config;
const watermarkProps = useMemo(
() => ({
content,
font: {
color: typeof color === 'string' ? color : color.toRgbString(),
fontSize,
},
zIndex,
rotate,
gap,
offset,
}),
[config],
);
const watermarkProps: WatermarkProps = {
content,
zIndex,
rotate,
gap,
offset,
font: { color: typeof color === 'string' ? color : color.toRgbString(), fontSize },
};
return (
<div style={{ display: 'flex' }}>
<Flex gap="middle">
<Watermark {...watermarkProps}>
<Typography>
<Paragraph>
@ -73,24 +67,13 @@ const App: React.FC = () => {
</Paragraph>
</Typography>
<img
style={{
zIndex: 10,
width: '100%',
maxWidth: 800,
position: 'relative',
}}
style={{ zIndex: 10, width: '100%', maxWidth: 800, position: 'relative' }}
src="https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ"
alt="示例图片"
alt="img"
/>
</Watermark>
<Form
style={{
width: 280,
flexShrink: 0,
borderLeft: '1px solid #eee',
paddingLeft: 20,
marginLeft: 20,
}}
style={{ width: 280, flexShrink: 0, borderLeft: '1px solid #eee', paddingInlineStart: 16 }}
form={form}
layout="vertical"
initialValues={config}
@ -114,27 +97,27 @@ const App: React.FC = () => {
<Slider step={1} min={-180} max={180} />
</Form.Item>
<Form.Item label="Gap" style={{ marginBottom: 0 }}>
<Space style={{ display: 'flex' }} align="baseline">
<Flex gap="small">
<Form.Item name={['gap', 0]}>
<InputNumber placeholder="gapX" style={{ width: '100%' }} />
</Form.Item>
<Form.Item name={['gap', 1]}>
<InputNumber placeholder="gapY" style={{ width: '100%' }} />
</Form.Item>
</Space>
</Flex>
</Form.Item>
<Form.Item label="Offset" style={{ marginBottom: 0 }}>
<Space style={{ display: 'flex' }} align="baseline">
<Flex gap="small">
<Form.Item name={['offset', 0]}>
<InputNumber placeholder="offsetLeft" style={{ width: '100%' }} />
</Form.Item>
<Form.Item name={['offset', 1]}>
<InputNumber placeholder="offsetTop" style={{ width: '100%' }} />
</Form.Item>
</Space>
</Flex>
</Form.Item>
</Form>
</div>
</Flex>
);
};

View File

@ -4,4 +4,4 @@
## en-US
Specify the image address via 'image'. To ensure that the image is high definition and not stretched, set the width and height, and upload at least twice the width and height of the logo image address.
Specify the image address via `image`. To ensure that the image is high definition and not stretched, set the width and height, and upload at least twice the width and height of the logo image address.

View File

@ -4,4 +4,4 @@
## en-US
Use 'content' to set a string array to specify multi-line text watermark content.
Use `content` to set a string array to specify multi-line text watermark content.

View File

@ -1,19 +1,15 @@
import React from 'react';
import { Button, Drawer, Modal, Space, Watermark } from 'antd';
import { Button, Drawer, Flex, Modal, Watermark } from 'antd';
const placeholder = (
<div
style={{
height: 300,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
background: 'rgba(150, 150, 150, 0.2)',
}}
>
A mock height
</div>
);
const style: React.CSSProperties = {
height: 300,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'rgba(150, 150, 150, 0.2)',
};
const placeholder = <div style={style}>A mock height</div>;
const App: React.FC = () => {
const [showModal, setShowModal] = React.useState(false);
@ -26,12 +22,17 @@ const App: React.FC = () => {
return (
<>
<Space>
<Button onClick={() => setShowModal(true)}>Show in Modal</Button>
<Button onClick={() => setShowDrawer(true)}>Show in Drawer</Button>
<Button onClick={() => setShowDrawer2(true)}>Not Show in Drawer</Button>
</Space>
<Flex gap="middle">
<Button type="primary" onClick={() => setShowModal(true)}>
Show in Modal
</Button>
<Button type="primary" onClick={() => setShowDrawer(true)}>
Show in Drawer
</Button>
<Button type="primary" onClick={() => setShowDrawer2(true)}>
Not Show in Drawer
</Button>
</Flex>
<Watermark content="Ant Design">
<Modal
destroyOnClose

View File

@ -8,7 +8,7 @@ demo:
cols: 1
---
Add specific text or patterns to the page.
Add specific text or patterns to the page. Available since `5.0.0`.
## When To Use
@ -28,6 +28,8 @@ Add specific text or patterns to the page.
Common props ref[Common props](/docs/react/common-props)
> This component is available since `antd@5.0.0`.
### Watermark
| Property | Description | Type | Default | Version |

View File

@ -10,7 +10,7 @@ demo:
tag: New
---
给页面的某个区域加上水印。
给页面的某个区域加上水印。`5.0.0` 版本开始提供该组件。
## 何时使用
@ -30,6 +30,8 @@ tag: New
通用属性参考:[通用属性](/docs/react/common-props)
> 自 `antd@5.0.0` 版本开始提供该组件。
### Watermark
| 参数 | 说明 | 类型 | 默认值 | 版本 |