Merge branch 'master' into next-merge-master

This commit is contained in:
MadCcc 2022-10-27 21:55:12 +08:00
commit d4b7fb504f
6 changed files with 13 additions and 12 deletions

View File

@ -7,7 +7,7 @@ version: 2.1
jobs:
test-argos-ci:
docker:
- image: cimg/node:lts-browsers
- image: cimg/node:16.18.0-browsers
steps:
- checkout
- run:

View File

@ -198,10 +198,6 @@ Please use correct [language](/docs/react/i18n) ([#5605](https://github.com/ant-
- Example: <https://codesandbox.io/s/moment-day-of-week-6dby5>
- Alternate example: <https://stackblitz.com/edit/react-9aegkj>
### Why origin panel don't switch when using `panelRender`?
When you change the layout of nodes by `panelRender`, React will unmount and re-mount it which reset the component state. You should keep the layout stable. Please ref [#27263](https://github.com/ant-design/ant-design/issues/27263) for more info.
```js
dayjs.locale('en', {
week: {
@ -209,3 +205,7 @@ dayjs.locale('en', {
},
});
```
### Why origin panel don't switch when using `panelRender`?
When you change the layout of nodes by `panelRender`, React will unmount and re-mount it which reset the component state. You should keep the layout stable. Please ref [#27263](https://github.com/ant-design/ant-design/issues/27263) for more info.

View File

@ -192,10 +192,6 @@ import locale from 'antd/locale/zh_CN';
请使用正确的[语言包](/docs/react/i18n)[#5605](https://github.com/ant-design/ant-design/issues/5605)),或者修改 dayjs 的 `locale` 配置:<https://codesandbox.io/s/moment-day-of-week-6dby5>
### 为何使用 `panelRender` 时,原来面板无法切换?
当你通过 `panelRender` 动态改变层级结构时,会使得原本的 Panel 被当做新的节点删除并创建。这使得其原本的状态会被重置,保持结构稳定即可。详情请参考 [#27263](https://github.com/ant-design/ant-design/issues/27263)。
```js
dayjs.locale('en', {
// 注意请修改你正在使用的 locale 语言,比如 zh-cn
@ -204,3 +200,7 @@ dayjs.locale('en', {
},
});
```
### 为何使用 `panelRender` 时,原来面板无法切换?
当你通过 `panelRender` 动态改变层级结构时,会使得原本的 Panel 被当做新的节点删除并创建。这使得其原本的状态会被重置,保持结构稳定即可。详情请参考 [#27263](https://github.com/ant-design/ant-design/issues/27263)。

View File

@ -136,7 +136,7 @@ Select will close when it lose focus. You can prevent event to handle this:
### Why sometime customize Option cause scroll break?
Virtual scroll internal set item height as `32px`. You need to adjust `listItemHeight` when your option height is less and `listHeight` config list container height:
Virtual scroll internal set item height as `24px`. You need to adjust `listItemHeight` when your option height is less and `listHeight` config list container height:
```jsx
<Select listItemHeight={10} listHeight={250} />

View File

@ -137,7 +137,7 @@ Select 当失去焦点时会关闭下拉框,如果你可以通过阻止默认
### 自定义 Option 样式导致滚动异常怎么办?
这是由于虚拟滚动默认选项高度为 `32px`,如果你的选项高度小于该值则需要通过 `listItemHeight` 属性调整,而 `listHeight` 用于设置滚动容器高度:
这是由于虚拟滚动默认选项高度为 `24px`,如果你的选项高度小于该值则需要通过 `listItemHeight` 属性调整,而 `listHeight` 用于设置滚动容器高度:
```tsx
<Select listItemHeight={10} listHeight={250} />

View File

@ -47,7 +47,7 @@ function Tabs({
...props
}: TabsProps) {
const { prefixCls: customizePrefixCls, moreIcon = <EllipsisOutlined /> } = props;
const { getPrefixCls, direction } = React.useContext(ConfigContext);
const { getPrefixCls, direction, getPopupContainer } = React.useContext(ConfigContext);
const prefixCls = getPrefixCls('tabs', customizePrefixCls);
const [wrapSSR, hashId] = useStyle(prefixCls);
@ -81,6 +81,7 @@ function Tabs({
return (
<RcTabs
direction={direction}
getPopupContainer={getPopupContainer}
moreTransitionName={`${rootPrefixCls}-slide-up`}
{...props}
items={mergedItems}