Browse Source

chore: auto merge branches (#36247)

chore: Next merge master
pull/36257/head
github-actions[bot] 2 years ago
committed by GitHub
parent
commit
f965fe3c76
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .eslintrc.js
  2. 3
      components/popover/style/index.less
  3. 4
      components/statistic/index.en-US.md
  4. 26
      components/statistic/index.zh-CN.md
  5. 1
      components/table/__tests__/Table.rowSelection.test.js
  6. 20
      components/tabs/demo/custom-add-trigger.md
  7. 2
      docs/react/faq.en-US.md
  8. 4
      package.json
  9. 5
      site/bisheng.config.js

2
.eslintrc.js

@ -17,7 +17,7 @@ module.exports = {
}, },
settings: { settings: {
react: { react: {
version: '16.9', version: 'detect',
}, },
polyfills: ['Promise', 'URL'], polyfills: ['Promise', 'URL'],
}, },

3
components/popover/style/index.less

@ -129,6 +129,7 @@
// pointer-events: none; // pointer-events: none;
// &-content { // &-content {
// --antd-arrow-background-color: @popover-bg;
// position: absolute; // position: absolute;
// top: 0; // top: 0;
// right: 0; // right: 0;
@ -141,7 +142,7 @@
// background-color: @popover-bg; // background-color: @popover-bg;
// content: ''; // content: '';
// pointer-events: auto; // pointer-events: auto;
// .roundedArrow(@popover-arrow-width, 5px, @popover-bg); // .roundedArrow(@popover-arrow-width, 5px);
// } // }
// } // }

4
components/statistic/index.en-US.md

@ -27,7 +27,7 @@ Display statistic number.
| suffix | The suffix node of value | ReactNode | - | | | suffix | The suffix node of value | ReactNode | - | |
| title | Display title | ReactNode | - | | | title | Display title | ReactNode | - | |
| value | Display value | string \| number | - | | | value | Display value | string \| number | - | |
| valueStyle | Set value css style | CSSProperties | - | | | valueStyle | Set value section style | CSSProperties | - | |
#### Statistic.Countdown #### Statistic.Countdown
@ -38,6 +38,6 @@ Display statistic number.
| suffix | The suffix node of value | ReactNode | - | | | suffix | The suffix node of value | ReactNode | - | |
| title | Display title | ReactNode | - | | | title | Display title | ReactNode | - | |
| value | Set target countdown time | number \| dayjs | - | | | value | Set target countdown time | number \| dayjs | - | |
| valueStyle | Set value css style | CSSProperties | - | | | valueStyle | Set value section style | CSSProperties | - | |
| onFinish | Trigger when time's up | () => void | - | | | onFinish | Trigger when time's up | () => void | - | |
| onChange | Trigger when time's changing | (value: number) => void | - | 4.16.0 | | onChange | Trigger when time's changing | (value: number) => void | - | 4.16.0 |

26
components/statistic/index.zh-CN.md

@ -17,18 +17,18 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/rcBNhLBrKbE/Statistic.svg
#### Statistic #### Statistic
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
| ---------------- | ---------------- | -------------------- | ------ | ----- | | ---------------- | ------------------ | -------------------- | ------ | ----- |
| decimalSeparator | 设置小数点 | string | `.` | | | decimalSeparator | 设置小数点 | string | `.` | |
| formatter | 自定义数值展示 | (value) => ReactNode | - | | | formatter | 自定义数值展示 | (value) => ReactNode | - | |
| groupSeparator | 设置千分位标识符 | string | `,` | | | groupSeparator | 设置千分位标识符 | string | `,` | |
| loading | 数值是否加载中 | boolean | false | 4.8.0 | | loading | 数值是否加载中 | boolean | false | 4.8.0 |
| precision | 数值精度 | number | - | | | precision | 数值精度 | number | - | |
| prefix | 设置数值的前缀 | ReactNode | - | | | prefix | 设置数值的前缀 | ReactNode | - | |
| suffix | 设置数值的后缀 | ReactNode | - | | | suffix | 设置数值的后缀 | ReactNode | - | |
| title | 数值的标题 | ReactNode | - | | | title | 数值的标题 | ReactNode | - | |
| value | 数值内容 | string \| number | - | | | value | 数值内容 | string \| number | - | |
| valueStyle | 设置数值的样式 | CSSProperties | - | | | valueStyle | 设置数值区域的样式 | CSSProperties | - | |
#### Statistic.Countdown #### Statistic.Countdown
@ -39,6 +39,6 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/rcBNhLBrKbE/Statistic.svg
| suffix | 设置数值的后缀 | ReactNode | - | | | suffix | 设置数值的后缀 | ReactNode | - | |
| title | 数值的标题 | ReactNode | - | | | title | 数值的标题 | ReactNode | - | |
| value | 数值内容 | number \| dayjs | - | | | value | 数值内容 | number \| dayjs | - | |
| valueStyle | 设置数值的样式 | CSSProperties | - | | | valueStyle | 设置数值区域的样式 | CSSProperties | - | |
| onFinish | 倒计时完成时触发 | () => void | - | | | onFinish | 倒计时完成时触发 | () => void | - | |
| onChange | 倒计时时间变化时触发 | (value: number) => void | - | 4.16.0 | | onChange | 倒计时时间变化时触发 | (value: number) => void | - | 4.16.0 |

