chore: auto merge branchs (#30708)

chore: feature merge master
This commit is contained in:
github-actions[bot] 2021-05-26 11:41:30 +00:00 committed by GitHub
commit 772bdd8ada
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 968 additions and 302 deletions

View File

@ -7,7 +7,7 @@ on:
jobs:
comment:
runs-on: ubuntu-latest
if: (github.event.pull_request.head.ref == 'feature' && github.event.pull_request.base.ref == 'master') || (github.event.pull_request.base.ref == 'feature' && github.event.pull_request.head.ref == 'master')
if: github.event.pull_request.head.ref == 'feature' || github.event.pull_request.head.ref == 'master'
steps:
- uses: actions-cool/issues-helper@v2.2.1
with:

View File

@ -15054,9 +15054,12 @@ exports[`ConfigProvider components Menu configProvider 1`] = `
role="menuitem"
style="padding-left:24px"
tabindex="-1"
title="bamboo"
>
bamboo
<span
class="config-menu-title-content"
>
bamboo
</span>
<i
class="config-menu-submenu-arrow"
/>
@ -15083,7 +15086,11 @@ exports[`ConfigProvider components Menu configProvider 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Light
<span
class="config-menu-title-content"
>
Light
</span>
</li>
</ul>
</li>
@ -15110,9 +15117,12 @@ exports[`ConfigProvider components Menu configProvider componentSize large 1`] =
role="menuitem"
style="padding-left:24px"
tabindex="-1"
title="bamboo"
>
bamboo
<span
class="config-menu-title-content"
>
bamboo
</span>
<i
class="config-menu-submenu-arrow"
/>
@ -15139,7 +15149,11 @@ exports[`ConfigProvider components Menu configProvider componentSize large 1`] =
style="padding-left:48px"
tabindex="-1"
>
Light
<span
class="config-menu-title-content"
>
Light
</span>
</li>
</ul>
</li>
@ -15166,9 +15180,12 @@ exports[`ConfigProvider components Menu configProvider componentSize middle 1`]
role="menuitem"
style="padding-left:24px"
tabindex="-1"
title="bamboo"
>
bamboo
<span
class="config-menu-title-content"
>
bamboo
</span>
<i
class="config-menu-submenu-arrow"
/>
@ -15195,7 +15212,11 @@ exports[`ConfigProvider components Menu configProvider componentSize middle 1`]
style="padding-left:48px"
tabindex="-1"
>
Light
<span
class="config-menu-title-content"
>
Light
</span>
</li>
</ul>
</li>
@ -15222,9 +15243,12 @@ exports[`ConfigProvider components Menu configProvider virtual and dropdownMatch
role="menuitem"
style="padding-left:24px"
tabindex="-1"
title="bamboo"
>
bamboo
<span
class="ant-menu-title-content"
>
bamboo
</span>
<i
class="ant-menu-submenu-arrow"
/>
@ -15251,7 +15275,11 @@ exports[`ConfigProvider components Menu configProvider virtual and dropdownMatch
style="padding-left:48px"
tabindex="-1"
>
Light
<span
class="ant-menu-title-content"
>
Light
</span>
</li>
</ul>
</li>
@ -15278,9 +15306,12 @@ exports[`ConfigProvider components Menu normal 1`] = `
role="menuitem"
style="padding-left:24px"
tabindex="-1"
title="bamboo"
>
bamboo
<span
class="ant-menu-title-content"
>
bamboo
</span>
<i
class="ant-menu-submenu-arrow"
/>
@ -15307,7 +15338,11 @@ exports[`ConfigProvider components Menu normal 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Light
<span
class="ant-menu-title-content"
>
Light
</span>
</li>
</ul>
</li>
@ -15334,9 +15369,12 @@ exports[`ConfigProvider components Menu prefixCls 1`] = `
role="menuitem"
style="padding-left:24px"
tabindex="-1"
title="bamboo"
>
bamboo
<span
class="prefix-Menu-title-content"
>
bamboo
</span>
<i
class="prefix-Menu-submenu-arrow"
/>
@ -15365,7 +15403,11 @@ exports[`ConfigProvider components Menu prefixCls 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Light
<span
class="prefix-Menu-title-content"
>
Light
</span>
</li>
</ul>
</li>
@ -22866,23 +22908,27 @@ exports[`ConfigProvider components Table configProvider 1`] = `
role="menuitem"
tabindex="-1"
>
<label
class="config-checkbox-wrapper"
<span
class="config-dropdown-menu-title-content"
>
<span
class="config-checkbox"
<label
class="config-checkbox-wrapper"
>
<input
class="config-checkbox-input"
type="checkbox"
/>
<span
class="config-checkbox-inner"
/>
class="config-checkbox"
>
<input
class="config-checkbox-input"
type="checkbox"
/>
<span
class="config-checkbox-inner"
/>
</span>
</label>
<span>
Joe
</span>
</label>
<span>
Joe
</span>
</li>
<li
@ -22895,9 +22941,12 @@ exports[`ConfigProvider components Table configProvider 1`] = `
class="config-dropdown-menu-submenu-title"
role="menuitem"
tabindex="-1"
title="Submenu"
>
Submenu
<span
class="config-dropdown-menu-title-content"
>
Submenu
</span>
<i
class="config-dropdown-menu-submenu-arrow"
/>
@ -23129,23 +23178,27 @@ exports[`ConfigProvider components Table configProvider componentSize large 1`]
role="menuitem"
tabindex="-1"
>
<label
class="config-checkbox-wrapper"
<span
class="config-dropdown-menu-title-content"
>
<span
class="config-checkbox"
<label
class="config-checkbox-wrapper"
>
<input
class="config-checkbox-input"
type="checkbox"
/>
<span
class="config-checkbox-inner"
/>
class="config-checkbox"
>
<input
class="config-checkbox-input"
type="checkbox"
/>
<span
class="config-checkbox-inner"
/>
</span>
</label>
<span>
Joe
</span>
</label>
<span>
Joe
</span>
</li>
<li
@ -23158,9 +23211,12 @@ exports[`ConfigProvider components Table configProvider componentSize large 1`]
class="config-dropdown-menu-submenu-title"
role="menuitem"
tabindex="-1"
title="Submenu"
>
Submenu
<span
class="config-dropdown-menu-title-content"
>
Submenu
</span>
<i
class="config-dropdown-menu-submenu-arrow"
/>
@ -23392,23 +23448,27 @@ exports[`ConfigProvider components Table configProvider componentSize middle 1`]
role="menuitem"
tabindex="-1"
>
<label
class="config-checkbox-wrapper"
<span
class="config-dropdown-menu-title-content"
>
<span
class="config-checkbox"
<label
class="config-checkbox-wrapper"
>
<input
class="config-checkbox-input"
type="checkbox"
/>
<span
class="config-checkbox-inner"
/>
class="config-checkbox"
>
<input
class="config-checkbox-input"
type="checkbox"
/>
<span
class="config-checkbox-inner"
/>
</span>
</label>
<span>
Joe
</span>
</label>
<span>
Joe
</span>
</li>
<li
@ -23421,9 +23481,12 @@ exports[`ConfigProvider components Table configProvider componentSize middle 1`]
class="config-dropdown-menu-submenu-title"
role="menuitem"
tabindex="-1"
title="Submenu"
>
Submenu
<span
class="config-dropdown-menu-title-content"
>
Submenu
</span>
<i
class="config-dropdown-menu-submenu-arrow"
/>
@ -23655,23 +23718,27 @@ exports[`ConfigProvider components Table configProvider virtual and dropdownMatc
role="menuitem"
tabindex="-1"
>
<label
class="ant-checkbox-wrapper"
<span
class="ant-dropdown-menu-title-content"
>
<span
class="ant-checkbox"
<label
class="ant-checkbox-wrapper"
>
<input
class="ant-checkbox-input"
type="checkbox"
/>
<span
class="ant-checkbox-inner"
/>
class="ant-checkbox"
>
<input
class="ant-checkbox-input"
type="checkbox"
/>
<span
class="ant-checkbox-inner"
/>
</span>
</label>
<span>
Joe
</span>
</label>
<span>
Joe
</span>
</li>
<li
@ -23684,9 +23751,12 @@ exports[`ConfigProvider components Table configProvider virtual and dropdownMatc
class="ant-dropdown-menu-submenu-title"
role="menuitem"
tabindex="-1"
title="Submenu"
>
Submenu
<span
class="ant-dropdown-menu-title-content"
>
Submenu
</span>
<i
class="ant-dropdown-menu-submenu-arrow"
/>
@ -23918,23 +23988,27 @@ exports[`ConfigProvider components Table normal 1`] = `
role="menuitem"
tabindex="-1"
>
<label
class="ant-checkbox-wrapper"
<span
class="ant-dropdown-menu-title-content"
>
<span
class="ant-checkbox"
<label
class="ant-checkbox-wrapper"
>
<input
class="ant-checkbox-input"
type="checkbox"
/>
<span
class="ant-checkbox-inner"
/>
class="ant-checkbox"
>
<input
class="ant-checkbox-input"
type="checkbox"
/>
<span
class="ant-checkbox-inner"
/>
</span>
</label>
<span>
Joe
</span>
</label>
<span>
Joe
</span>
</li>
<li
@ -23947,9 +24021,12 @@ exports[`ConfigProvider components Table normal 1`] = `
class="ant-dropdown-menu-submenu-title"
role="menuitem"
tabindex="-1"
title="Submenu"
>
Submenu
<span
class="ant-dropdown-menu-title-content"
>
Submenu
</span>
<i
class="ant-dropdown-menu-submenu-arrow"
/>
@ -24181,23 +24258,27 @@ exports[`ConfigProvider components Table prefixCls 1`] = `
role="menuitem"
tabindex="-1"
>
<label
class="ant-checkbox-wrapper"
<span
class="ant-dropdown-menu-title-content"
>
<span
class="ant-checkbox"
<label
class="ant-checkbox-wrapper"
>
<input
class="ant-checkbox-input"
type="checkbox"
/>
<span
class="ant-checkbox-inner"
/>
class="ant-checkbox"
>
<input
class="ant-checkbox-input"
type="checkbox"
/>
<span
class="ant-checkbox-inner"
/>
</span>
</label>
<span>
Joe
</span>
</label>
<span>
Joe
</span>
</li>
<li
@ -24210,9 +24291,12 @@ exports[`ConfigProvider components Table prefixCls 1`] = `
class="ant-dropdown-menu-submenu-title"
role="menuitem"
tabindex="-1"
title="Submenu"
>
Submenu
<span
class="ant-dropdown-menu-title-content"
>
Submenu
</span>
<i
class="ant-dropdown-menu-submenu-arrow"
/>

View File

@ -300,7 +300,11 @@ exports[`renders ./components/layout/demo/fixed.md correctly 1`] = `
style="opacity:1;order:0"
tabindex="-1"
>
nav 1
<span
class="ant-menu-title-content"
>
nav 1
</span>
</li>
<li
class="ant-menu-overflow-item ant-menu-item ant-menu-item-selected ant-menu-item-only-child"
@ -308,7 +312,11 @@ exports[`renders ./components/layout/demo/fixed.md correctly 1`] = `
style="opacity:1;order:1"
tabindex="-1"
>
nav 2
<span
class="ant-menu-title-content"
>
nav 2
</span>
</li>
<li
class="ant-menu-overflow-item ant-menu-item ant-menu-item-only-child"
@ -316,13 +324,17 @@ exports[`renders ./components/layout/demo/fixed.md correctly 1`] = `
style="opacity:1;order:2"
tabindex="-1"
>
nav 3
<span
class="ant-menu-title-content"
>
nav 3
</span>
</li>
<li
aria-hidden="true"
class="ant-menu-overflow-item ant-menu-overflow-item-rest ant-menu-submenu ant-menu-submenu-horizontal"
role="none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none;position:absolute"
>
<div
aria-expanded="false"
@ -330,9 +342,26 @@ exports[`renders ./components/layout/demo/fixed.md correctly 1`] = `
class="ant-menu-submenu-title"
role="menuitem"
tabindex="-1"
title="..."
>
...
<span
aria-label="ellipsis"
class="anticon anticon-ellipsis"
role="img"
>
<svg
aria-hidden="true"
data-icon="ellipsis"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"
/>
</svg>
</span>
<i
class="ant-menu-submenu-arrow"
/>
@ -1272,7 +1301,11 @@ exports[`renders ./components/layout/demo/top.md correctly 1`] = `
style="opacity:1;order:0"
tabindex="-1"
>
nav 1
<span
class="ant-menu-title-content"
>
nav 1
</span>
</li>
<li
class="ant-menu-overflow-item ant-menu-item ant-menu-item-selected ant-menu-item-only-child"
@ -1280,7 +1313,11 @@ exports[`renders ./components/layout/demo/top.md correctly 1`] = `
style="opacity:1;order:1"
tabindex="-1"
>
nav 2
<span
class="ant-menu-title-content"
>
nav 2
</span>
</li>
<li
class="ant-menu-overflow-item ant-menu-item ant-menu-item-only-child"
@ -1288,13 +1325,17 @@ exports[`renders ./components/layout/demo/top.md correctly 1`] = `
style="opacity:1;order:2"
tabindex="-1"
>
nav 3
<span
class="ant-menu-title-content"
>
nav 3
</span>
</li>
<li
aria-hidden="true"
class="ant-menu-overflow-item ant-menu-overflow-item-rest ant-menu-submenu ant-menu-submenu-horizontal"
role="none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none;position:absolute"
>
<div
aria-expanded="false"
@ -1302,9 +1343,26 @@ exports[`renders ./components/layout/demo/top.md correctly 1`] = `
class="ant-menu-submenu-title"
role="menuitem"
tabindex="-1"
title="..."
>
...
<span
aria-label="ellipsis"
class="anticon anticon-ellipsis"
role="img"
>
<svg
aria-hidden="true"
data-icon="ellipsis"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"
/>
</svg>
</span>
<i
class="ant-menu-submenu-arrow"
/>
@ -1394,7 +1452,11 @@ exports[`renders ./components/layout/demo/top-side.md correctly 1`] = `
style="opacity:1;order:0"
tabindex="-1"
>
nav 1
<span
class="ant-menu-title-content"
>
nav 1
</span>
</li>
<li
class="ant-menu-overflow-item ant-menu-item ant-menu-item-selected ant-menu-item-only-child"
@ -1402,7 +1464,11 @@ exports[`renders ./components/layout/demo/top-side.md correctly 1`] = `
style="opacity:1;order:1"
tabindex="-1"
>
nav 2
<span
class="ant-menu-title-content"
>
nav 2
</span>
</li>
<li
class="ant-menu-overflow-item ant-menu-item ant-menu-item-only-child"
@ -1410,13 +1476,17 @@ exports[`renders ./components/layout/demo/top-side.md correctly 1`] = `
style="opacity:1;order:2"
tabindex="-1"
>
nav 3
<span
class="ant-menu-title-content"
>
nav 3
</span>
</li>
<li
aria-hidden="true"
class="ant-menu-overflow-item ant-menu-overflow-item-rest ant-menu-submenu ant-menu-submenu-horizontal"
role="none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none;position:absolute"
>
<div
aria-expanded="false"
@ -1424,9 +1494,26 @@ exports[`renders ./components/layout/demo/top-side.md correctly 1`] = `
class="ant-menu-submenu-title"
role="menuitem"
tabindex="-1"
title="..."
>
...
<span
aria-label="ellipsis"
class="anticon anticon-ellipsis"
role="img"
>
<svg
aria-hidden="true"
data-icon="ellipsis"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"
/>
</svg>
</span>
<i
class="ant-menu-submenu-arrow"
/>
@ -1547,7 +1634,11 @@ exports[`renders ./components/layout/demo/top-side.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
option1
<span
class="ant-menu-title-content"
>
option1
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -1555,7 +1646,11 @@ exports[`renders ./components/layout/demo/top-side.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
option2
<span
class="ant-menu-title-content"
>
option2
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -1563,7 +1658,11 @@ exports[`renders ./components/layout/demo/top-side.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
option3
<span
class="ant-menu-title-content"
>
option3
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -1571,7 +1670,11 @@ exports[`renders ./components/layout/demo/top-side.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
option4
<span
class="ant-menu-title-content"
>
option4
</span>
</li>
</ul>
</li>
@ -1699,7 +1802,11 @@ exports[`renders ./components/layout/demo/top-side-2.md correctly 1`] = `
style="opacity:1;order:0"
tabindex="-1"
>
nav 1
<span
class="ant-menu-title-content"
>
nav 1
</span>
</li>
<li
class="ant-menu-overflow-item ant-menu-item ant-menu-item-selected ant-menu-item-only-child"
@ -1707,7 +1814,11 @@ exports[`renders ./components/layout/demo/top-side-2.md correctly 1`] = `
style="opacity:1;order:1"
tabindex="-1"
>
nav 2
<span
class="ant-menu-title-content"
>
nav 2
</span>
</li>
<li
class="ant-menu-overflow-item ant-menu-item ant-menu-item-only-child"
@ -1715,13 +1826,17 @@ exports[`renders ./components/layout/demo/top-side-2.md correctly 1`] = `
style="opacity:1;order:2"
tabindex="-1"
>
nav 3
<span
class="ant-menu-title-content"
>
nav 3
</span>
</li>
<li
aria-hidden="true"
class="ant-menu-overflow-item ant-menu-overflow-item-rest ant-menu-submenu ant-menu-submenu-horizontal"
role="none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none;position:absolute"
>
<div
aria-expanded="false"
@ -1729,9 +1844,26 @@ exports[`renders ./components/layout/demo/top-side-2.md correctly 1`] = `
class="ant-menu-submenu-title"
role="menuitem"
tabindex="-1"
title="..."
>
...
<span
aria-label="ellipsis"
class="anticon anticon-ellipsis"
role="img"
>
<svg
aria-hidden="true"
data-icon="ellipsis"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"
/>
</svg>
</span>
<i
class="ant-menu-submenu-arrow"
/>
@ -1806,7 +1938,11 @@ exports[`renders ./components/layout/demo/top-side-2.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
option1
<span
class="ant-menu-title-content"
>
option1
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -1814,7 +1950,11 @@ exports[`renders ./components/layout/demo/top-side-2.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
option2
<span
class="ant-menu-title-content"
>
option2
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -1822,7 +1962,11 @@ exports[`renders ./components/layout/demo/top-side-2.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
option3
<span
class="ant-menu-title-content"
>
option3
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -1830,7 +1974,11 @@ exports[`renders ./components/layout/demo/top-side-2.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
option4
<span
class="ant-menu-title-content"
>
option4
</span>
</li>
</ul>
</li>

View File

@ -21,15 +21,16 @@ export default class MenuItem extends React.Component<MenuItemProps> {
renderItemChildren(inlineCollapsed: boolean) {
const { prefixCls, firstLevel } = this.context;
const { icon, children } = this.props;
const wrapNode = <span className={`${prefixCls}-title-content`}>{children}</span>;
// inline-collapsed.md demo 依赖 span 来隐藏文字,有 icon 属性,则内部包裹一个 span
// ref: https://github.com/ant-design/ant-design/pull/23456
if (!icon || (isValidElement(children) && children.type === 'span')) {
if (children && inlineCollapsed && firstLevel && typeof children === 'string') {
return <div className={`${prefixCls}-inline-collapsed-noicon`}>{children.charAt(0)}</div>;
}
return children;
}
return <span className={`${prefixCls}-title-content`}>{children}</span>;
return wrapNode;
}
renderItem = ({ siderCollapsed }: SiderContextProps) => {

View File

@ -1,6 +1,5 @@
import * as React from 'react';
import { SubMenu as RcSubMenu } from 'rc-menu';
import { useFullPath } from 'rc-menu/lib/context/PathContext';
import { SubMenu as RcSubMenu, useFullPath } from 'rc-menu';
import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import MenuContext from './MenuContext';
@ -40,7 +39,7 @@ function SubMenu(props: SubMenuProps) {
inlineCollapsed && !parentPath.length && title && typeof title === 'string' ? (
<div className={`${prefixCls}-inline-collapsed-noicon`}>{title.charAt(0)}</div>
) : (
title
<span className={`${prefixCls}-title-content`}>{title}</span>
);
} else {
// inline-collapsed.md demo 依赖 span 来隐藏文字,有 icon 属性,则内部包裹一个 span

View File

@ -116,19 +116,23 @@ exports[`renders ./components/menu/demo/horizontal.md correctly 1`] = `
style="opacity:1;order:3"
tabindex="-1"
>
<a
href="https://ant.design"
rel="noopener noreferrer"
target="_blank"
<span
class="ant-menu-title-content"
>
Navigation Four - Link
</a>
<a
href="https://ant.design"
rel="noopener noreferrer"
target="_blank"
>
Navigation Four - Link
</a>
</span>
</li>
<li
aria-hidden="true"
class="ant-menu-overflow-item ant-menu-overflow-item-rest ant-menu-submenu ant-menu-submenu-horizontal"
role="none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none;position:absolute"
>
<div
aria-expanded="false"
@ -136,9 +140,26 @@ exports[`renders ./components/menu/demo/horizontal.md correctly 1`] = `
class="ant-menu-submenu-title"
role="menuitem"
tabindex="-1"
title="..."
>
...
<span
aria-label="ellipsis"
class="anticon anticon-ellipsis"
role="img"
>
<svg
aria-hidden="true"
data-icon="ellipsis"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"
/>
</svg>
</span>
<i
class="ant-menu-submenu-arrow"
/>
@ -217,7 +238,11 @@ exports[`renders ./components/menu/demo/inline.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Option 1
<span
class="ant-menu-title-content"
>
Option 1
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -225,7 +250,11 @@ exports[`renders ./components/menu/demo/inline.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Option 2
<span
class="ant-menu-title-content"
>
Option 2
</span>
</li>
</ul>
</li>
@ -247,7 +276,11 @@ exports[`renders ./components/menu/demo/inline.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Option 3
<span
class="ant-menu-title-content"
>
Option 3
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -255,7 +288,11 @@ exports[`renders ./components/menu/demo/inline.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Option 4
<span
class="ant-menu-title-content"
>
Option 4
</span>
</li>
</ul>
</li>
@ -524,7 +561,11 @@ exports[`renders ./components/menu/demo/inline-collapsed.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Option 5
<span
class="ant-menu-title-content"
>
Option 5
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -532,7 +573,11 @@ exports[`renders ./components/menu/demo/inline-collapsed.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Option 6
<span
class="ant-menu-title-content"
>
Option 6
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -540,7 +585,11 @@ exports[`renders ./components/menu/demo/inline-collapsed.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Option 7
<span
class="ant-menu-title-content"
>
Option 7
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -548,7 +597,11 @@ exports[`renders ./components/menu/demo/inline-collapsed.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Option 8
<span
class="ant-menu-title-content"
>
Option 8
</span>
</li>
</ul>
</li>
@ -655,7 +708,11 @@ exports[`renders ./components/menu/demo/sider-current.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Option 1
<span
class="ant-menu-title-content"
>
Option 1
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -663,7 +720,11 @@ exports[`renders ./components/menu/demo/sider-current.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Option 2
<span
class="ant-menu-title-content"
>
Option 2
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -671,7 +732,11 @@ exports[`renders ./components/menu/demo/sider-current.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Option 3
<span
class="ant-menu-title-content"
>
Option 3
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -679,7 +744,11 @@ exports[`renders ./components/menu/demo/sider-current.md correctly 1`] = `
style="padding-left:48px"
tabindex="-1"
>
Option 4
<span
class="ant-menu-title-content"
>
Option 4
</span>
</li>
</ul>
</li>
@ -881,7 +950,11 @@ Array [
style="opacity:1;order:2"
tabindex="-1"
>
Option 11
<span
class="ant-menu-title-content"
>
Option 11
</span>
</li>
<li
class="ant-menu-overflow-item ant-menu-item ant-menu-item-only-child"
@ -889,13 +962,17 @@ Array [
style="opacity:1;order:3"
tabindex="-1"
>
Option 12
<span
class="ant-menu-title-content"
>
Option 12
</span>
</li>
<li
aria-hidden="true"
class="ant-menu-overflow-item ant-menu-overflow-item-rest ant-menu-submenu ant-menu-submenu-horizontal"
role="none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none;position:absolute"
>
<div
aria-expanded="false"
@ -903,9 +980,26 @@ Array [
class="ant-menu-submenu-title"
role="menuitem"
tabindex="-1"
title="..."
>
...
<span
aria-label="ellipsis"
class="anticon anticon-ellipsis"
role="img"
>
<svg
aria-hidden="true"
data-icon="ellipsis"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"
/>
</svg>
</span>
<i
class="ant-menu-submenu-arrow"
/>
@ -1070,7 +1164,11 @@ Array [
style="padding-left:48px"
tabindex="-1"
>
Option 3
<span
class="ant-menu-title-content"
>
Option 3
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -1078,7 +1176,11 @@ Array [
style="padding-left:48px"
tabindex="-1"
>
Option 4
<span
class="ant-menu-title-content"
>
Option 4
</span>
</li>
<li
class="ant-menu-submenu ant-menu-submenu-inline"
@ -1091,9 +1193,12 @@ Array [
role="menuitem"
style="padding-left:48px"
tabindex="-1"
title="Submenu"
>
Submenu
<span
class="ant-menu-title-content"
>
Submenu
</span>
<i
class="ant-menu-submenu-arrow"
/>
@ -1259,7 +1364,11 @@ Array [
style="padding-left:48px"
tabindex="-1"
>
Option 1
<span
class="ant-menu-title-content"
>
Option 1
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -1267,7 +1376,11 @@ Array [
style="padding-left:48px"
tabindex="-1"
>
Option 2
<span
class="ant-menu-title-content"
>
Option 2
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -1275,7 +1388,11 @@ Array [
style="padding-left:48px"
tabindex="-1"
>
Option 3
<span
class="ant-menu-title-content"
>
Option 3
</span>
</li>
<li
class="ant-menu-item ant-menu-item-only-child"
@ -1283,7 +1400,11 @@ Array [
style="padding-left:48px"
tabindex="-1"
>
Option 4
<span
class="ant-menu-title-content"
>
Option 4
</span>
</li>
</ul>
</li>

View File

@ -63,8 +63,12 @@ exports[`Menu Menu.Item with icon children auto wrap span 1`] = `
/>
</svg>
</span>
<span>
Navigation One
<span
class="ant-menu-title-content"
>
<span>
Navigation One
</span>
</span>
</li>
<li
@ -164,7 +168,11 @@ exports[`Menu rtl render component should be rendered correctly in RTL direction
class="ant-menu-item"
role="menuitem"
tabindex="-1"
/>
>
<span
class="ant-menu-title-content"
/>
</li>
<li
class="ant-menu-item-group"
>
@ -186,6 +194,9 @@ exports[`Menu rtl render component should be rendered correctly in RTL direction
role="menuitem"
tabindex="-1"
>
<span
class="ant-menu-title-content"
/>
<i
class="ant-menu-submenu-arrow"
/>

View File

@ -2,6 +2,7 @@ import * as React from 'react';
import RcMenu, { Divider, ItemGroup, MenuProps as RcMenuProps } from 'rc-menu';
import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import { EllipsisOutlined } from '@ant-design/icons';
import SubMenu, { SubMenuProps } from './SubMenu';
import Item, { MenuItemProps } from './MenuItem';
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
@ -89,6 +90,7 @@ class InternalMenu extends React.Component<InternalMenuProps> {
>
<RcMenu
getPopupContainer={getPopupContainer}
overflowedIndicator={<EllipsisOutlined />}
{...passedProps}
inlineCollapsed={inlineCollapsed}
className={menuClassName}

View File

@ -87,8 +87,7 @@
> span > a {
color: @menu-dark-highlight-color;
}
> .@{menu-prefix-cls}-submenu-title,
> .@{menu-prefix-cls}-submenu-title:hover {
> .@{menu-prefix-cls}-submenu-title {
> .@{menu-prefix-cls}-submenu-arrow {
opacity: 1;
&::after,

View File

@ -211,8 +211,6 @@
+ span {
margin-left: @menu-icon-margin-right;
opacity: 1;
// transition: opacity @animation-duration-slow @ease-in-out,
// width @animation-duration-slow @ease-in-out, color @animation-duration-slow;
transition: opacity @animation-duration-slow @ease-in-out, margin @animation-duration-slow,
color @animation-duration-slow;
}
@ -365,19 +363,19 @@
&:not(.@{menu-prefix-cls}-dark) {
> .@{menu-prefix-cls}-item,
> .@{menu-prefix-cls}-submenu {
margin: @menu-item-padding;
margin-top: -1px;
margin-bottom: 0;
padding: @menu-item-padding;
padding-right: 0;
padding-left: 0;
&:hover,
&-active,
&-open,
&-selected {
color: @menu-highlight-color;
border-bottom: 2px solid @menu-highlight-color;
&::after {
border-bottom: 2px solid @menu-highlight-color;
}
}
}
}
@ -388,7 +386,16 @@
top: 1px;
display: inline-block;
vertical-align: bottom;
border-bottom: 2px solid transparent;
&::after {
position: absolute;
right: @menu-item-padding-horizontal;
bottom: 0;
left: @menu-item-padding-horizontal;
border-bottom: 2px solid transparent;
transition: border-color @animation-duration-slow @ease-in-out;
content: '';
}
}
> .@{menu-prefix-cls}-submenu > .@{menu-prefix-cls}-submenu-title {
@ -625,8 +632,12 @@
&-submenu-disabled {
color: @disabled-color !important;
background: none;
border-color: transparent !important;
cursor: not-allowed;
&::after {
border-color: transparent !important;
}
a {
color: @disabled-color !important;
pointer-events: none;

View File

@ -1583,7 +1583,7 @@ exports[`renders ./components/select/demo/responsive.md correctly 1`] = `
<div
aria-hidden="true"
class="ant-select-selection-overflow-item ant-select-selection-overflow-item-rest"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none;position:absolute"
>
<span
class="ant-select-selection-item"
@ -1646,7 +1646,7 @@ exports[`renders ./components/select/demo/responsive.md correctly 1`] = `
<div
aria-hidden="true"
class="ant-select-selection-overflow-item ant-select-selection-overflow-item-rest"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none"
style="opacity:0;height:0;overflow-y:hidden;order:9007199254740991;pointer-events:none;position:absolute"
>
<span
class="ant-select-selection-item"

View File

@ -557,7 +557,8 @@
@menu-item-vertical-margin: 4px;
@menu-item-font-size: @font-size-base;
@menu-item-boundary-margin: 8px;
@menu-item-padding: 0 20px;
@menu-item-padding-horizontal: 20px;
@menu-item-padding: 0 @menu-item-padding-horizontal;
@menu-horizontal-line-height: 46px;
@menu-icon-margin-right: 10px;
@menu-icon-size: @menu-item-font-size;

View File

@ -573,24 +573,28 @@ exports[`Table.filter should support getPopupContainer 1`] = `
role="menuitem"
tabindex="-1"
>
<label
class="ant-checkbox-wrapper"
<span
class="ant-dropdown-menu-title-content"
>
<span
class="ant-checkbox"
<label
class="ant-checkbox-wrapper"
>
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
/>
class="ant-checkbox"
>
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
/>
</span>
</label>
<span>
Boy
</span>
</label>
<span>
Boy
</span>
</li>
<li
@ -599,24 +603,28 @@ exports[`Table.filter should support getPopupContainer 1`] = `
role="menuitem"
tabindex="-1"
>
<label
class="ant-checkbox-wrapper"
<span
class="ant-dropdown-menu-title-content"
>
<span
class="ant-checkbox"
<label
class="ant-checkbox-wrapper"
>
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
/>
class="ant-checkbox"
>
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
/>
</span>
</label>
<span>
Girl
</span>
</label>
<span>
Girl
</span>
</li>
<li
@ -631,9 +639,12 @@ exports[`Table.filter should support getPopupContainer 1`] = `
data-menu-id="rc-menu-uuid-test-title"
role="menuitem"
tabindex="-1"
title="Title"
>
Title
<span
class="ant-dropdown-menu-title-content"
>
Title
</span>
<i
class="ant-dropdown-menu-submenu-arrow"
/>
@ -806,24 +817,28 @@ exports[`Table.filter should support getPopupContainer from ConfigProvider 1`] =
role="menuitem"
tabindex="-1"
>
<label
class="ant-checkbox-wrapper"
<span
class="ant-dropdown-menu-title-content"
>
<span
class="ant-checkbox"
<label
class="ant-checkbox-wrapper"
>
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
/>
class="ant-checkbox"
>
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
/>
</span>
</label>
<span>
Boy
</span>
</label>
<span>
Boy
</span>
</li>
<li
@ -832,24 +847,28 @@ exports[`Table.filter should support getPopupContainer from ConfigProvider 1`] =
role="menuitem"
tabindex="-1"
>
<label
class="ant-checkbox-wrapper"
<span
class="ant-dropdown-menu-title-content"
>
<span
class="ant-checkbox"
<label
class="ant-checkbox-wrapper"
>
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
/>
class="ant-checkbox"
>
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
/>
</span>
</label>
<span>
Girl
</span>
</label>
<span>
Girl
</span>
</li>
<li
@ -864,9 +883,12 @@ exports[`Table.filter should support getPopupContainer from ConfigProvider 1`] =
data-menu-id="rc-menu-uuid-test-title"
role="menuitem"
tabindex="-1"
title="Title"
>
Title
<span
class="ant-dropdown-menu-title-content"
>
Title
</span>
<i
class="ant-dropdown-menu-submenu-arrow"
/>

View File

@ -1062,7 +1062,11 @@ exports[`Table.rowSelection should support getPopupContainer 1`] = `
role="menuitem"
tabindex="-1"
>
Select all data
<span
class="ant-dropdown-menu-title-content"
>
Select all data
</span>
</li>
<li
class="ant-dropdown-menu-item ant-dropdown-menu-item-only-child"
@ -1070,7 +1074,11 @@ exports[`Table.rowSelection should support getPopupContainer 1`] = `
role="menuitem"
tabindex="-1"
>
Invert current page
<span
class="ant-dropdown-menu-title-content"
>
Invert current page
</span>
</li>
<li
class="ant-dropdown-menu-item ant-dropdown-menu-item-only-child"
@ -1078,7 +1086,11 @@ exports[`Table.rowSelection should support getPopupContainer 1`] = `
role="menuitem"
tabindex="-1"
>
Clear all data
<span
class="ant-dropdown-menu-title-content"
>
Clear all data
</span>
</li>
</ul>
</div>
@ -1402,7 +1414,11 @@ exports[`Table.rowSelection should support getPopupContainer from ConfigProvider
role="menuitem"
tabindex="-1"
>
Select all data
<span
class="ant-dropdown-menu-title-content"
>
Select all data
</span>
</li>
<li
class="ant-dropdown-menu-item ant-dropdown-menu-item-only-child"
@ -1410,7 +1426,11 @@ exports[`Table.rowSelection should support getPopupContainer from ConfigProvider
role="menuitem"
tabindex="-1"
>
Invert current page
<span
class="ant-dropdown-menu-title-content"
>
Invert current page
</span>
</li>
<li
class="ant-dropdown-menu-item ant-dropdown-menu-item-only-child"
@ -1418,7 +1438,11 @@ exports[`Table.rowSelection should support getPopupContainer from ConfigProvider
role="menuitem"
tabindex="-1"
>
Clear all data
<span
class="ant-dropdown-menu-title-content"
>
Clear all data
</span>
</li>
</ul>
</div>

View File

@ -17091,23 +17091,19 @@ Array [
class="ant-spin-container"
>
<div
class="ant-table ant-table-bordered ant-table-fixed-column ant-table-scroll-horizontal ant-table-has-fix-left"
class="ant-table ant-table-bordered ant-table-fixed-header ant-table-fixed-column ant-table-scroll-horizontal ant-table-has-fix-left"
>
<div
class="ant-table-container"
>
<div
class="ant-table-content"
style="overflow-x:auto;overflow-y:hidden"
class="ant-table-header"
style="overflow:hidden"
>
<table
style="width:2000px;min-width:100%;table-layout:fixed"
style="table-layout:fixed;visibility:hidden"
>
<colgroup>
<col
style="width:100px;min-width:100px"
/>
</colgroup>
<colgroup />
<thead
class="ant-table-thead"
>
@ -17125,6 +17121,20 @@ Array [
</th>
</tr>
</thead>
</table>
</div>
<div
class="ant-table-body"
style="overflow-x:auto;overflow-y:scroll;max-height:500px"
>
<table
style="width:2000px;min-width:100%;table-layout:fixed"
>
<colgroup>
<col
style="width:100px;min-width:100px"
/>
</colgroup>
<tbody
class="ant-table-tbody"
>
@ -17160,7 +17170,7 @@ Array [
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Bamboo
Light
</td>
<td
class="ant-table-cell"
@ -17176,7 +17186,7 @@ Array [
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Light
Bamboo
</td>
<td
class="ant-table-cell"
@ -17192,7 +17202,7 @@ Array [
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Bamboo
Little
</td>
<td
class="ant-table-cell"
@ -17235,6 +17245,22 @@ Array [
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="5"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Little
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="6"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
@ -17248,7 +17274,225 @@ Array [
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="7"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Bamboo
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="8"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Little
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="9"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Light
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="10"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Bamboo
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="11"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Little
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="12"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Light
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="13"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Bamboo
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="14"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Little
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="15"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Light
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="16"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Bamboo
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="17"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Little
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="18"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Light
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="19"
>
<td
class="ant-table-cell ant-table-cell-fix-left ant-table-cell-fix-left-last"
style="position:sticky;left:0"
>
Bamboo
</td>
<td
class="ant-table-cell"
>
Everything that has a beginning, has an end.
</td>
</tr>
</tbody>
</table>
</div>
<div
class="ant-table-summary"
style="overflow:hidden"
>
<table
style="table-layout:fixed;visibility:hidden"
>
<colgroup />
<tfoot
class="ant-table-summary"
>

View File

@ -7,11 +7,11 @@ title:
## zh-CN
通过 `summary` 设置总结栏。使用 `Table.Summary.Cell` 同步 Column 的固定状态。
通过 `summary` 设置总结栏。使用 `Table.Summary.Cell` 同步 Column 的固定状态。你可以通过配置 `Table.Summary``fixed` 属性使其固定(`4.16.0` 支持)。
## en-US
Set summary content by `summary` prop. Sync column fixed status with `Table.Summary.Cell`.
Set summary content by `summary` prop. Sync column fixed status with `Table.Summary.Cell`. You can fixed it by set `Table.Summary` `fixed` prop(since `4.16.0`).
```jsx
import { Table, Typography } from 'antd';
@ -74,10 +74,10 @@ const fixedColumns = [
];
const fixedData = [];
for (let i = 0; i < 6; i += 1) {
for (let i = 0; i < 20; i += 1) {
fixedData.push({
key: i,
name: i % 2 ? 'Light' : 'Bamboo',
name: ['Light', 'Bamboo', 'Little'][i % 3],
description: 'Everything that has a beginning, has an end.',
});
}
@ -126,13 +126,15 @@ ReactDOM.render(
columns={fixedColumns}
dataSource={fixedData}
pagination={false}
scroll={{ x: 2000 }}
scroll={{ x: 2000, y: 500 }}
bordered
summary={() => (
<Table.Summary.Row>
<Table.Summary.Cell index={0}>Summary</Table.Summary.Cell>
<Table.Summary.Cell index={1}>This is a summary content</Table.Summary.Cell>
</Table.Summary.Row>
<Table.Summary fixed>
<Table.Summary.Row>
<Table.Summary.Cell index={0}>Summary</Table.Summary.Cell>
<Table.Summary.Cell index={1}>This is a summary content</Table.Summary.Cell>
</Table.Summary.Row>
</Table.Summary>
)}
/>
</>,

View File

@ -18,7 +18,8 @@
> .@{table-prefix-cls}-content,
> .@{table-prefix-cls}-header,
> .@{table-prefix-cls}-body {
> .@{table-prefix-cls}-body,
> .@{table-prefix-cls}-summary {
> table {
// ============================= Cell =============================
> thead > tr > th,

View File

@ -24,7 +24,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/cH1BOLfxC/Tag.svg
| color | 标签色 | string | - | |
| icon | 设置图标 | ReactNode | - | |
| visible | 是否显示标签 | boolean | true | |
| onClose | 关闭时的回调(可通过 `e.preventdefault()` 来阻止默认行为) | (e) => void | - | |
| onClose | 关闭时的回调(可通过 `e.preventDefault()` 来阻止默认行为) | (e) => void | - | |
### Tag.CheckableTag

View File

@ -517,7 +517,7 @@ class Base extends React.Component<InternalBlockProps, BaseState> {
this.expandStr = expand;
return (
<ResizeObserver onResize={this.resizeOnNextFrame} disabled={!rows}>
<ResizeObserver onResize={this.resizeOnNextFrame} disabled={cssEllipsis}>
<Typography
className={classNames(
{

View File

@ -126,7 +126,7 @@
"rc-image": "~5.2.4",
"rc-input-number": "~7.1.0",
"rc-mentions": "~1.6.1",
"rc-menu": "~9.0.0",
"rc-menu": "~9.0.1",
"rc-motion": "^2.4.0",
"rc-notification": "~4.5.2",
"rc-pagination": "~3.1.6",

View File

@ -13,16 +13,18 @@
& > .ant-menu-item,
& > .ant-menu-submenu {
min-width: 40px;
min-width: (40px + 12px * 2);
height: @header-height;
margin-right: 12px;
margin-left: 12px;
line-height: @header-height - @menu-item-border - 2px;
border-top: @menu-item-border solid transparent;
padding-right: 12px;
padding-left: 12px;
line-height: @header-height;
&:hover {
border-top: @menu-item-border solid @primary-color;
border-bottom: @menu-item-border solid transparent;
&::after {
top: 0;
right: 12px;
bottom: auto;
left: 12px;
border-width: @menu-item-border;
}
}
@ -30,14 +32,7 @@
margin: 0;
}
& > .ant-menu-submenu-open {
border-top: @menu-item-border solid @primary-color;
border-bottom: @menu-item-border solid transparent;
}
& > .ant-menu-item-selected {
border-top: @menu-item-border solid @primary-color;
border-bottom: @menu-item-border solid transparent;
a {
color: @primary-color;
}

View File

@ -81,6 +81,7 @@ export default ({
mode={menuMode}
selectedKeys={[activeMenuItem]}
id="nav"
disabledOverflow
>
<Menu.Item key="docs/spec">
<Link to={utils.getLocalizedPathname('/docs/spec/introduce', isZhCN, location.query)}>