mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
Merge branch 'master' into feature-3.7.0
This commit is contained in:
commit
99d6e4c96c
@ -15,11 +15,23 @@ timeline: true
|
||||
|
||||
---
|
||||
|
||||
## 3.6.1
|
||||
## 3.6.2
|
||||
|
||||
`2018-06-02`
|
||||
`2018-06-09`
|
||||
|
||||
* 🐞 Fixing a Typescript compilation error.
|
||||
- 🐞 Fix the wrong status of check all checkbox in Table when data change. [#10629](https://github.com/ant-design/ant-design/issues/10629)
|
||||
- 🐞 Fix border style of Button.Group.
|
||||
- 🐞 Fix file list being reversed when `beforeUpload` returns `false` in Upload component. [#10681](https://github.com/ant-design/ant-design/issues/10681)
|
||||
- 🐞 Fix overflow of cell content in Calendar. [#10808](https://github.com/ant-design/ant-design/pull/10808) [@Yangzhedi](https://github.com/ant-design/Yangzhedi)
|
||||
- 🐞 Fix the processing color of Badge not follows the `primary-color`.
|
||||
- Spin
|
||||
- 🐞 Fix custom icon does not follow the value of `size`. [#10786](https://github.com/ant-design/ant-design/issues/10786)
|
||||
- 🐞 Fix no `delay` issue when sets `spinning` to `true` as default.[#10727](https://github.com/ant-design/ant-design/pull/10727) [@dreamerblue](https://github.com/dreamerblue)
|
||||
- TypeScript
|
||||
- 🐞 Fix Menu type definition. [#10773](https://github.com/ant-design/ant-design/issues/10773)
|
||||
- 🐞 Fix AutoComplete type definition. [#10745](https://github.com/ant-design/ant-design/issues/10745) [#10619](https://github.com/ant-design/ant-design/issues/10619)
|
||||
- 🐞 Fix Tree type definition. [#10841](https://github.com/ant-design/ant-design/pull/10841) [@Voronar](https://github.com/Voronar)
|
||||
- 🐞 Fix Checkbox.Group definition. [#10677](https://github.com/ant-design/ant-design/pull/10677)
|
||||
|
||||
## 3.6.0
|
||||
|
||||
|
@ -15,11 +15,23 @@ timeline: true
|
||||
|
||||
---
|
||||
|
||||
## 3.6.1
|
||||
## 3.6.2
|
||||
|
||||
`2018-06-02`
|
||||
`2018-06-09`
|
||||
|
||||
* 🐞 修复一个 Typescript 的编译错误。
|
||||
- 🐞 修复 Table 数据变化时全选勾选框状态显示不正确的问题。[#10629](https://github.com/ant-design/ant-design/issues/10629)
|
||||
- 🐞 修复 Button.Group 中使用 disabled 按钮时缺失边框。
|
||||
- 🐞 修复 Upload 中 `beforeUpload` 返回 `false` 时,文件列表排序会被反转的问题。[#10681](https://github.com/ant-design/ant-design/issues/10681)
|
||||
- 🐞 修复 Calendar 表格中内容溢出的问题。[#10808](https://github.com/ant-design/ant-design/pull/10808) [@Yangzhedi](https://github.com/ant-design/Yangzhedi)
|
||||
- Spin
|
||||
- 🐞 修复使用图标时不能按照 `size` 正确显示大小的问题。[#10786](https://github.com/ant-design/ant-design/issues/10786)
|
||||
- 🐞 修复默认旋转时 `delay` 不生效的问题。[#10727](https://github.com/ant-design/ant-design/pull/10727) [@dreamerblue](https://github.com/dreamerblue)
|
||||
- 修复 Badge 的状态色不跟主题色变化的问题。
|
||||
- TypeScript
|
||||
- 🐞 修复 Menu 类型定义。[#10773](https://github.com/ant-design/ant-design/issues/10773)
|
||||
- 🐞 修复 AutoComplete 类型定义。[#10745](https://github.com/ant-design/ant-design/issues/10745) [#10619](https://github.com/ant-design/ant-design/issues/10619)
|
||||
- 🐞 修复 Tree 类型定义。[#10841](https://github.com/ant-design/ant-design/pull/10841) [@Voronar](https://github.com/Voronar)
|
||||
- 🐞 修复 Checkbox.Group 的类型定义。[#10677](https://github.com/ant-design/ant-design/pull/10677)
|
||||
|
||||
## 3.6.0
|
||||
|
||||
|
@ -6,7 +6,11 @@ import Input from '../input';
|
||||
import InputElement from './InputElement';
|
||||
|
||||
export interface DataSourceItemObject { value: string; text: string; }
|
||||
export type DataSourceItemType = string | DataSourceItemObject;
|
||||
export type DataSourceItemType =
|
||||
string |
|
||||
DataSourceItemObject |
|
||||
React.ReactElement<OptionProps> |
|
||||
React.ReactElement<OptGroupProps>;
|
||||
|
||||
export interface AutoCompleteInputProps {
|
||||
onChange?: React.FormEventHandler<any>;
|
||||
|
@ -61,7 +61,7 @@ describe('Button', () => {
|
||||
expect(wrapper.find('.ant-btn').hasClass('ant-btn-two-chinese-chars')).toBe(true);
|
||||
});
|
||||
|
||||
it('have static perperty for type detecting', () => {
|
||||
it('have static property for type detecting', () => {
|
||||
const wrapper = mount(
|
||||
<Button>Button Text</Button>
|
||||
);
|
||||
|
@ -4,7 +4,7 @@ import classNames from 'classnames';
|
||||
import shallowEqual from 'shallowequal';
|
||||
import Checkbox from './Checkbox';
|
||||
|
||||
export type CheckboxValueType = string | number;
|
||||
export type CheckboxValueType = string | number | boolean;
|
||||
|
||||
export interface CheckboxOptionType {
|
||||
label: string;
|
||||
@ -121,7 +121,7 @@ export default class CheckboxGroup extends React.Component<CheckboxGroupProps, C
|
||||
children = this.getOptions().map(option => (
|
||||
<Checkbox
|
||||
prefixCls={prefixCls}
|
||||
key={option.value}
|
||||
key={option.value.toString()}
|
||||
disabled={'disabled' in option ? option.disabled : props.disabled}
|
||||
value={option.value}
|
||||
checked={state.value.indexOf(option.value) !== -1}
|
||||
|
@ -9,10 +9,20 @@ import FormItem from './FormItem';
|
||||
import { FIELD_META_PROP, FIELD_DATA_PROP } from './constants';
|
||||
import { Omit } from '../_util/type';
|
||||
|
||||
type FormCreateOptionMessagesCallback = (...args: any[]) => string;
|
||||
|
||||
interface FormCreateOptionMessages {
|
||||
[messageId: string]:
|
||||
| string
|
||||
| FormCreateOptionMessagesCallback
|
||||
| FormCreateOptionMessages;
|
||||
}
|
||||
|
||||
export interface FormCreateOption<T> {
|
||||
onFieldsChange?: (props: T, fields: Array<any>) => void;
|
||||
onFieldsChange?: (props: T, fields: Array<any>, allFields: any, add: string) => void;
|
||||
onValuesChange?: (props: T, changedValues: any, allValues: any) => void;
|
||||
mapPropsToFields?: (props: T) => void;
|
||||
validateMessages?: FormCreateOptionMessages;
|
||||
withRef?: boolean;
|
||||
}
|
||||
|
||||
|
@ -20,4 +20,11 @@ describe('Spin', () => {
|
||||
);
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should render with delay when it\'s mounted with spinning=true and delay', () => {
|
||||
const wrapper = shallow(
|
||||
<Spin spinning delay={500} />
|
||||
);
|
||||
expect(wrapper.find('.ant-spin').at(0).hasClass('ant-spin-spinning')).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
@ -88,6 +88,14 @@ class Spin extends React.Component<SpinProps, SpinState> {
|
||||
return !!(this.props && this.props.children);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { spinning, delay } = this.props;
|
||||
if (spinning && delay && !isNaN(Number(delay))) {
|
||||
this.setState({ spinning: false });
|
||||
this.delayTimeout = window.setTimeout(() => this.setState({ spinning }), delay);
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
if (this.debounceTimeout) {
|
||||
clearTimeout(this.debounceTimeout);
|
||||
|
@ -8,7 +8,7 @@
|
||||
@primary-color : @blue-6;
|
||||
@info-color : @blue-6;
|
||||
@success-color : @green-6;
|
||||
@processing-color : @primary-color;
|
||||
@processing-color : @blue-6;
|
||||
@error-color : @red-6;
|
||||
@highlight-color : @red-6;
|
||||
@warning-color : @gold-6;
|
||||
|
@ -131,7 +131,7 @@ export interface TreeProps {
|
||||
}
|
||||
|
||||
export default class Tree extends React.Component<TreeProps, any> {
|
||||
static TreeNode: React.ComponentType<AntTreeNodeProps> = TreeNode;
|
||||
static TreeNode: React.ComponentClass<AntTreeNodeProps> = TreeNode;
|
||||
static DirectoryTree = DirectoryTree;
|
||||
|
||||
static defaultProps = {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "antd",
|
||||
"version": "3.6.1",
|
||||
"version": "3.6.2",
|
||||
"title": "Ant Design",
|
||||
"description": "An enterprise-class UI design language and React-based implementation",
|
||||
"homepage": "http://ant.design/",
|
||||
@ -122,7 +122,7 @@
|
||||
"eslint-plugin-import": "^2.2.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.0.2",
|
||||
"eslint-plugin-markdown": "~1.0.0-beta.4",
|
||||
"eslint-plugin-react": "7.8.2",
|
||||
"eslint-plugin-react": "7.9.1",
|
||||
"eslint-tinker": "^0.4.0",
|
||||
"fetch-jsonp": "^1.0.3",
|
||||
"glob": "^7.1.1",
|
||||
|
@ -129,6 +129,7 @@
|
||||
top: 0;
|
||||
margin: 0;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
vertical-align: baseline;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ const branchUrl = 'https://github.com/ant-design/ant-design/edit/master/';
|
||||
export default function EditButton({ title, filename }) {
|
||||
return (
|
||||
<Tooltip title={title}>
|
||||
<a className="edit-button" href={`${branchUrl}${filename}`} target="_blank">
|
||||
<a className="edit-button" href={`${branchUrl}${filename}`} target="_blank" rel="noopener noreferrer">
|
||||
<Icon type="edit" />
|
||||
</a>
|
||||
</Tooltip>
|
||||
|
Loading…
Reference in New Issue
Block a user