1
components/table/__tests__/Table.rowSelection.test.js

@ -326,7 +326,6 @@ describe('Table.rowSelection', () => {
}); });
expect(onChange).toHaveBeenLastCalledWith([3, 0, 1, 2]); expect(onChange).toHaveBeenLastCalledWith([3, 0, 1, 2]);
fireEvent.click(allElement()); fireEvent.click(allElement());
console.log(baseElement.innerHTML);
expect(onChange).toHaveBeenLastCalledWith([]); expect(onChange).toHaveBeenLastCalledWith([]);
// Reset last select key when select all // Reset last select key when select all

20
components/tabs/demo/custom-add-trigger.md

@ -40,22 +40,12 @@ const App: React.FC = () => {
}; };
const remove = (targetKey: string) => { const remove = (targetKey: string) => {
let lastIndex = -1; const targetIndex = panes.findIndex(pane => pane.key === targetKey);
panes.forEach((pane, i) => {
if (pane.key === targetKey) {
lastIndex = i - 1;
}
});
if (panes.length && activeKey === targetKey) {
let newActiveKey: string;
if (lastIndex >= 0) {
newActiveKey = panes[lastIndex].key;
} else {
newActiveKey = panes[0].key;
}
setActiveKey(newActiveKey);
}
const newPanes = panes.filter(pane => pane.key !== targetKey); const newPanes = panes.filter(pane => pane.key !== targetKey);
if (newPanes.length && targetKey === activeKey) {
const { key } = newPanes[targetIndex === newPanes.length ? targetIndex - 1 : targetIndex];
setActiveKey(key);
}
setPanes(newPanes); setPanes(newPanes);
}; };

2
docs/react/faq.en-US.md

@ -11,7 +11,7 @@ Here are the frequently asked questions about Ant Design and antd that you shoul
There is currently no plan to add support for Sass/Stylus(etc.) style files, but using tools on Google you can easily convert the provided Less files to your desired style format. There is currently no plan to add support for Sass/Stylus(etc.) style files, but using tools on Google you can easily convert the provided Less files to your desired style format.
## Is there a difference between undefined and null in the controlled components of antd? ## Is there a difference between `undefined` and `null` in the controlled components of `antd`?
**Yes. antd will treats `undefined` as uncontrolled but `null` as controlled components which means empty value of it.** **Yes. antd will treats `undefined` as uncontrolled but `null` as controlled components which means empty value of it.**

4
package.json

@ -175,7 +175,7 @@
"@types/jest": "^28.0.0", "@types/jest": "^28.0.0",
"@types/jest-axe": "^3.5.3", "@types/jest-axe": "^3.5.3",
"@types/jest-environment-puppeteer": "^5.0.0", "@types/jest-environment-puppeteer": "^5.0.0",
"@types/jest-image-snapshot": "^4.1.0", "@types/jest-image-snapshot": "^5.1.0",
"@types/lodash": "^4.14.139", "@types/lodash": "^4.14.139",
"@types/puppeteer": "^5.4.0", "@types/puppeteer": "^5.4.0",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
@ -279,7 +279,7 @@
"react-sticky": "^6.0.3", "react-sticky": "^6.0.3",
"react-window": "^1.8.5", "react-window": "^1.8.5",
"remark": "^14.0.1", "remark": "^14.0.1",
"remark-cli": "^10.0.0", "remark-cli": "^11.0.0",
"remark-lint": "^9.0.0", "remark-lint": "^9.0.0",
"remark-preset-lint-recommended": "^6.0.0", "remark-preset-lint-recommended": "^6.0.0",
"remove-files-webpack-plugin": "1.4.4", "remove-files-webpack-plugin": "1.4.4",

5
site/bisheng.config.js

@ -30,9 +30,10 @@ function alertBabelConfig(rules) {
} }
const ssrCssFileName = `ssr-${Date.now()}.css`; const ssrCssFileName = `ssr-${Date.now()}.css`;
const port = process.env.DEV_PORT || 8001;
module.exports = { module.exports = {
port: 8001, port,
hash: true, hash: true,
source: { source: {
components: './components', components: './components',
@ -202,7 +203,7 @@ module.exports = {
}, },
devServerConfig: { devServerConfig: {
public: process.env.DEV_HOST || 'localhost', public: `${process.env.DEV_HOST || 'localhost'}:${port}`,
disableHostCheck: !!process.env.DEV_HOST, disableHostCheck: !!process.env.DEV_HOST,
}, },

Loading…
Cancel
Save