mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-22 17:13:27 +08:00
fix: some fix
This commit is contained in:
parent
21ae100240
commit
b7d9fdbc49
@ -899,26 +899,6 @@ exports[`renders components/tag/demo/disabled.tsx extend context correctly 1`] =
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex ant-flex-wrap-wrap ant-flex-gap-small"
|
||||
>
|
||||
<span
|
||||
class="ant-tag ant-tag-red ant-tag-disabled"
|
||||
>
|
||||
Preset Color Red
|
||||
</span>
|
||||
<span
|
||||
class="ant-tag ant-tag-has-color ant-tag-disabled"
|
||||
style="background-color: rgba(0, 0, 0, 0.04);"
|
||||
>
|
||||
Custom Color #f50
|
||||
</span>
|
||||
<span
|
||||
class="ant-tag ant-tag-success ant-tag-disabled"
|
||||
>
|
||||
Preset Status Success
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex ant-flex-wrap-wrap ant-flex-gap-small"
|
||||
>
|
||||
@ -1044,70 +1024,6 @@ exports[`renders components/tag/demo/disabled.tsx extend context correctly 1`] =
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex ant-flex-wrap-wrap ant-flex-gap-small"
|
||||
>
|
||||
<span
|
||||
class="ant-tag ant-tag-borderless ant-tag-disabled"
|
||||
>
|
||||
Borderless Basic
|
||||
</span>
|
||||
<span
|
||||
class="ant-tag ant-tag-success ant-tag-borderless ant-tag-disabled"
|
||||
>
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"
|
||||
/>
|
||||
<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"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span>
|
||||
Borderless with Icon
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
class="ant-tag ant-tag-borderless ant-tag-disabled"
|
||||
>
|
||||
Borderless Closable
|
||||
<span
|
||||
aria-label="close"
|
||||
class="anticon anticon-close ant-tag-close-icon"
|
||||
role="img"
|
||||
tabindex="-1"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
@ -881,26 +881,6 @@ exports[`renders components/tag/demo/disabled.tsx correctly 1`] = `
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex ant-flex-wrap-wrap ant-flex-gap-small"
|
||||
>
|
||||
<span
|
||||
class="ant-tag ant-tag-red ant-tag-disabled"
|
||||
>
|
||||
Preset Color Red
|
||||
</span>
|
||||
<span
|
||||
class="ant-tag ant-tag-has-color ant-tag-disabled"
|
||||
style="background-color:rgba(0,0,0,0.04)"
|
||||
>
|
||||
Custom Color #f50
|
||||
</span>
|
||||
<span
|
||||
class="ant-tag ant-tag-success ant-tag-disabled"
|
||||
>
|
||||
Preset Status Success
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex ant-flex-wrap-wrap ant-flex-gap-small"
|
||||
>
|
||||
@ -1026,70 +1006,6 @@ exports[`renders components/tag/demo/disabled.tsx correctly 1`] = `
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="ant-flex ant-flex-wrap-wrap ant-flex-gap-small"
|
||||
>
|
||||
<span
|
||||
class="ant-tag ant-tag-borderless ant-tag-disabled"
|
||||
>
|
||||
Borderless Basic
|
||||
</span>
|
||||
<span
|
||||
class="ant-tag ant-tag-success ant-tag-borderless ant-tag-disabled"
|
||||
>
|
||||
<span
|
||||
aria-label="check-circle"
|
||||
class="anticon anticon-check-circle"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="check-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"
|
||||
/>
|
||||
<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"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span>
|
||||
Borderless with Icon
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
class="ant-tag ant-tag-borderless ant-tag-disabled"
|
||||
>
|
||||
Borderless Closable
|
||||
<span
|
||||
aria-label="close"
|
||||
class="anticon anticon-close ant-tag-close-icon"
|
||||
role="img"
|
||||
tabindex="-1"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="close"
|
||||
fill="currentColor"
|
||||
fill-rule="evenodd"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
@ -7,11 +7,6 @@ const { CheckableTag } = Tag;
|
||||
const App: React.FC = () => {
|
||||
const [selectedTags, setSelectedTags] = useState<string[]>(['Books']);
|
||||
|
||||
const handleClick = (tagName: string) => {
|
||||
console.log(`Tag ${tagName} clicked`);
|
||||
message.info(`Tag ${tagName} clicked`);
|
||||
};
|
||||
|
||||
const handleClose = (tagName: string) => {
|
||||
console.log(`Tag ${tagName} closed`);
|
||||
message.info(`Tag ${tagName} closed`);
|
||||
@ -28,34 +23,15 @@ const App: React.FC = () => {
|
||||
return (
|
||||
<Flex vertical gap="middle">
|
||||
<Flex gap="small" wrap>
|
||||
<Tag disabled onClick={() => handleClick('Basic')}>
|
||||
Basic Tag
|
||||
</Tag>
|
||||
<Tag disabled onClick={() => handleClick('Link')}>
|
||||
<Tag disabled>Basic Tag</Tag>
|
||||
<Tag disabled>
|
||||
<a href="https://ant.design">Link Tag</a>
|
||||
</Tag>
|
||||
<Tag
|
||||
disabled
|
||||
color="success"
|
||||
icon={<CheckCircleOutlined />}
|
||||
onClick={() => handleClick('Success')}
|
||||
>
|
||||
<Tag disabled color="success" icon={<CheckCircleOutlined />}>
|
||||
Icon Tag
|
||||
</Tag>
|
||||
</Flex>
|
||||
|
||||
<Flex gap="small" wrap>
|
||||
<Tag disabled color="red" onClick={() => handleClick('Red')}>
|
||||
Preset Color Red
|
||||
</Tag>
|
||||
<Tag disabled color="#f50" onClick={() => handleClick('#f50')}>
|
||||
Custom Color #f50
|
||||
</Tag>
|
||||
<Tag disabled color="success" onClick={() => handleClick('Success')}>
|
||||
Preset Status Success
|
||||
</Tag>
|
||||
</Flex>
|
||||
|
||||
<Flex gap="small" wrap>
|
||||
{['Books', 'Movies', 'Music'].map((tag) => (
|
||||
<CheckableTag
|
||||
@ -70,12 +46,7 @@ const App: React.FC = () => {
|
||||
</Flex>
|
||||
|
||||
<Flex gap="small" wrap>
|
||||
<Tag
|
||||
disabled
|
||||
closable
|
||||
onClick={() => handleClick('Closable')}
|
||||
onClose={() => handleClose('Closable')}
|
||||
>
|
||||
<Tag disabled closable onClose={() => handleClose('Closable')}>
|
||||
Closable Tag
|
||||
</Tag>
|
||||
<Tag
|
||||
@ -83,7 +54,6 @@ const App: React.FC = () => {
|
||||
closable
|
||||
color="success"
|
||||
icon={<CheckCircleOutlined />}
|
||||
onClick={() => handleClick('Closable Success')}
|
||||
onClose={() => handleClose('Closable Success')}
|
||||
>
|
||||
Closable with Icon
|
||||
@ -92,30 +62,6 @@ const App: React.FC = () => {
|
||||
Closable with Custom Icon
|
||||
</Tag>
|
||||
</Flex>
|
||||
|
||||
<Flex gap="small" wrap>
|
||||
<Tag disabled bordered={false} onClick={() => handleClick('Borderless')}>
|
||||
Borderless Basic
|
||||
</Tag>
|
||||
<Tag
|
||||
disabled
|
||||
bordered={false}
|
||||
color="success"
|
||||
icon={<CheckCircleOutlined />}
|
||||
onClick={() => handleClick('Borderless Success')}
|
||||
>
|
||||
Borderless with Icon
|
||||
</Tag>
|
||||
<Tag
|
||||
disabled
|
||||
bordered={false}
|
||||
closable
|
||||
onClick={() => handleClick('Borderless Closable')}
|
||||
onClose={() => handleClose('Borderless Closable')}
|
||||
>
|
||||
Borderless Closable
|
||||
</Tag>
|
||||
</Flex>
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user