mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
commit
6a25330832
2
.github/workflows/pr-check-ci.yml
vendored
2
.github/workflows/pr-check-ci.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
filter-creator-authority: 'write'
|
||||
filter-head-ref: 'master, feature, master-merge-feature, feature-merge-master'
|
||||
filter-support-fork: false
|
||||
skip-run-names: 'deploy preview, pr-check-ci'
|
||||
skip-run-names: 'deploy preview, pr-check-ci, build preview failed'
|
||||
success-review: true
|
||||
success-merge: true
|
||||
merge-method: 'merge'
|
||||
|
@ -32,6 +32,8 @@ timeline: true
|
||||
- TypeScript
|
||||
- 🤖 Fix Drawer type declaration of `contentWrapperStyle`. [#29571](https://github.com/ant-design/ant-design/pull/29571)
|
||||
|
||||
## 4.13.0
|
||||
|
||||
`2021-02-28`
|
||||
|
||||
- 🔥 InputNumber support `stringMode` for high precision `step`. `value` in control out of range shows warning style instead of changing it. Dynamic update `min` & `max` will not trigger `onChange` anymore. [#29373](https://github.com/ant-design/ant-design/pull/29373)
|
||||
|
@ -3237,32 +3237,30 @@ exports[`renders ./components/form/demo/register.md correctly 1`] = `
|
||||
<label
|
||||
class="ant-form-item-required"
|
||||
for="register_nickname"
|
||||
title=""
|
||||
title="Nickname"
|
||||
>
|
||||
<span>
|
||||
Nickname
|
||||
<span
|
||||
aria-label="question-circle"
|
||||
class="anticon anticon-question-circle"
|
||||
role="img"
|
||||
Nickname
|
||||
<span
|
||||
aria-label="question-circle"
|
||||
class="anticon anticon-question-circle ant-form-item-tooltip"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="question-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="question-circle"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
viewBox="64 64 896 896"
|
||||
width="1em"
|
||||
>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<path
|
||||
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
||||
/>
|
||||
<path
|
||||
d="M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
@ -54,7 +54,7 @@ This demo shows three typical usages:
|
||||
See the `Customized Form Controls` demo below for more advanced usage.
|
||||
|
||||
```jsx
|
||||
import { Form, Input, Select, Tooltip, Button } from 'antd';
|
||||
import { Form, Input, Select, Tooltip, Button, Space, Typography } from 'antd';
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
@ -66,18 +66,18 @@ const Demo = () => {
|
||||
return (
|
||||
<Form name="complex-form" onFinish={onFinish} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<Form.Item label="Username">
|
||||
<Form.Item
|
||||
name="username"
|
||||
noStyle
|
||||
rules={[{ required: true, message: 'Username is required' }]}
|
||||
>
|
||||
<Input style={{ width: 160 }} placeholder="Please input" />
|
||||
</Form.Item>
|
||||
<Tooltip title="Useful information">
|
||||
<a href="#API" style={{ margin: '0 8px' }}>
|
||||
Need Help?
|
||||
</a>
|
||||
</Tooltip>
|
||||
<Space>
|
||||
<Form.Item
|
||||
name="username"
|
||||
noStyle
|
||||
rules={[{ required: true, message: 'Username is required' }]}
|
||||
>
|
||||
<Input style={{ width: 160 }} placeholder="Please input" />
|
||||
</Form.Item>
|
||||
<Tooltip title="Useful information">
|
||||
<Typography.Link href="#API">Need Help?</Typography.Link>
|
||||
</Tooltip>
|
||||
</Space>
|
||||
</Form.Item>
|
||||
<Form.Item label="Address">
|
||||
<Input.Group compact>
|
||||
|
@ -18,7 +18,6 @@ import React, { useState } from 'react';
|
||||
import {
|
||||
Form,
|
||||
Input,
|
||||
Tooltip,
|
||||
Cascader,
|
||||
Select,
|
||||
Row,
|
||||
@ -27,7 +26,6 @@ import {
|
||||
Button,
|
||||
AutoComplete,
|
||||
} from 'antd';
|
||||
import { QuestionCircleOutlined } from '@ant-design/icons';
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
@ -188,14 +186,8 @@ const RegistrationForm = () => {
|
||||
|
||||
<Form.Item
|
||||
name="nickname"
|
||||
label={
|
||||
<span>
|
||||
Nickname
|
||||
<Tooltip title="What do you want others to call you?">
|
||||
<QuestionCircleOutlined />
|
||||
</Tooltip>
|
||||
</span>
|
||||
}
|
||||
label="Nickname"
|
||||
tooltip="What do you want others to call you?"
|
||||
rules={[{ required: true, message: 'Please input your nickname!', whitespace: true }]}
|
||||
>
|
||||
<Input />
|
||||
|
@ -130,6 +130,7 @@
|
||||
// Optional mark
|
||||
.@{form-item-prefix-cls}-tooltip {
|
||||
color: @text-color-secondary;
|
||||
cursor: help;
|
||||
writing-mode: horizontal-tb;
|
||||
margin-inline-start: @margin-xss;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
.input();
|
||||
display: inline-flex;
|
||||
|
||||
&:hover {
|
||||
&:not(&-disabled):hover {
|
||||
.hover();
|
||||
z-index: 1;
|
||||
.@{ant-prefix}-input-search-with-button & {
|
||||
|
@ -18,7 +18,7 @@ const localeValues: Locale = {
|
||||
filterConfirm: 'Potvrdit',
|
||||
filterReset: 'Obnovit',
|
||||
filterEmptyText: 'Žádné filtry',
|
||||
selectAll: 'Vybrat všehchny řádky na současné stránce',
|
||||
selectAll: 'Vybrat všechny řádky na současné stránce',
|
||||
selectInvert: 'Invertovat výběr na současné stránce',
|
||||
selectionAll: 'Vybrat všechny řádky',
|
||||
sortTitle: 'Řadit',
|
||||
|
@ -1,5 +1,4 @@
|
||||
@dialog-prefix-cls: ~'@{ant-prefix}-modal';
|
||||
@table-prefix-cls: ~'@{ant-prefix}-table';
|
||||
|
||||
.@{dialog-prefix-cls} {
|
||||
.reset-component();
|
||||
|
@ -7,11 +7,11 @@ title:
|
||||
|
||||
## zh-CN
|
||||
|
||||
试下复制 `露西,杰克` 到输入框里。只在 tags 和 multiple 模式下可用。
|
||||
试下复制 `露西,杰克` 并粘贴到输入框里。只在 tags 和 multiple 模式下可用。
|
||||
|
||||
## en-US
|
||||
|
||||
Try to copy `Lucy,Jack` to the input. Only available in tags and multiple mode.
|
||||
Try to copy `Lucy,Jack` and paste to the input. Only available in tags and multiple mode.
|
||||
|
||||
```jsx
|
||||
import { Select } from 'antd';
|
||||
|
@ -14,45 +14,39 @@ title:
|
||||
The most basic usage.
|
||||
|
||||
```jsx
|
||||
import React, { useState } from 'react';
|
||||
import { TreeSelect } from 'antd';
|
||||
|
||||
const { TreeNode } = TreeSelect;
|
||||
|
||||
class Demo extends React.Component {
|
||||
state = {
|
||||
value: undefined,
|
||||
const Demo = () => {
|
||||
const [value, setValue] = useState(undefined);
|
||||
const onChange = () => {
|
||||
setValue(value);
|
||||
};
|
||||
|
||||
onChange = value => {
|
||||
console.log(value);
|
||||
this.setState({ value });
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<TreeSelect
|
||||
showSearch
|
||||
style={{ width: '100%' }}
|
||||
value={this.state.value}
|
||||
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
||||
placeholder="Please select"
|
||||
allowClear
|
||||
treeDefaultExpandAll
|
||||
onChange={this.onChange}
|
||||
>
|
||||
<TreeNode value="parent 1" title="parent 1">
|
||||
<TreeNode value="parent 1-0" title="parent 1-0">
|
||||
<TreeNode value="leaf1" title="my leaf" />
|
||||
<TreeNode value="leaf2" title="your leaf" />
|
||||
</TreeNode>
|
||||
<TreeNode value="parent 1-1" title="parent 1-1">
|
||||
<TreeNode value="sss" title={<b style={{ color: '#08c' }}>sss</b>} />
|
||||
</TreeNode>
|
||||
return (
|
||||
<TreeSelect
|
||||
showSearch
|
||||
style={{ width: '100%' }}
|
||||
value={value}
|
||||
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
|
||||
placeholder="Please select"
|
||||
allowClear
|
||||
treeDefaultExpandAll
|
||||
onChange={onChange}
|
||||
>
|
||||
<TreeNode value="parent 1" title="parent 1">
|
||||
<TreeNode value="parent 1-0" title="parent 1-0">
|
||||
<TreeNode value="leaf1" title="leaf1" />
|
||||
<TreeNode value="leaf2" title="leaf2" />
|
||||
</TreeNode>
|
||||
</TreeSelect>
|
||||
);
|
||||
}
|
||||
}
|
||||
<TreeNode value="parent 1-1" title="parent 1-1">
|
||||
<TreeNode value="leaf3" title={<b style={{ color: '#08c' }}>leaf3</b>} />
|
||||
</TreeNode>
|
||||
</TreeNode>
|
||||
</TreeSelect>
|
||||
);
|
||||
};
|
||||
|
||||
ReactDOM.render(<Demo />, mountNode);
|
||||
```
|
||||
|
@ -104,3 +104,7 @@ Please set property `url` of each item in `fileList` to control content of link.
|
||||
### How to use `customRequest`?
|
||||
|
||||
See <https://github.com/react-component/upload#customrequest>.
|
||||
|
||||
### Why `fileList` in control will not trigger `onChange` `status` update when file not in the list?
|
||||
|
||||
`onChange` only trigger when file in the list, it will ignore left events when removed from the list. Please note that there exist bug which makes event still trigger even the file is not in the list before `4.13.0`.
|
||||
|
@ -104,3 +104,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/QaeBt_ZMg/Upload.svg
|
||||
### `customRequest` 怎么使用?
|
||||
|
||||
请参考 <https://github.com/react-component/upload#customrequest>。
|
||||
|
||||
### 为何 `fileList` 受控时,上传不在列表中的文件不会触发 `onChange` 后续的 `status` 更新事件?
|
||||
|
||||
`onChange` 事件仅会作用于在列表中的文件,因而 `fileList` 不存在对应文件时后续事件会被忽略。请注意,在 `4.13.0` 版本之前受控状态存在 bug 导致不在列表中的文件也会触发。
|
||||
|
10
package.json
10
package.json
@ -126,7 +126,7 @@
|
||||
"rc-dropdown": "~3.2.0",
|
||||
"rc-field-form": "~1.19.0",
|
||||
"rc-image": "~5.2.3",
|
||||
"rc-input-number": "~7.0.0-alpha.4",
|
||||
"rc-input-number": "~7.0.1",
|
||||
"rc-mentions": "~1.5.0",
|
||||
"rc-menu": "~8.10.0",
|
||||
"rc-motion": "^2.4.0",
|
||||
@ -147,7 +147,7 @@
|
||||
"rc-tree": "~4.1.0",
|
||||
"rc-tree-select": "~4.3.0",
|
||||
"rc-trigger": "^5.2.1",
|
||||
"rc-upload": "~4.0.0-alpha.6",
|
||||
"rc-upload": "~4.0.1",
|
||||
"rc-util": "^5.8.1",
|
||||
"scroll-into-view-if-needed": "^2.2.25",
|
||||
"warning": "^4.0.3"
|
||||
@ -228,8 +228,6 @@
|
||||
"jsdom": "^16.0.0",
|
||||
"jsonml.js": "^0.1.0",
|
||||
"less-vars-to-js": "^1.3.0",
|
||||
"logrocket": "^1.0.0",
|
||||
"logrocket-react": "^4.0.0",
|
||||
"lz-string": "^1.4.4",
|
||||
"mockdate": "^3.0.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
@ -238,7 +236,7 @@
|
||||
"prettier-plugin-jsdoc": "^0.3.0",
|
||||
"pretty-quick": "^3.0.0",
|
||||
"querystring": "^0.2.0",
|
||||
"rc-footer": "^0.6.3",
|
||||
"rc-footer": "^0.6.6",
|
||||
"rc-queue-anim": "^1.6.12",
|
||||
"rc-scroll-anim": "^2.5.8",
|
||||
"rc-tween-one": "^2.4.1",
|
||||
@ -275,7 +273,7 @@
|
||||
"stylelint": "^13.0.0",
|
||||
"stylelint-config-prettier": "^8.0.0",
|
||||
"stylelint-config-rational-order": "^0.1.2",
|
||||
"stylelint-config-standard": "^20.0.0",
|
||||
"stylelint-config-standard": "^21.0.0",
|
||||
"stylelint-declaration-block-no-ignored-properties": "^2.1.0",
|
||||
"stylelint-order": "^4.0.0",
|
||||
"theme-switcher": "^1.0.2",
|
||||
|
@ -34,7 +34,7 @@ const MAINTAINERS = [
|
||||
'hengkx',
|
||||
'Rustin-Liu',
|
||||
'fireairforce',
|
||||
'Kermit-Xuan',
|
||||
'kerm1it',
|
||||
].map(author => author.toLowerCase());
|
||||
|
||||
const cwd = process.cwd();
|
||||
|
@ -4,63 +4,61 @@ import { FormattedMessage } from 'react-intl';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import { SharedProps } from './interface';
|
||||
|
||||
export function getEcosystemGroup({ isZhCN }: SharedProps): React.ReactElement {
|
||||
return (
|
||||
<Menu.ItemGroup key="ecosystem" title={<FormattedMessage id="app.header.menu.ecosystem" />}>
|
||||
<Menu.Item key="charts">
|
||||
export function getEcosystemGroup({ isZhCN }: SharedProps): React.ReactNode {
|
||||
return [
|
||||
<Menu.Item key="charts">
|
||||
<a
|
||||
href="https://charts.ant.design"
|
||||
className="header-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<FormattedMessage id="app.header.menu.charts" />
|
||||
</a>
|
||||
</Menu.Item>,
|
||||
<Menu.Item key="pro">
|
||||
<a
|
||||
href="http://pro.ant.design"
|
||||
className="header-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<FormattedMessage id="app.header.menu.pro.v4" />
|
||||
</a>
|
||||
</Menu.Item>,
|
||||
<Menu.Item key="ng">
|
||||
<a
|
||||
href="http://ng.ant.design"
|
||||
className="header-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Ant Design of Angular
|
||||
</a>
|
||||
</Menu.Item>,
|
||||
<Menu.Item key="vue">
|
||||
<a
|
||||
href="http://vue.ant.design"
|
||||
className="header-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Ant Design of Vue
|
||||
</a>
|
||||
</Menu.Item>,
|
||||
isZhCN ? (
|
||||
<Menu.Item key="course" className="hide-in-home-page">
|
||||
<a
|
||||
href="https://charts.ant.design"
|
||||
href="https://www.yuque.com/ant-design/course"
|
||||
className="header-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<FormattedMessage id="app.header.menu.charts" />
|
||||
Ant Design 实战教程
|
||||
</a>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="pro">
|
||||
<a
|
||||
href="http://pro.ant.design"
|
||||
className="header-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<FormattedMessage id="app.header.menu.pro.v4" />
|
||||
</a>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="ng">
|
||||
<a
|
||||
href="http://ng.ant.design"
|
||||
className="header-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Ant Design of Angular
|
||||
</a>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="vue">
|
||||
<a
|
||||
href="http://vue.ant.design"
|
||||
className="header-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Ant Design of Vue
|
||||
</a>
|
||||
</Menu.Item>
|
||||
{isZhCN ? (
|
||||
<Menu.Item key="course" className="hide-in-home-page">
|
||||
<a
|
||||
href="https://www.yuque.com/ant-design/course"
|
||||
className="header-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Ant Design 实战教程
|
||||
</a>
|
||||
</Menu.Item>
|
||||
) : null}
|
||||
</Menu.ItemGroup>
|
||||
);
|
||||
) : null,
|
||||
];
|
||||
}
|
||||
|
||||
export default (props: SharedProps) => {
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
> * {
|
||||
flex: none;
|
||||
margin: 0 16px 0 0;
|
||||
margin: 0 12px 0 0;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 40px;
|
||||
@ -33,7 +33,7 @@
|
||||
.menu-row {
|
||||
> * {
|
||||
&:last-child {
|
||||
margin-right: 16px;
|
||||
margin-right: 12px;
|
||||
margin-left: 40px;
|
||||
}
|
||||
}
|
||||
|
@ -8,8 +8,6 @@ import { setTwoToneColor } from '@ant-design/icons';
|
||||
import { Helmet, HelmetProvider } from 'react-helmet-async';
|
||||
import 'moment/locale/zh-cn';
|
||||
import { ConfigProvider } from 'antd';
|
||||
import LogRocket from 'logrocket';
|
||||
import setupLogRocketReact from 'logrocket-react';
|
||||
import { browserHistory } from 'bisheng/router';
|
||||
import zhCN from 'antd/lib/locale/zh_CN';
|
||||
import Header from './Header';
|
||||
@ -49,11 +47,6 @@ if (typeof window !== 'undefined') {
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
LogRocket.init('kpuw4z/ant-design');
|
||||
setupLogRocketReact(LogRocket);
|
||||
}
|
||||
}
|
||||
|
||||
const RESPONSIVE_MOBILE = 768;
|
||||
|
Loading…
Reference in New Issue
Block a user