fix: hideAdd not work (#24621)

This commit is contained in:
二货机器人 2020-05-31 21:57:42 +08:00 committed by GitHub
parent 7eede1a0b6
commit 78ac8a19b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 61 deletions

View File

@ -453,36 +453,6 @@ exports[`renders ./components/tabs/demo/custom-add-trigger.md correctly 1`] = `
</span>
</span>
</button>
<button
aria-label="Add tab"
class="ant-tabs-nav-add"
type="button"
>
<span
aria-label="plus"
class="anticon anticon-plus"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="plus"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<defs />
<path
d="M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"
/>
<path
d="M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"
/>
</svg>
</span>
</button>
<div
class="ant-tabs-ink-bar ant-tabs-ink-bar-animated"
/>
@ -523,36 +493,6 @@ exports[`renders ./components/tabs/demo/custom-add-trigger.md correctly 1`] = `
</svg>
</span>
</button>
<button
aria-label="Add tab"
class="ant-tabs-nav-add"
type="button"
>
<span
aria-label="plus"
class="anticon anticon-plus"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="plus"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<defs />
<path
d="M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"
/>
<path
d="M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"
/>
</svg>
</span>
</button>
</div>
</div>
<div

View File

@ -33,7 +33,7 @@ function Tabs({ type, className, size, onEdit, hideAdd, ...props }: TabsProps) {
},
removeIcon: <CloseOutlined />,
addIcon: <PlusOutlined />,
showAdd: hideAdd !== false,
showAdd: hideAdd !== true,
};
}