mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
feat: inputNumber support status (#34042)
* feat: inputNumber support status * test: fix test * feat: custom status first * refactor: getMergedStatus pass status in params
This commit is contained in:
parent
a94d086ac4
commit
6a7acfbf6e
@ -39,3 +39,6 @@ export function getStatusClassNames(
|
|||||||
[`${prefixCls}-has-feedback`]: hasFeedback,
|
[`${prefixCls}-has-feedback`]: hasFeedback,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getMergedStatus = (contextStatus?: ValidateStatus, customStatus?: InputStatus) =>
|
||||||
|
customStatus || contextStatus;
|
||||||
|
@ -20176,27 +20176,96 @@ exports[`renders ./components/form/demo/validate-static.md extend context correc
|
|||||||
class="ant-form-item-control-input-content"
|
class="ant-form-item-control-input-content"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="ant-input-number"
|
class="ant-input-number-affix-wrapper ant-input-number-affix-wrapper-status-success ant-input-number-affix-wrapper-has-feedback"
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="ant-input-number-handler-wrap"
|
class="ant-input-number ant-input-number-status-success"
|
||||||
>
|
>
|
||||||
<span
|
<div
|
||||||
aria-disabled="false"
|
class="ant-input-number-handler-wrap"
|
||||||
aria-label="Increase Value"
|
|
||||||
class="ant-input-number-handler ant-input-number-handler-up"
|
|
||||||
role="button"
|
|
||||||
unselectable="on"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
aria-label="up"
|
aria-disabled="false"
|
||||||
class="anticon anticon-up ant-input-number-handler-up-inner"
|
aria-label="Increase Value"
|
||||||
|
class="ant-input-number-handler ant-input-number-handler-up"
|
||||||
|
role="button"
|
||||||
|
unselectable="on"
|
||||||
|
>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
autocomplete="off"
|
||||||
|
class="ant-input-number-input"
|
||||||
|
role="spinbutton"
|
||||||
|
step="1"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="ant-input-number-suffix"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-input-number-feedback-icon"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="check-circle"
|
||||||
|
class="anticon anticon-check-circle"
|
||||||
role="img"
|
role="img"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
data-icon="up"
|
data-icon="check-circle"
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
focusable="false"
|
focusable="false"
|
||||||
height="1em"
|
height="1em"
|
||||||
@ -20204,50 +20273,12 @@ exports[`renders ./components/form/demo/validate-static.md extend context correc
|
|||||||
width="1em"
|
width="1em"
|
||||||
>
|
>
|
||||||
<path
|
<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"
|
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<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"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
autocomplete="off"
|
|
||||||
class="ant-input-number-input"
|
|
||||||
role="spinbutton"
|
|
||||||
step="1"
|
|
||||||
value=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -8167,27 +8167,96 @@ exports[`renders ./components/form/demo/validate-static.md correctly 1`] = `
|
|||||||
class="ant-form-item-control-input-content"
|
class="ant-form-item-control-input-content"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="ant-input-number"
|
class="ant-input-number-affix-wrapper ant-input-number-affix-wrapper-status-success ant-input-number-affix-wrapper-has-feedback"
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="ant-input-number-handler-wrap"
|
class="ant-input-number ant-input-number-status-success"
|
||||||
>
|
>
|
||||||
<span
|
<div
|
||||||
aria-disabled="false"
|
class="ant-input-number-handler-wrap"
|
||||||
aria-label="Increase Value"
|
|
||||||
class="ant-input-number-handler ant-input-number-handler-up"
|
|
||||||
role="button"
|
|
||||||
unselectable="on"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
aria-label="up"
|
aria-disabled="false"
|
||||||
class="anticon anticon-up ant-input-number-handler-up-inner"
|
aria-label="Increase Value"
|
||||||
|
class="ant-input-number-handler ant-input-number-handler-up"
|
||||||
|
role="button"
|
||||||
|
unselectable="on"
|
||||||
|
>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
autocomplete="off"
|
||||||
|
class="ant-input-number-input"
|
||||||
|
role="spinbutton"
|
||||||
|
step="1"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span
|
||||||
|
class="ant-input-number-suffix"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-input-number-feedback-icon"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="check-circle"
|
||||||
|
class="anticon anticon-check-circle"
|
||||||
role="img"
|
role="img"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
data-icon="up"
|
data-icon="check-circle"
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
focusable="false"
|
focusable="false"
|
||||||
height="1em"
|
height="1em"
|
||||||
@ -8195,50 +8264,12 @@ exports[`renders ./components/form/demo/validate-static.md correctly 1`] = `
|
|||||||
width="1em"
|
width="1em"
|
||||||
>
|
>
|
||||||
<path
|
<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"
|
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<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"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
autocomplete="off"
|
|
||||||
class="ant-input-number-input"
|
|
||||||
role="spinbutton"
|
|
||||||
step="1"
|
|
||||||
value=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2181,3 +2181,386 @@ exports[`renders ./components/input-number/demo/size.md extend context correctly
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`renders ./components/input-number/demo/status.md extend context correctly 1`] = `
|
||||||
|
<div
|
||||||
|
class="ant-space ant-space-vertical"
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-space-item"
|
||||||
|
style="margin-bottom:8px"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-input-number ant-input-number-status-error"
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<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-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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
autocomplete="off"
|
||||||
|
class="ant-input-number-input"
|
||||||
|
role="spinbutton"
|
||||||
|
step="1"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-space-item"
|
||||||
|
style="margin-bottom:8px"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-input-number ant-input-number-status-warning"
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<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-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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
autocomplete="off"
|
||||||
|
class="ant-input-number-input"
|
||||||
|
role="spinbutton"
|
||||||
|
step="1"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-space-item"
|
||||||
|
style="margin-bottom:8px"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-input-number-affix-wrapper ant-input-number-affix-wrapper-status-error"
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-input-number-prefix"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="clock-circle"
|
||||||
|
class="anticon anticon-clock-circle"
|
||||||
|
role="img"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="clock-circle"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<div
|
||||||
|
class="ant-input-number ant-input-number-status-error"
|
||||||
|
>
|
||||||
|
<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-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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
autocomplete="off"
|
||||||
|
class="ant-input-number-input"
|
||||||
|
role="spinbutton"
|
||||||
|
step="1"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-space-item"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-input-number-affix-wrapper ant-input-number-affix-wrapper-status-warning"
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-input-number-prefix"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="clock-circle"
|
||||||
|
class="anticon anticon-clock-circle"
|
||||||
|
role="img"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="clock-circle"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<div
|
||||||
|
class="ant-input-number ant-input-number-status-warning"
|
||||||
|
>
|
||||||
|
<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-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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
autocomplete="off"
|
||||||
|
class="ant-input-number-input"
|
||||||
|
role="spinbutton"
|
||||||
|
step="1"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
@ -1908,3 +1908,386 @@ exports[`renders ./components/input-number/demo/size.md correctly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`renders ./components/input-number/demo/status.md correctly 1`] = `
|
||||||
|
<div
|
||||||
|
class="ant-space ant-space-vertical"
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-space-item"
|
||||||
|
style="margin-bottom:8px"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-input-number ant-input-number-status-error"
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<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-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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
autocomplete="off"
|
||||||
|
class="ant-input-number-input"
|
||||||
|
role="spinbutton"
|
||||||
|
step="1"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-space-item"
|
||||||
|
style="margin-bottom:8px"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-input-number ant-input-number-status-warning"
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<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-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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
autocomplete="off"
|
||||||
|
class="ant-input-number-input"
|
||||||
|
role="spinbutton"
|
||||||
|
step="1"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-space-item"
|
||||||
|
style="margin-bottom:8px"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-input-number-affix-wrapper ant-input-number-affix-wrapper-status-error"
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-input-number-prefix"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="clock-circle"
|
||||||
|
class="anticon anticon-clock-circle"
|
||||||
|
role="img"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="clock-circle"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<div
|
||||||
|
class="ant-input-number ant-input-number-status-error"
|
||||||
|
>
|
||||||
|
<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-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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
autocomplete="off"
|
||||||
|
class="ant-input-number-input"
|
||||||
|
role="spinbutton"
|
||||||
|
step="1"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-space-item"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-input-number-affix-wrapper ant-input-number-affix-wrapper-status-warning"
|
||||||
|
style="width:100%"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-input-number-prefix"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="clock-circle"
|
||||||
|
class="anticon anticon-clock-circle"
|
||||||
|
role="img"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="clock-circle"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<div
|
||||||
|
class="ant-input-number ant-input-number-status-warning"
|
||||||
|
>
|
||||||
|
<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-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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
autocomplete="off"
|
||||||
|
class="ant-input-number-input"
|
||||||
|
role="spinbutton"
|
||||||
|
step="1"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
@ -19,8 +19,7 @@ import { InputNumber } from 'antd';
|
|||||||
import { ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons';
|
import { ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons';
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<InputNumber
|
<InputNumber controls={{ upIcon: <ArrowUpOutlined />, downIcon: <ArrowDownOutlined /> }} />,
|
||||||
controls={{ upIcon: <ArrowUpOutlined />, downIcon: <ArrowDownOutlined/> }}
|
mountNode,
|
||||||
/>
|
);
|
||||||
, mountNode);
|
|
||||||
```
|
```
|
||||||
|
30
components/input-number/demo/status.md
Normal file
30
components/input-number/demo/status.md
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
order: 19
|
||||||
|
title:
|
||||||
|
zh-CN: 自定义校验
|
||||||
|
en-US: Customized Validation
|
||||||
|
---
|
||||||
|
|
||||||
|
## zh-CN
|
||||||
|
|
||||||
|
使用 `status` 为 InputNumber 添加状态。可选 `error` 或者 `warning`。
|
||||||
|
|
||||||
|
## en-US
|
||||||
|
|
||||||
|
Add status to InputNumber with `status`, which could be `error` or `warning`。
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
import { InputNumber, Space } from 'antd';
|
||||||
|
import ClockCircleOutlined from '@ant-design/icons/ClockCircleOutlined';
|
||||||
|
|
||||||
|
const ValidateInputs: React.FC = () => (
|
||||||
|
<Space direction="vertical" style={{ width: '100%' }}>
|
||||||
|
<InputNumber status="error" style={{ width: '100%' }} />
|
||||||
|
<InputNumber status="warning" style={{ width: '100%' }} />
|
||||||
|
<InputNumber status="error" style={{ width: '100%' }} prefix={<ClockCircleOutlined />} />
|
||||||
|
<InputNumber status="warning" style={{ width: '100%' }} prefix={<ClockCircleOutlined />} />
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
|
||||||
|
ReactDOM.render(<ValidateInputs />, mountNode);
|
||||||
|
```
|
@ -19,7 +19,7 @@ When a numeric value needs to be provided.
|
|||||||
| addonBefore | The label text displayed before (on the left side of) the input field | ReactNode | - | |
|
| addonBefore | The label text displayed before (on the left side of) the input field | ReactNode | - | |
|
||||||
| autoFocus | If get focus when component mounted | boolean | false | - |
|
| autoFocus | If get focus when component mounted | boolean | false | - |
|
||||||
| bordered | Whether has border style | boolean | true | 4.12.0 |
|
| bordered | Whether has border style | boolean | true | 4.12.0 |
|
||||||
| controls | Whether to show `+-` controls, or set custom arrows icon | boolean \| { upIcon?: React.ReactNode; downIcon?: React.ReactNode; } | - | 4.19.0 |
|
| controls | Whether to show `+-` controls, or set custom arrows icon | boolean \| { upIcon?: React.ReactNode; downIcon?: React.ReactNode; } | - | 4.19.0 |
|
||||||
| decimalSeparator | Decimal separator | string | - | - |
|
| decimalSeparator | Decimal separator | string | - | - |
|
||||||
| defaultValue | The initial value | number | - | - |
|
| defaultValue | The initial value | number | - | - |
|
||||||
| disabled | If disable the input | boolean | false | - |
|
| disabled | If disable the input | boolean | false | - |
|
||||||
@ -30,6 +30,7 @@ When a numeric value needs to be provided.
|
|||||||
| parser | Specifies the value extracted from formatter | function(string): number | - | - |
|
| parser | Specifies the value extracted from formatter | function(string): number | - | - |
|
||||||
| precision | The precision of input value. Will use `formatter` when config of `formatter` | number | - | - |
|
| precision | The precision of input value. Will use `formatter` when config of `formatter` | number | - | - |
|
||||||
| readOnly | If readonly the input | boolean | false | - |
|
| readOnly | If readonly the input | boolean | false | - |
|
||||||
|
| status | Set validation status | 'error' \| 'warning' | - | 4.19.0 |
|
||||||
| prefix | The prefix icon for the Input | ReactNode | - | 4.17.0 |
|
| prefix | The prefix icon for the Input | ReactNode | - | 4.17.0 |
|
||||||
| size | The height of input box | `large` \| `middle` \| `small` | - | - |
|
| size | The height of input box | `large` \| `middle` \| `small` | - | - |
|
||||||
| step | The number to which the current value is increased or decreased. It can be an integer or decimal | number \| string | 1 | - |
|
| step | The number to which the current value is increased or decreased. It can be an integer or decimal | number \| string | 1 | - |
|
||||||
|
@ -1,12 +1,19 @@
|
|||||||
import * as React from 'react';
|
import DownOutlined from '@ant-design/icons/DownOutlined';
|
||||||
|
import UpOutlined from '@ant-design/icons/UpOutlined';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import RcInputNumber, { InputNumberProps as RcInputNumberProps } from 'rc-input-number';
|
import RcInputNumber, { InputNumberProps as RcInputNumberProps } from 'rc-input-number';
|
||||||
import UpOutlined from '@ant-design/icons/UpOutlined';
|
import * as React from 'react';
|
||||||
import DownOutlined from '@ant-design/icons/DownOutlined';
|
import { useContext } from 'react';
|
||||||
|
|
||||||
import { ConfigContext } from '../config-provider';
|
import { ConfigContext } from '../config-provider';
|
||||||
import SizeContext, { SizeType } from '../config-provider/SizeContext';
|
import SizeContext, { SizeType } from '../config-provider/SizeContext';
|
||||||
|
import { FormItemStatusContext } from '../form/context';
|
||||||
import { cloneElement } from '../_util/reactNode';
|
import { cloneElement } from '../_util/reactNode';
|
||||||
|
import {
|
||||||
|
getFeedbackIcon,
|
||||||
|
getStatusClassNames,
|
||||||
|
InputStatus,
|
||||||
|
getMergedStatus,
|
||||||
|
} from '../_util/statusUtils';
|
||||||
|
|
||||||
type ValueType = string | number;
|
type ValueType = string | number;
|
||||||
|
|
||||||
@ -18,6 +25,7 @@ export interface InputNumberProps<T extends ValueType = ValueType>
|
|||||||
prefix?: React.ReactNode;
|
prefix?: React.ReactNode;
|
||||||
size?: SizeType;
|
size?: SizeType;
|
||||||
bordered?: boolean;
|
bordered?: boolean;
|
||||||
|
status?: InputStatus;
|
||||||
controls?: boolean | { upIcon?: React.ReactNode; downIcon?: React.ReactNode };
|
controls?: boolean | { upIcon?: React.ReactNode; downIcon?: React.ReactNode };
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,6 +46,7 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>((props,
|
|||||||
prefix,
|
prefix,
|
||||||
bordered = true,
|
bordered = true,
|
||||||
readOnly,
|
readOnly,
|
||||||
|
status: customStatus,
|
||||||
controls,
|
controls,
|
||||||
...others
|
...others
|
||||||
} = props;
|
} = props;
|
||||||
@ -62,6 +71,9 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>((props,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { hasFeedback, status: contextStatus } = useContext(FormItemStatusContext);
|
||||||
|
const mergedStatus = getMergedStatus(contextStatus, customStatus);
|
||||||
|
|
||||||
const mergeSize = customizeSize || size;
|
const mergeSize = customizeSize || size;
|
||||||
const inputNumberClass = classNames(
|
const inputNumberClass = classNames(
|
||||||
{
|
{
|
||||||
@ -71,6 +83,7 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>((props,
|
|||||||
[`${prefixCls}-readonly`]: readOnly,
|
[`${prefixCls}-readonly`]: readOnly,
|
||||||
[`${prefixCls}-borderless`]: !bordered,
|
[`${prefixCls}-borderless`]: !bordered,
|
||||||
},
|
},
|
||||||
|
getStatusClassNames(prefixCls, mergedStatus),
|
||||||
className,
|
className,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -87,25 +100,30 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>((props,
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (prefix != null) {
|
if (prefix != null || hasFeedback) {
|
||||||
const affixWrapperCls = classNames(`${prefixCls}-affix-wrapper`, {
|
const affixWrapperCls = classNames(
|
||||||
[`${prefixCls}-affix-wrapper-focused`]: focused,
|
`${prefixCls}-affix-wrapper`,
|
||||||
[`${prefixCls}-affix-wrapper-disabled`]: props.disabled,
|
getStatusClassNames(`${prefixCls}-affix-wrapper`, mergedStatus, hasFeedback),
|
||||||
[`${prefixCls}-affix-wrapper-sm`]: size === 'small',
|
{
|
||||||
[`${prefixCls}-affix-wrapper-lg`]: size === 'large',
|
[`${prefixCls}-affix-wrapper-focused`]: focused,
|
||||||
[`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',
|
[`${prefixCls}-affix-wrapper-disabled`]: props.disabled,
|
||||||
[`${prefixCls}-affix-wrapper-readonly`]: readOnly,
|
[`${prefixCls}-affix-wrapper-sm`]: size === 'small',
|
||||||
[`${prefixCls}-affix-wrapper-borderless`]: !bordered,
|
[`${prefixCls}-affix-wrapper-lg`]: size === 'large',
|
||||||
// className will go to addon wrapper
|
[`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',
|
||||||
[`${className}`]: !(addonBefore || addonAfter) && className,
|
[`${prefixCls}-affix-wrapper-readonly`]: readOnly,
|
||||||
});
|
[`${prefixCls}-affix-wrapper-borderless`]: !bordered,
|
||||||
|
// className will go to addon wrapper
|
||||||
|
[`${className}`]: !(addonBefore || addonAfter) && className,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
element = (
|
element = (
|
||||||
<div
|
<div
|
||||||
className={affixWrapperCls}
|
className={affixWrapperCls}
|
||||||
style={props.style}
|
style={props.style}
|
||||||
onMouseUp={() => inputRef.current!.focus()}
|
onMouseUp={() => inputRef.current!.focus()}
|
||||||
>
|
>
|
||||||
<span className={`${prefixCls}-prefix`}>{prefix}</span>
|
{prefix && <span className={`${prefixCls}-prefix`}>{prefix}</span>}
|
||||||
{cloneElement(element, {
|
{cloneElement(element, {
|
||||||
style: null,
|
style: null,
|
||||||
value: props.value,
|
value: props.value,
|
||||||
@ -118,6 +136,9 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>((props,
|
|||||||
props.onBlur?.(event);
|
props.onBlur?.(event);
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
|
{hasFeedback && (
|
||||||
|
<span className={`${prefixCls}-suffix`}>{getFeedbackIcon(prefixCls, mergedStatus)}</span>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -141,6 +162,7 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>((props,
|
|||||||
[`${prefixCls}-group-wrapper-lg`]: size === 'large',
|
[`${prefixCls}-group-wrapper-lg`]: size === 'large',
|
||||||
[`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',
|
[`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',
|
||||||
},
|
},
|
||||||
|
getStatusClassNames(`${prefixCls}-group-wrapper`, mergedStatus, hasFeedback),
|
||||||
className,
|
className,
|
||||||
);
|
);
|
||||||
element = (
|
element = (
|
||||||
|
@ -33,6 +33,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/XOS8qZ0kU/InputNumber.svg
|
|||||||
| parser | 指定从 `formatter` 里转换回数字的方式,和 `formatter` 搭配使用 | function(string): number | - | - |
|
| parser | 指定从 `formatter` 里转换回数字的方式,和 `formatter` 搭配使用 | function(string): number | - | - |
|
||||||
| precision | 数值精度,配置 `formatter` 时会以 `formatter` 为准 | number | - | - |
|
| precision | 数值精度,配置 `formatter` 时会以 `formatter` 为准 | number | - | - |
|
||||||
| readOnly | 只读 | boolean | false | - |
|
| readOnly | 只读 | boolean | false | - |
|
||||||
|
| status | 设置校验状态 | 'error' \| 'warning' | - | 4.19.0 |
|
||||||
| prefix | 带有前缀图标的 input | ReactNode | - | 4.17.0 |
|
| prefix | 带有前缀图标的 input | ReactNode | - | 4.17.0 |
|
||||||
| size | 输入框大小 | `large` \| `middle` \| `small` | - | - |
|
| size | 输入框大小 | `large` \| `middle` \| `small` | - | - |
|
||||||
| step | 每次改变步数,可以为小数 | number \| string | 1 | - |
|
| step | 每次改变步数,可以为小数 | number \| string | 1 | - |
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
&-affix-wrapper {
|
&-affix-wrapper {
|
||||||
.input();
|
.input();
|
||||||
// or number handler will cover form status
|
// or number handler will cover form status
|
||||||
position: static;
|
position: relative;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
width: 90px;
|
width: 90px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -49,14 +49,33 @@
|
|||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
content: '\a0';
|
content: '\a0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.@{ant-prefix}-input-number-handler-wrap {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-prefix {
|
&-prefix,
|
||||||
|
&-suffix {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: none;
|
flex: none;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-prefix {
|
||||||
margin-inline-end: @input-affix-margin;
|
margin-inline-end: @input-affix-margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-suffix {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 1;
|
||||||
|
height: 100%;
|
||||||
|
margin-right: @input-padding-horizontal-base;
|
||||||
|
margin-left: @input-affix-margin;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.@{ant-prefix}-input-number-group-wrapper .@{ant-prefix}-input-number-affix-wrapper {
|
.@{ant-prefix}-input-number-group-wrapper .@{ant-prefix}-input-number-affix-wrapper {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
@import '../../style/mixins/index';
|
@import '../../style/mixins/index';
|
||||||
@import '../../input/style/mixin';
|
@import '../../input/style/mixin';
|
||||||
@import './affix';
|
@import './affix';
|
||||||
|
@import './status';
|
||||||
|
|
||||||
@input-number-prefix-cls: ~'@{ant-prefix}-input-number';
|
@input-number-prefix-cls: ~'@{ant-prefix}-input-number';
|
||||||
@form-item-prefix-cls: ~'@{ant-prefix}-form-item';
|
@form-item-prefix-cls: ~'@{ant-prefix}-form-item';
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
import '../../style/index.less';
|
import '../../style/index.less';
|
||||||
import './index.less';
|
import './index.less';
|
||||||
|
|
||||||
|
// deps-lint-skip: form
|
||||||
|
45
components/input-number/style/status.less
Normal file
45
components/input-number/style/status.less
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
@import '../../input/style/status';
|
||||||
|
|
||||||
|
@input-number-prefix-cls: ~'@{ant-prefix}-input-number';
|
||||||
|
|
||||||
|
@input-number-wrapper-cls: @input-number-prefix-cls, ~'@{input-number-prefix-cls}-affix-wrapper';
|
||||||
|
|
||||||
|
each(@input-number-wrapper-cls, {
|
||||||
|
.@{value} {
|
||||||
|
&-status-error {
|
||||||
|
.status-color(@value, @error-color, @error-color, @input-bg, @error-color-hover, @error-color-outline);
|
||||||
|
.status-color-common(@input-number-prefix-cls, @error-color, @error-color, @input-bg, @error-color-hover, @error-color-outline)
|
||||||
|
}
|
||||||
|
|
||||||
|
&-status-warning {
|
||||||
|
.status-color(@value, @warning-color, @warning-color, @input-bg, @warning-color-hover, @warning-color-outline);
|
||||||
|
.status-color-common(@input-number-prefix-cls, @warning-color, @warning-color, @input-bg, @warning-color-hover, @warning-color-outline)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
.@{input-number-prefix-cls}-affix-wrapper {
|
||||||
|
&-status-validating {
|
||||||
|
.@{input-number-prefix-cls}-feedback-icon {
|
||||||
|
display: inline-block;
|
||||||
|
color: @primary-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-status-success {
|
||||||
|
.@{input-number-prefix-cls}-feedback-icon {
|
||||||
|
color: @success-color;
|
||||||
|
animation-name: diffZoomIn1 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.@{input-number-prefix-cls}-group-wrapper {
|
||||||
|
&-status-error {
|
||||||
|
.group-status-color(@input-number-prefix-cls, @error-color, @error-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
&-status-warning {
|
||||||
|
.group-status-color(@input-number-prefix-cls, @warning-color, @warning-color);
|
||||||
|
}
|
||||||
|
}
|
@ -5,7 +5,7 @@ import { DirectionType } from '../config-provider';
|
|||||||
import { SizeType } from '../config-provider/SizeContext';
|
import { SizeType } from '../config-provider/SizeContext';
|
||||||
import { FormItemStatusContext, FormItemStatusContextProps } from '../form/context';
|
import { FormItemStatusContext, FormItemStatusContextProps } from '../form/context';
|
||||||
import { cloneElement } from '../_util/reactNode';
|
import { cloneElement } from '../_util/reactNode';
|
||||||
import { getStatusClassNames, InputStatus } from '../_util/statusUtils';
|
import { getMergedStatus, getStatusClassNames, InputStatus } from '../_util/statusUtils';
|
||||||
import { tuple } from '../_util/type';
|
import { tuple } from '../_util/type';
|
||||||
import type { InputProps } from './Input';
|
import type { InputProps } from './Input';
|
||||||
import { getInputClassName, hasPrefixSuffix } from './utils';
|
import { getInputClassName, hasPrefixSuffix } from './utils';
|
||||||
@ -141,7 +141,11 @@ class ClearableLabeledInput extends React.Component<ClearableInputProps> {
|
|||||||
// className will go to addon wrapper
|
// className will go to addon wrapper
|
||||||
[`${className}`]: !hasAddon(this.props) && className,
|
[`${className}`]: !hasAddon(this.props) && className,
|
||||||
},
|
},
|
||||||
getStatusClassNames(`${prefixCls}-affix-wrapper`, contextStatus || customStatus, hasFeedback),
|
getStatusClassNames(
|
||||||
|
`${prefixCls}-affix-wrapper`,
|
||||||
|
getMergedStatus(contextStatus, customStatus),
|
||||||
|
hasFeedback,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
@ -201,7 +205,11 @@ class ClearableLabeledInput extends React.Component<ClearableInputProps> {
|
|||||||
[`${prefixCls}-group-wrapper-lg`]: size === 'large',
|
[`${prefixCls}-group-wrapper-lg`]: size === 'large',
|
||||||
[`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',
|
[`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',
|
||||||
},
|
},
|
||||||
getStatusClassNames(`${prefixCls}-group-wrapper`, contextStatus || customStatus, hasFeedback),
|
getStatusClassNames(
|
||||||
|
`${prefixCls}-group-wrapper`,
|
||||||
|
getMergedStatus(contextStatus, customStatus),
|
||||||
|
hasFeedback,
|
||||||
|
),
|
||||||
className,
|
className,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -244,7 +252,11 @@ class ClearableLabeledInput extends React.Component<ClearableInputProps> {
|
|||||||
const affixWrapperCls = classNames(
|
const affixWrapperCls = classNames(
|
||||||
`${prefixCls}-affix-wrapper`,
|
`${prefixCls}-affix-wrapper`,
|
||||||
`${prefixCls}-affix-wrapper-textarea-with-clear-btn`,
|
`${prefixCls}-affix-wrapper-textarea-with-clear-btn`,
|
||||||
getStatusClassNames(`${prefixCls}-affix-wrapper`, contextStatus || customStatus, hasFeedback),
|
getStatusClassNames(
|
||||||
|
`${prefixCls}-affix-wrapper`,
|
||||||
|
getMergedStatus(contextStatus, customStatus),
|
||||||
|
hasFeedback,
|
||||||
|
),
|
||||||
{
|
{
|
||||||
[`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',
|
[`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',
|
||||||
[`${prefixCls}-affix-wrapper-borderless`]: !bordered,
|
[`${prefixCls}-affix-wrapper-borderless`]: !bordered,
|
||||||
|
@ -13,7 +13,7 @@ import SizeContext, { SizeType } from '../config-provider/SizeContext';
|
|||||||
import devWarning from '../_util/devWarning';
|
import devWarning from '../_util/devWarning';
|
||||||
import { getInputClassName, hasPrefixSuffix } from './utils';
|
import { getInputClassName, hasPrefixSuffix } from './utils';
|
||||||
import { FormItemStatusContext } from '../form/context';
|
import { FormItemStatusContext } from '../form/context';
|
||||||
import { getFeedbackIcon, InputStatus } from '../_util/statusUtils';
|
import { getFeedbackIcon, InputStatus, getMergedStatus } from '../_util/statusUtils';
|
||||||
|
|
||||||
export interface InputFocusOptions extends FocusOptions {
|
export interface InputFocusOptions extends FocusOptions {
|
||||||
cursor?: 'start' | 'end' | 'all';
|
cursor?: 'start' | 'end' | 'all';
|
||||||
@ -422,7 +422,7 @@ class Input extends React.Component<InputProps, InputState> {
|
|||||||
{size => (
|
{size => (
|
||||||
<FormItemStatusContext.Consumer>
|
<FormItemStatusContext.Consumer>
|
||||||
{({ status: contextStatus, hasFeedback }) => {
|
{({ status: contextStatus, hasFeedback }) => {
|
||||||
const mergedStatus = contextStatus || customStatus;
|
const mergedStatus = getMergedStatus(contextStatus, customStatus);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ClearableLabeledInput
|
<ClearableLabeledInput
|
||||||
|
@ -7,7 +7,12 @@ import * as React from 'react';
|
|||||||
import { ConfigContext } from '../config-provider';
|
import { ConfigContext } from '../config-provider';
|
||||||
import SizeContext, { SizeType } from '../config-provider/SizeContext';
|
import SizeContext, { SizeType } from '../config-provider/SizeContext';
|
||||||
import { FormItemStatusContext } from '../form/context';
|
import { FormItemStatusContext } from '../form/context';
|
||||||
import { getFeedbackIcon, getStatusClassNames, InputStatus } from '../_util/statusUtils';
|
import {
|
||||||
|
getFeedbackIcon,
|
||||||
|
getStatusClassNames,
|
||||||
|
InputStatus,
|
||||||
|
getMergedStatus,
|
||||||
|
} from '../_util/statusUtils';
|
||||||
import ClearableLabeledInput from './ClearableLabeledInput';
|
import ClearableLabeledInput from './ClearableLabeledInput';
|
||||||
import { fixControlledValue, InputFocusOptions, resolveOnChange, triggerFocus } from './Input';
|
import { fixControlledValue, InputFocusOptions, resolveOnChange, triggerFocus } from './Input';
|
||||||
|
|
||||||
@ -75,7 +80,7 @@ const TextArea = React.forwardRef<TextAreaRef, TextAreaProps>(
|
|||||||
const size = React.useContext(SizeContext);
|
const size = React.useContext(SizeContext);
|
||||||
|
|
||||||
const { status: contextStatus, hasFeedback } = React.useContext(FormItemStatusContext);
|
const { status: contextStatus, hasFeedback } = React.useContext(FormItemStatusContext);
|
||||||
const mergedStatus = contextStatus || customStatus;
|
const mergedStatus = getMergedStatus(contextStatus, customStatus);
|
||||||
|
|
||||||
const innerRef = React.useRef<RcTextArea>(null);
|
const innerRef = React.useRef<RcTextArea>(null);
|
||||||
const clearableInputRef = React.useRef<ClearableLabeledInput>(null);
|
const clearableInputRef = React.useRef<ClearableLabeledInput>(null);
|
||||||
|
@ -3801,6 +3801,369 @@ Array [
|
|||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`renders ./components/menu/demo/submenu-theme.md extend context correctly 1`] = `
|
||||||
|
Array [
|
||||||
|
<button
|
||||||
|
aria-checked="false"
|
||||||
|
class="ant-switch"
|
||||||
|
role="switch"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-switch-handle"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
class="ant-switch-inner"
|
||||||
|
>
|
||||||
|
Light
|
||||||
|
</span>
|
||||||
|
</button>,
|
||||||
|
<br />,
|
||||||
|
<br />,
|
||||||
|
<ul
|
||||||
|
class="ant-menu ant-menu-root ant-menu-vertical ant-menu-dark"
|
||||||
|
data-menu-list="true"
|
||||||
|
role="menu"
|
||||||
|
style="width:256px"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<li
|
||||||
|
class="ant-menu-submenu ant-menu-submenu-vertical ant-menu-submenu-open"
|
||||||
|
role="none"
|
||||||
|
theme="light"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
aria-expanded="true"
|
||||||
|
aria-haspopup="true"
|
||||||
|
class="ant-menu-submenu-title"
|
||||||
|
role="menuitem"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="mail"
|
||||||
|
class="anticon anticon-mail ant-menu-item-icon"
|
||||||
|
role="img"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="mail"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Navigation One
|
||||||
|
</span>
|
||||||
|
<i
|
||||||
|
class="ant-menu-submenu-arrow"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-menu-submenu ant-menu-submenu-popup ant-menu ant-menu-light"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<ul
|
||||||
|
class="ant-menu ant-menu-sub ant-menu-vertical"
|
||||||
|
data-menu-list="true"
|
||||||
|
>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item ant-menu-item-selected ant-menu-item-only-child"
|
||||||
|
role="menuitem"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Option 1
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item ant-menu-item-only-child"
|
||||||
|
role="menuitem"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Option 2
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item ant-menu-item-only-child"
|
||||||
|
role="menuitem"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Option 3
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item ant-menu-item-only-child"
|
||||||
|
role="menuitem"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Option 5
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item ant-menu-item-only-child"
|
||||||
|
role="menuitem"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Option 6
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ul>,
|
||||||
|
<div
|
||||||
|
aria-hidden="true"
|
||||||
|
style="display:none"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip ant-menu-inline-collapsed-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>,
|
||||||
|
]
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/menu/demo/switch-mode.md extend context correctly 1`] = `
|
exports[`renders ./components/menu/demo/switch-mode.md extend context correctly 1`] = `
|
||||||
Array [
|
Array [
|
||||||
<button
|
<button
|
||||||
|
@ -998,6 +998,103 @@ Array [
|
|||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`renders ./components/menu/demo/submenu-theme.md correctly 1`] = `
|
||||||
|
Array [
|
||||||
|
<button
|
||||||
|
aria-checked="false"
|
||||||
|
class="ant-switch"
|
||||||
|
role="switch"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-switch-handle"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
class="ant-switch-inner"
|
||||||
|
>
|
||||||
|
Light
|
||||||
|
</span>
|
||||||
|
</button>,
|
||||||
|
<br />,
|
||||||
|
<br />,
|
||||||
|
<ul
|
||||||
|
class="ant-menu ant-menu-root ant-menu-vertical ant-menu-dark"
|
||||||
|
data-menu-list="true"
|
||||||
|
role="menu"
|
||||||
|
style="width:256px"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<li
|
||||||
|
class="ant-menu-submenu ant-menu-submenu-vertical ant-menu-submenu-open"
|
||||||
|
role="none"
|
||||||
|
theme="light"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
aria-expanded="true"
|
||||||
|
aria-haspopup="true"
|
||||||
|
class="ant-menu-submenu-title"
|
||||||
|
role="menuitem"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="mail"
|
||||||
|
class="anticon anticon-mail ant-menu-item-icon"
|
||||||
|
role="img"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="mail"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Navigation One
|
||||||
|
</span>
|
||||||
|
<i
|
||||||
|
class="ant-menu-submenu-arrow"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item ant-menu-item-only-child"
|
||||||
|
role="menuitem"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Option 5
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<li
|
||||||
|
class="ant-menu-item ant-menu-item-only-child"
|
||||||
|
role="menuitem"
|
||||||
|
tabindex="-1"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-menu-title-content"
|
||||||
|
>
|
||||||
|
Option 6
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>,
|
||||||
|
<div
|
||||||
|
aria-hidden="true"
|
||||||
|
style="display:none"
|
||||||
|
/>,
|
||||||
|
]
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/menu/demo/switch-mode.md correctly 1`] = `
|
exports[`renders ./components/menu/demo/switch-mode.md correctly 1`] = `
|
||||||
Array [
|
Array [
|
||||||
<button
|
<button
|
||||||
|
Loading…
Reference in New Issue
Block a user