mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
chore: merge master
This commit is contained in:
commit
b7013a138b
@ -17,7 +17,7 @@ module.exports = {
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: '16.9',
|
||||
version: 'detect',
|
||||
},
|
||||
polyfills: ['Promise', 'URL'],
|
||||
},
|
||||
|
@ -129,6 +129,7 @@
|
||||
// pointer-events: none;
|
||||
|
||||
// &-content {
|
||||
// --antd-arrow-background-color: @popover-bg;
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// right: 0;
|
||||
@ -141,7 +142,7 @@
|
||||
// background-color: @popover-bg;
|
||||
// content: '';
|
||||
// pointer-events: auto;
|
||||
// .roundedArrow(@popover-arrow-width, 5px, @popover-bg);
|
||||
// .roundedArrow(@popover-arrow-width, 5px);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
@ -27,7 +27,7 @@ Display statistic number.
|
||||
| suffix | The suffix node of value | ReactNode | - | |
|
||||
| title | Display title | ReactNode | - | |
|
||||
| value | Display value | string \| number | - | |
|
||||
| valueStyle | Set value css style | CSSProperties | - | |
|
||||
| valueStyle | Set value section style | CSSProperties | - | |
|
||||
|
||||
#### Statistic.Countdown
|
||||
|
||||
@ -38,6 +38,6 @@ Display statistic number.
|
||||
| suffix | The suffix node of value | ReactNode | - | |
|
||||
| title | Display title | ReactNode | - | |
|
||||
| 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 | - | |
|
||||
| onChange | Trigger when time's changing | (value: number) => void | - | 4.16.0 |
|
||||
|
@ -17,18 +17,18 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/rcBNhLBrKbE/Statistic.svg
|
||||
|
||||
#### Statistic
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| ---------------- | ---------------- | -------------------- | ------ | ----- |
|
||||
| decimalSeparator | 设置小数点 | string | `.` | |
|
||||
| formatter | 自定义数值展示 | (value) => ReactNode | - | |
|
||||
| groupSeparator | 设置千分位标识符 | string | `,` | |
|
||||
| loading | 数值是否加载中 | boolean | false | 4.8.0 |
|
||||
| precision | 数值精度 | number | - | |
|
||||
| prefix | 设置数值的前缀 | ReactNode | - | |
|
||||
| suffix | 设置数值的后缀 | ReactNode | - | |
|
||||
| title | 数值的标题 | ReactNode | - | |
|
||||
| value | 数值内容 | string \| number | - | |
|
||||
| valueStyle | 设置数值的样式 | CSSProperties | - | |
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| ---------------- | ------------------ | -------------------- | ------ | ----- |
|
||||
| decimalSeparator | 设置小数点 | string | `.` | |
|
||||
| formatter | 自定义数值展示 | (value) => ReactNode | - | |
|
||||
| groupSeparator | 设置千分位标识符 | string | `,` | |
|
||||
| loading | 数值是否加载中 | boolean | false | 4.8.0 |
|
||||
| precision | 数值精度 | number | - | |
|
||||
| prefix | 设置数值的前缀 | ReactNode | - | |
|
||||
| suffix | 设置数值的后缀 | ReactNode | - | |
|
||||
| title | 数值的标题 | ReactNode | - | |
|
||||
| value | 数值内容 | string \| number | - | |
|
||||
| valueStyle | 设置数值区域的样式 | CSSProperties | - | |
|
||||
|
||||
#### Statistic.Countdown
|
||||
|
||||
@ -39,6 +39,6 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/rcBNhLBrKbE/Statistic.svg
|
||||
| suffix | 设置数值的后缀 | ReactNode | - | |
|
||||
| title | 数值的标题 | ReactNode | - | |
|
||||
| value | 数值内容 | number \| dayjs | - | |
|
||||
| valueStyle | 设置数值的样式 | CSSProperties | - | |
|
||||
| valueStyle | 设置数值区域的样式 | CSSProperties | - | |
|
||||
| onFinish | 倒计时完成时触发 | () => void | - | |
|
||||
| onChange | 倒计时时间变化时触发 | (value: number) => void | - | 4.16.0 |
|
||||
|
@ -326,7 +326,6 @@ describe('Table.rowSelection', () => {
|
||||
});
|
||||
expect(onChange).toHaveBeenLastCalledWith([3, 0, 1, 2]);
|
||||
fireEvent.click(allElement());
|
||||
console.log(baseElement.innerHTML);
|
||||
expect(onChange).toHaveBeenLastCalledWith([]);
|
||||
|
||||
// Reset last select key when select all
|
||||
|
@ -40,22 +40,12 @@ const App: React.FC = () => {
|
||||
};
|
||||
|
||||
const remove = (targetKey: string) => {
|
||||
let lastIndex = -1;
|
||||
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 targetIndex = panes.findIndex(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);
|
||||
};
|
||||
|
||||
|
@ -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.
|
||||
|
||||
## 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.**
|
||||
|
||||
|
@ -175,7 +175,7 @@
|
||||
"@types/jest": "^28.0.0",
|
||||
"@types/jest-axe": "^3.5.3",
|
||||
"@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/puppeteer": "^5.4.0",
|
||||
"@types/qs": "^6.9.7",
|
||||
@ -279,7 +279,7 @@
|
||||
"react-sticky": "^6.0.3",
|
||||
"react-window": "^1.8.5",
|
||||
"remark": "^14.0.1",
|
||||
"remark-cli": "^10.0.0",
|
||||
"remark-cli": "^11.0.0",
|
||||
"remark-lint": "^9.0.0",
|
||||
"remark-preset-lint-recommended": "^6.0.0",
|
||||
"remove-files-webpack-plugin": "1.4.4",
|
||||
|
@ -30,9 +30,10 @@ function alertBabelConfig(rules) {
|
||||
}
|
||||
|
||||
const ssrCssFileName = `ssr-${Date.now()}.css`;
|
||||
const port = process.env.DEV_PORT || 8001;
|
||||
|
||||
module.exports = {
|
||||
port: 8001,
|
||||
port,
|
||||
hash: true,
|
||||
source: {
|
||||
components: './components',
|
||||
@ -202,7 +203,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
devServerConfig: {
|
||||
public: process.env.DEV_HOST || 'localhost',
|
||||
public: `${process.env.DEV_HOST || 'localhost'}:${port}`,
|
||||
disableHostCheck: !!process.env.DEV_HOST,
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user