mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 13:47:02 +08:00
Merge branch 'master' of github.com:ant-design/ant-design
This commit is contained in:
commit
bf87c8a930
130
CHANGELOG.en-US.md
Normal file
130
CHANGELOG.en-US.md
Normal file
@ -0,0 +1,130 @@
|
||||
---
|
||||
order: 3
|
||||
title: Change Log
|
||||
toc: false
|
||||
timeline: true
|
||||
---
|
||||
|
||||
If you want to read change logs before `2.0.0`, please visit [GitHub](https://github.com/ant-design/ant-design/releases?after=2.0.0).
|
||||
|
||||
---
|
||||
|
||||
After four months, `antd@2.0.0` is published. We had refactored code and improve functionalities and details of existing components. What's more, we provide English version of the documentation. The antd community help us a lot in developing `antd@2.0.0`.
|
||||
|
||||
If you meet any problem while you try to upgrade from `antd@1.0.0`, feel free to [create issues on GitHub](https://github.com/ant-design/ant-design/issues).
|
||||
|
||||
### 2.x Major changes
|
||||
|
||||
* Refactor components with TypeScript, and provide **`.d.ts` files which are officially supported**. Thanks to all the developers that contributed to [#1846](https://github.com/ant-design/ant-design/issues/1846) and @infeng.
|
||||
* **Translate the documentation into English**, and we are going to provide both of Chinese and English versions of the documentation in the future. Thanks to all the translators and reviewers that contributed to [#1471](https://github.com/ant-design/ant-design/issues/1471).
|
||||
* DatePicker, TimePicker, Calendar and other components that are designed to select time **are refactored to replace [gregorian-calendar](github.com/yiminghe/gregorian-calendar) with [moment](http://momentjs.com/)**.
|
||||
* All the [icons](http://ant.design/components/icon/) are re-designed.
|
||||
* New component [Mention](http://ant.design/components/mention/).
|
||||
* New component [AutoComplete](http://ant.design/components/auto-complete/).
|
||||
* The `getFieldProps` of Form is replaced with `getFieldDecorator` which will warn developers if they make mistakes. Related discussion [#1533](https://github.com/ant-design/ant-design/issues/1533).
|
||||
* Table supports [grouping columns](http://ant.design/components/table/#components-table-demo-grouping-columns). @yesmeck
|
||||
* Removed components and features which are deprecated in `antd@1.x`, such as QueueAnim, Validation, Form.ValueMixin, Progress.Line, Progress.Circle, Popover[overlay] and Slider[marks] will not support array any more.
|
||||
|
||||
### 2.x Breaking changes
|
||||
|
||||
There are some breaking changes in `antd@2.0.0`, and you need to modify your code to work with it.
|
||||
|
||||
* `value` and `defaultValue` of all the time-related components will not support type `String/Date`, please use [moment](http://momentjs.com/):
|
||||
```diff
|
||||
- <TimePicker defaultValue="12:08:23" />
|
||||
+ <TimePicker defaultValue={moment('12:08:23', 'HH:mm:ss')} />
|
||||
|
||||
- <DatePicker defaultValue="2015/01/01" />
|
||||
+ <DatePicker defaultValue={moment('2015/01/01', 'YYYY/MM/DD')} />
|
||||
|
||||
- <Calendar defaultValue={new Date('2010-10-10')} />
|
||||
+ <Calendar defaultValue={moment('2010-10-10', 'YYYY-MM-DD')} />
|
||||
```
|
||||
* Parameters of type `Date/GregorianCalendar` of functions such as `onChange` and `onPanelChange`, plus other callback functions had been changed to type moment. Please consult [APIs of gregorian-calendar](https://github.com/yiminghe/gregorian-calendar) and [APIs of moment](http://momentjs.com/docs/), and update your code accordingly. Because the return value of `JSON.stringy(date: moment)` will lost time zone, we should use `.format` to convert date to string first, see related issue [#3082](https://github.com/ant-design/ant-design/issues/3082) for details:
|
||||
```js
|
||||
handleSubmit() {
|
||||
const values = this.props.form.getFieldsValue();
|
||||
values.date = values.date.format('YYYY-MM-DD HH:mm:ss'); // or other format
|
||||
const data = JSON.stringify(values);
|
||||
// send data to server
|
||||
}
|
||||
```
|
||||
* The `format` of time-related components is the same as [moment's format](http://momentjs.com/docs/) now.
|
||||
* `linkRender` and `nameRender` of Breadcrumb are removed, please use `itemRender`.
|
||||
* `onClose` and `onOpen` of Menu are removed, please use `onOpenChange`. As being totally different, please check [this demo](http://beta.ant.design/components/menu/#components-menu-demo-sider-current) first.
|
||||
* Paging columns of Table were removed, please use [fixed columns](http://ant.design/components/table/#components-table-demo-fixed-columns).
|
||||
|
||||
The following change will throw some warnings in the console and it will still work, but we recommend to update your code.
|
||||
|
||||
* `getFieldProps` of Form is deprecated, please use `getFieldDecorator`:
|
||||
```diff
|
||||
+ getFieldDecorator('userName', { ... })(
|
||||
<Input placeholder="请输入账户名"
|
||||
- {...getFieldProps('userName', { ... })}
|
||||
/>
|
||||
+ )
|
||||
```
|
||||
* `toggleOpen` of DatePicker is deprecated, please use `onOpenChange`:
|
||||
```diff
|
||||
- handleToggleOpen({ open }) {
|
||||
+ handleOpenChange(open) {
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
### 2.x Bug fixes
|
||||
|
||||
* Dropdown.Button[disabled] should work. [#3070](https://github.com/ant-design/ant-design/issues/3070)
|
||||
* `option.withRef` of Form.create should work. [#2843](https://github.com/ant-design/ant-design/issues/2843)
|
||||
* Fix slow response of expanding sub menu in Menu[inline] mode. [#2701](https://github.com/ant-design/ant-design/issues/2701)
|
||||
* The button of Modal.confirm(and so on) should not be clickable while it is closed asynchronously. [#2684](https://github.com/ant-design/ant-design/issues/2684)
|
||||
* `format` of DatePicker[showTime] should work. [#3123](https://github.com/ant-design/ant-design/issues/3123)
|
||||
* Fix Table[dataSource] treat key whose value is `0` as inexisting. [#3166](https://github.com/ant-design/ant-design/pull/3166) @noonnightstorm
|
||||
* Tree.Node should not show arrow if it has no child nodes. [#2616](https://github.com/ant-design/ant-design/issues/2616)
|
||||
* Fix cursor style of arrows that are hidden of Tree.Node. [#2748](https://github.com/ant-design/ant-design/issues/2748)
|
||||
|
||||
### 2.x Other improvements
|
||||
|
||||
* Alert supports [`banner` mode](http://ant.design/components/alert/#components-alert-demo-banner).
|
||||
* BackTop will scroll to top with animation.
|
||||
* Badge supports [status dot mode](http://ant.design/components/badge/#components-badge-demo-status).
|
||||
* Cascader supports [searching options directly](http://ant.design/components/cascader/#components-cascader-demo-search).
|
||||
* Checkbox supports [indeterminate mode](http://ant.design/components/checkbox/#components-checkbox-demo-check-all).
|
||||
* Form supports [vertical layout](http://ant.design/components/form/#components-form-demo-validate-customized).
|
||||
* InputNumber supports long press to increase/decrease number. [#](http://ant.design/components/input-number/#components-input-number-demo-basic)
|
||||
* notification supports [customized icon](http://ant.design/components/notification/#components-notification-demo-custom-icon).
|
||||
* Spin allows [customized tips and animation work together](http://ant.design/components/spin/#components-spin-demo-tip). @jerrybendy
|
||||
* Transfer can handle event while options are checked/unchecked. [#](http://ant.design/components/transfer/#components-transfer-demo-basic)
|
||||
* Transfer can determine [whether an option is checkable](http://ant.design/components/transfer/#components-transfer-demo-basic).
|
||||
* Improve style of Alert and notification.
|
||||
* Modal.confirm(and so on) can be closed by keyboard. @Dafrok
|
||||
* Improve the user experience of [selecting time in DatePicker](http://ant.design/components/date-picker/#components-date-picker-demo-time).
|
||||
* Improve the status changed animation of [Spin](http://ant.design/components/spin/#components-spin-demo-nested ).
|
||||
* Update [font-family](https://github.com/ant-design/ant-design/commit/2f308b0f995cfcb2a3c8feb1e35ffd3f0bf93cfc).
|
||||
|
||||
### 2.x Workflow
|
||||
|
||||
* [AntD Library](http://library.ant.design/) a collection of Axure files which includes components and patterns that follow Ant Design Specification.
|
||||
* Rename `babel-plugin-antd` to [`babel-plugin-import`](https://github.com/ant-design/babel-plugin-import), and this means that `babel-plugin-import` becomes an common load-on-demand solution and not just for `antd`.
|
||||
Please update `package.json`:
|
||||
```diff
|
||||
{
|
||||
"devDependencies": {
|
||||
- "babel-plugin-antd": "^0.x.x",
|
||||
+ "babel-plugin-import": "^1.0.0",
|
||||
}
|
||||
}
|
||||
```
|
||||
And update your babel config in `.babelrc` or other place:
|
||||
```diff
|
||||
{
|
||||
- "plugins": [["antd", { style: "css" }]]
|
||||
+ "plugins": [["import", { libraryName: "antd", style: "css" }]]
|
||||
}
|
||||
```
|
||||
* [`dva@1.0.0`](https://github.com/dvajs/dva) is published and it is officially recommended framework [in real world](http://ant.design/docs/react/practical-projects).
|
||||
* The officially recommended scaffold is [`dva-cli`](https://github.com/dvajs/dva-cli) now, the old `antd-init` is just for studying and demo.
|
||||
|
||||
## 1.0.0
|
||||
|
||||
Visit [GitHub](https://github.com/ant-design/ant-design/releases?after=2.0.0) to read change logs from `0.x` to `1.x`。
|
@ -9,6 +9,131 @@ timeline: true
|
||||
|
||||
---
|
||||
|
||||
## 2.0.0
|
||||
|
||||
`2016-09-x`
|
||||
|
||||
很高兴的通知各位,经过四个月时间的紧密开发,`antd@2.0.0` 终于发布了。这个版本我们重构了底层代码,持续完善现有组件功能和优化细节,并提供了英文版的文档,其中很多都来自社区的贡献,无法一一感谢,欢迎各位持续关注和鞭策。在升级过程中遇到任何问题,请及时 [反馈给我们](https://github.com/ant-design/ant-design/issues)。
|
||||
|
||||
### 2.x 主要变化
|
||||
|
||||
* 开发语言改为 TypeScript,提供 **官方支持的 `.d.ts` 文件**,感谢 [#1846](https://github.com/ant-design/ant-design/issues/1846) 中所有参与到这次重构的人以及后期 @infeng 对其的完善。
|
||||
* **新增英文文档**, 以后将同时提供中英双语文档,感谢 [#1471](https://github.com/ant-design/ant-design/issues/1471) 里所有参与到翻译、review 中的人。
|
||||
* 时间类组件 DatePicker、TimePicker、Calendar 等的底层 **使用 [moment](http://momentjs.com/) 替换 [gregorian-calendar](github.com/yiminghe/gregorian-calendar)**。
|
||||
* 全新设计的 [图标](http://ant.design/components/icon/)。
|
||||
* 新增提及组件 [Mention](http://ant.design/components/mention/)。
|
||||
* 新增自动完成组件 [AutoComplete](http://ant.design/components/auto-complete/)。
|
||||
* Form 新增 `getFieldDecorator` 作为 `getFieldProps` 的替代,对于不正确的使用方式 `getFieldDecorator` 会给出提示,可以降低踩坑的概率。相关讨论见 [#1533](https://github.com/ant-design/ant-design/issues/1533)。
|
||||
* Table 支持 [表头分组](http://ant.design/components/table/#components-table-demo-grouping-columns)。@yesmeck
|
||||
* 完全移除 `antd@1.x` 中已经废弃的 QueueAnim、Validation、Form.ValueMixin、Progress.Line、Progress.Circle、Popover[overlay] 及 Slider[marks] 对数组的支持。
|
||||
|
||||
### 2.x 不兼容改动
|
||||
|
||||
此版本有部分不兼容的改动,升级时确保修改相应的使用代码。
|
||||
|
||||
* 时间类组件的 `value` 和 `defaultValue` 不再支持 `String/Date` 类型,请使用 [moment](http://momentjs.com/)。
|
||||
```diff
|
||||
- <TimePicker defaultValue="12:08:23" />
|
||||
+ <TimePicker defaultValue={moment('12:08:23', 'HH:mm:ss')} />
|
||||
|
||||
- <DatePicker defaultValue="2015/01/01" />
|
||||
+ <DatePicker defaultValue={moment('2015/01/01', 'YYYY/MM/DD')} />
|
||||
|
||||
- <Calendar defaultValue={new Date('2010-10-10')} />
|
||||
+ <Calendar defaultValue={moment('2010-10-10', 'YYYY-MM-DD')} />
|
||||
```
|
||||
* 时间类组件的 `onChange` 和 `onPanelChange` 及其他回调函数中为 `Date/GregorianCalendar` 类型的参数,均修改为 moment 类型,两者 API 有所不同,但功能基本一致,请对照 [moment 的 API 文档](http://momentjs.com/docs/) 和 [gregorian-calendar 的文档](https://github.com/yiminghe/gregorian-calendar) 进行修改。由于 `JSON.stringy(date: moment)` 返回的值会丢失时区设置,所以要先使用 `.format` 把日期转成字符串,相关 issue 见 [#3082](https://github.com/ant-design/ant-design/issues/3082):
|
||||
```js
|
||||
handleSubmit() {
|
||||
const values = this.props.form.getFieldsValue();
|
||||
values.date = values.date.format('YYYY-MM-DD HH:mm:ss'); // 或其它格式
|
||||
const data = JSON.stringify(values);
|
||||
// 发送 data 到服务器
|
||||
}
|
||||
```
|
||||
* 时间类组件的 `format` 属性配置也调整为与 [moment](http://momentjs.com/docs/) 的一致。
|
||||
* Breadcrumb 移除 `linkRender` 和 `nameRender`,请使用 `itemRender`。
|
||||
* Menu 移除 `onClose` `onOpen`,请使用 `onOpenChange`。API 差异较大,请先研究 [demo](http://beta.ant.design/components/menu/#components-menu-demo-sider-current)。
|
||||
* Table 移除列分页功能,请使用 [固定列](http://ant.design/components/table/#components-table-demo-fixed-columns)。
|
||||
|
||||
以下变化升级后旧代码仍然能正常运行,但是控制台会出现警告提示,建议按提示进行修改。
|
||||
|
||||
* Form 废弃 `getFieldProps`,请使用 `getFieldDecorator`:
|
||||
```diff
|
||||
+ getFieldDecorator('userName', { ... })(
|
||||
<Input placeholder="请输入账户名"
|
||||
- {...getFieldProps('userName', { ... })}
|
||||
/>
|
||||
+ )
|
||||
```
|
||||
* DatePicker 废弃 `toggleOpen`,请使用 `onOpenChange`:
|
||||
```diff
|
||||
- handleToggleOpen({ open }) {
|
||||
+ handleOpenChange(open) {
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
### 2.x Bug 修复
|
||||
|
||||
* 修复 Dropdown.Button `disabled` 属性无效的问题。[#3070](https://github.com/ant-design/ant-design/issues/3070)
|
||||
* 修复 Form.create `withRef` 选项失效的问题。[#2843](https://github.com/ant-design/ant-design/issues/2843)
|
||||
* 修复 Menu inline 模式下子菜单展开的问题。[#2701](https://github.com/ant-design/ant-design/issues/2701)
|
||||
* 修复 Modal.confirm 之类的弹窗在异步调用时按钮仍可点击的问题。[#2684](https://github.com/ant-design/ant-design/issues/2684)
|
||||
* 修复 DatePicker[showTime] 参数中的 `format` 失效的问题。[#3123](https://github.com/ant-design/ant-design/issues/3123)
|
||||
* 修复 Table[dataSource] 中的项的 key 为 `0` 时识别错误的问题。[#3166](https://github.com/ant-design/ant-design/pull/3166) @noonnightstorm
|
||||
* 修复 Tree.Node 无子节点时仍然显示箭头的问题。[#2616](https://github.com/ant-design/ant-design/issues/2616)
|
||||
* 修复 Tree.Node 箭头隐藏后鼠标 hover 上去光标仍会发生变化的问题。[#2748](https://github.com/ant-design/ant-design/issues/2748)
|
||||
|
||||
### 2.x 其他改进
|
||||
|
||||
* Alert 新增 [`banner` 模式](http://ant.design/components/alert/#components-alert-demo-banner)。
|
||||
* BackTop 增加回到顶部的动画效果。
|
||||
* Badge 新增 [状态点模式](http://ant.design/components/badge/#components-badge-demo-status)。
|
||||
* Cascader 新增 [搜索功能](http://ant.design/components/cascader/#components-cascader-demo-search)。
|
||||
* Checkbox 新增 [indeterminate 状态](http://ant.design/components/checkbox/#components-checkbox-demo-check-all)。
|
||||
* Form 新增 [垂直布局](http://ant.design/components/form/#components-form-demo-validate-customized)。
|
||||
* InputNumber 现在支持长按。[#](http://ant.design/components/input-number/#components-input-number-demo-basic)
|
||||
* notification 支持 [自定义 icon](http://ant.design/components/notification/#components-notification-demo-custom-icon)。
|
||||
* Spin 现在允许 [自定义文案与动画共存](http://ant.design/components/spin/#components-spin-demo-tip)。@jerrybendy
|
||||
* Transfer 现在可以监听用户选择了哪些选项。[#](http://ant.design/components/transfer/#components-transfer-demo-basic)
|
||||
* Transfer 现在可以定义哪些选项是 [不可选择的](http://ant.design/components/transfer/#components-transfer-demo-basic)。
|
||||
* 优化 Alert 和 notification 的样式。
|
||||
* 优化 Modal.confirm 之类的弹窗的键盘交互。@Dafrok
|
||||
* 优化 [DatePicker 的时间选择](http://ant.design/components/date-picker/#components-date-picker-demo-time) 交互。
|
||||
* 优化 [Spin 状态切换](http://ant.design/components/spin/#components-spin-demo-nested ) 时的效果。
|
||||
* 更新 [font-family](https://github.com/ant-design/ant-design/commit/2f308b0f995cfcb2a3c8feb1e35ffd3f0bf93cfc)。
|
||||
|
||||
### 2.x 相关工具发布
|
||||
|
||||
* 新增配套网站 [AntD Library](http://library.ant.design/),提供遵循 Ant Design 设计规范的组件、模式等的 Axure 资源。
|
||||
* `babel-plugin-antd` 更名为 [`babel-plugin-import`](https://github.com/ant-design/babel-plugin-import),标志着该插件将作为一个通用的按需加载方案存在,而不再是 `antd` 专有。
|
||||
请更新 `package.json`:
|
||||
```diff
|
||||
{
|
||||
"devDependencies": {
|
||||
- "babel-plugin-antd": "^0.x.x",
|
||||
+ "babel-plugin-import": "^1.0.0",
|
||||
}
|
||||
}
|
||||
```
|
||||
同时更新 `.babelrc` 或你在其它地方对其的配置:
|
||||
```diff
|
||||
{
|
||||
- "plugins": [["antd", { style: "css" }]]
|
||||
+ "plugins": [["import", { libraryName: "antd", style: "css" }]]
|
||||
}
|
||||
```
|
||||
* [`dva@1.0.0`](https://github.com/dvajs/dva) 也已经发布,并推荐 [在实战项目中使用](http://ant.design/docs/react/practical-projects)。
|
||||
* 脚手架工具推荐使用 [`dva-cli`](https://github.com/dvajs/dva-cli),原来的 `antd-init` 以后仅会用于学习以及 demo。
|
||||
|
||||
## 1.11.2
|
||||
|
||||
`2016-09-26`
|
||||
|
||||
- 修复 Popover 内嵌 Badge 后失效的问题。[#3109](https://github.com/ant-design/ant-design/issues/3109)
|
||||
- 修复 Modal 内嵌的 Button 在某些情况下与 Modal 的滚动不同步的问题。[#3031](https://github.com/ant-design/ant-design/issues/3031)
|
||||
|
||||
## 1.11.1
|
||||
|
||||
`2016-09-14`
|
@ -45,10 +45,7 @@ export default class RangePicker extends React.Component<any, any> {
|
||||
|
||||
render() {
|
||||
const props = this.props;
|
||||
const locale = props.locale;
|
||||
|
||||
const { disabledDate, showTime, getCalendarContainer, prefixCls,
|
||||
transitionName, disabled, popupStyle, align, style, onOk } = this.props;
|
||||
const { disabledDate, showTime, prefixCls, popupStyle, style, onOk, locale } = props;
|
||||
const state = this.state;
|
||||
|
||||
const calendarClassName = classNames({
|
||||
@ -63,9 +60,7 @@ export default class RangePicker extends React.Component<any, any> {
|
||||
onOk: this.handleChange,
|
||||
};
|
||||
if (props.timePicker) {
|
||||
pickerChangeHandler.onChange = (value) => {
|
||||
this.handleChange(value);
|
||||
};
|
||||
pickerChangeHandler.onChange = value => this.handleChange(value);
|
||||
} else {
|
||||
calendarHandler = {};
|
||||
}
|
||||
@ -98,26 +93,21 @@ export default class RangePicker extends React.Component<any, any> {
|
||||
|
||||
return (<span className={props.pickerClass} style={style}>
|
||||
<RcDatePicker
|
||||
{...props}
|
||||
{...pickerChangeHandler}
|
||||
transitionName={transitionName}
|
||||
disabled={disabled}
|
||||
calendar={calendar}
|
||||
value={state.value}
|
||||
prefixCls={`${prefixCls}-picker-container`}
|
||||
style={popupStyle}
|
||||
align={align}
|
||||
getCalendarContainer={getCalendarContainer}
|
||||
onOpen={props.toggleOpen}
|
||||
onClose={props.toggleOpen}
|
||||
>
|
||||
{
|
||||
({ value }) => {
|
||||
const start = value[0];
|
||||
const end = value[1];
|
||||
return (
|
||||
<span className={props.pickerInputClass} disabled={disabled}>
|
||||
<span className={props.pickerInputClass} disabled={props.disabled}>
|
||||
<input
|
||||
disabled={disabled}
|
||||
disabled={props.disabled}
|
||||
readOnly
|
||||
value={(start && start.format(props.format)) || ''}
|
||||
placeholder={startPlaceholder}
|
||||
@ -125,7 +115,7 @@ export default class RangePicker extends React.Component<any, any> {
|
||||
/>
|
||||
<span className={`${prefixCls}-range-picker-separator`}> ~ </span>
|
||||
<input
|
||||
disabled={disabled}
|
||||
disabled={props.disabled}
|
||||
readOnly
|
||||
value={(end && end.format(props.format)) || ''}
|
||||
placeholder={endPlaceholder}
|
||||
|
@ -72,11 +72,7 @@ export default function createPicker(TheCalendar) {
|
||||
let calendarHandler: Object = {
|
||||
onOk: this.handleChange,
|
||||
// fix https://github.com/ant-design/ant-design/issues/1902
|
||||
onSelect: (value, cause) => {
|
||||
if (cause && cause.source === 'todayButton') {
|
||||
this.handleChange(value);
|
||||
}
|
||||
},
|
||||
onSelect: value => this.handleChange(value),
|
||||
};
|
||||
if (props.showTime) {
|
||||
pickerChangeHandler = {};
|
||||
@ -113,18 +109,12 @@ export default function createPicker(TheCalendar) {
|
||||
return (
|
||||
<span className={props.pickerClass} style={assign({}, pickerStyle, props.style)}>
|
||||
<RcDatePicker
|
||||
{...props}
|
||||
{...pickerChangeHandler}
|
||||
transitionName={props.transitionName}
|
||||
disabled={props.disabled}
|
||||
calendar={calendar}
|
||||
value={this.state.value}
|
||||
prefixCls={`${prefixCls}-picker-container`}
|
||||
style={props.popupStyle}
|
||||
align={props.align}
|
||||
getCalendarContainer={props.getCalendarContainer}
|
||||
open={props.open}
|
||||
onOpen={props.toggleOpen}
|
||||
onClose={props.toggleOpen}
|
||||
>
|
||||
{
|
||||
({ value }) => {
|
||||
|
@ -48,12 +48,12 @@ const DateRange = React.createClass({
|
||||
onEndChange(value) {
|
||||
this.onChange('endValue', value);
|
||||
},
|
||||
handleStartToggle({ open }) {
|
||||
handleStartOpenChange(open) {
|
||||
if (!open) {
|
||||
this.setState({ endOpen: true });
|
||||
}
|
||||
},
|
||||
handleEndToggle({ open }) {
|
||||
handleEndOpenChange(open) {
|
||||
this.setState({ endOpen: open });
|
||||
},
|
||||
render() {
|
||||
@ -66,7 +66,7 @@ const DateRange = React.createClass({
|
||||
value={this.state.startValue}
|
||||
placeholder="开始日期"
|
||||
onChange={this.onStartChange}
|
||||
toggleOpen={this.handleStartToggle}
|
||||
onOpenChange={this.handleStartOpenChange}
|
||||
/>
|
||||
<DatePicker
|
||||
disabledDate={this.disabledEndDate}
|
||||
@ -76,7 +76,7 @@ const DateRange = React.createClass({
|
||||
placeholder="结束日期"
|
||||
onChange={this.onEndChange}
|
||||
open={this.state.endOpen}
|
||||
toggleOpen={this.handleEndToggle}
|
||||
onOpenChange={this.handleEndOpenChange}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
@ -41,7 +41,7 @@ moment.tz.setDefault('Asia/Shanghai')
|
||||
| locale | localization configuration | Object | [default](https://github.com/ant-design/ant-design/issues/424) |
|
||||
| onOk | a callback function, can be executed when OK-button is clicked | function(Date value) | - |
|
||||
| open | open state of picker | bool | - |
|
||||
| toggleOpen | a callback function, can be executed whether the popup calendar is popped up or closed | function(open) | - |
|
||||
| onOpenChange | a callback function, can be executed whether the popup calendar is popped up or closed | function(status) | - |
|
||||
| getCalendarContainer | to set the container of the floating layer, while the default is to create a `div` element in `body` | function(trigger) | - |
|
||||
| showTime | to provide an additional time selection | Object/Boolean | [TimePicker Options](http://ant.design/components/time-picker/#api) |
|
||||
|
||||
|
@ -41,7 +41,7 @@ moment.tz.setDefault('Asia/Shanghai')
|
||||
| size | 输入框大小,`large` 高度为 32px,`small` 为 22px,默认是 28px | string | 无 |
|
||||
| locale | 国际化配置 | object | [默认配置](https://github.com/ant-design/ant-design/issues/424) |
|
||||
| open | 控制弹层是否展开 | bool | - |
|
||||
| toggleOpen | 弹出日历和关闭日历的回调 | function(open) | 无 |
|
||||
| onOpenChange | 弹出日历和关闭日历的回调 | function(status) | 无 |
|
||||
| getCalendarContainer | 定义浮层的容器,默认为 body 上新建 div | function(trigger) | 无 |
|
||||
| showTime | 增加时间选择功能 | Object or Boolean | [TimePicker Options](http://ant.design/components/time-picker/#api) |
|
||||
|
||||
|
@ -24,6 +24,21 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&-1-column,
|
||||
&-1-column &-select {
|
||||
width: 100%;
|
||||
}
|
||||
&-2-columns &-select {
|
||||
width: 115px;
|
||||
}
|
||||
&-1-column &-select,
|
||||
&-2-columns &-select {
|
||||
li {
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
&-input {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
@ -4,6 +4,7 @@ import TimePickerPanel from 'rc-time-picker/lib/Panel';
|
||||
import classNames from 'classnames';
|
||||
import defaultLocale from './locale/zh_CN';
|
||||
import assign from 'object-assign';
|
||||
import warning from 'warning';
|
||||
|
||||
export default function wrapPicker(Picker, defaultFormat?) {
|
||||
const PickerWrapper = React.createClass({
|
||||
@ -16,7 +17,7 @@ export default function wrapPicker(Picker, defaultFormat?) {
|
||||
},
|
||||
onOk() {
|
||||
},
|
||||
toggleOpen() {
|
||||
onOpenChange() {
|
||||
},
|
||||
locale: {},
|
||||
align: {
|
||||
@ -44,8 +45,18 @@ export default function wrapPicker(Picker, defaultFormat?) {
|
||||
return result;
|
||||
},
|
||||
|
||||
toggleOpen ({open}) {
|
||||
this.props.toggleOpen({open});
|
||||
handleOpenChange(open) {
|
||||
const { onOpenChange, toggleOpen } = this.props;
|
||||
onOpenChange(open);
|
||||
|
||||
if (toggleOpen) {
|
||||
warning(
|
||||
false,
|
||||
'`toggleOpen` is deprecated and will be removed in the future, ' +
|
||||
'please use `onOpenChange` instead'
|
||||
);
|
||||
toggleOpen({open});
|
||||
}
|
||||
},
|
||||
|
||||
render() {
|
||||
@ -63,17 +74,22 @@ export default function wrapPicker(Picker, defaultFormat?) {
|
||||
|
||||
const locale = this.getLocale();
|
||||
|
||||
const timeFormat = props.showTime && props.showTime.format;
|
||||
const timeFormat = (props.showTime && props.showTime.format) || 'HH:mm:ss';
|
||||
const rcTimePickerProps = {
|
||||
format: timeFormat || 'HH:mm:ss',
|
||||
showSecond: timeFormat && timeFormat.indexOf('ss') >= 0,
|
||||
showHour: timeFormat && timeFormat.indexOf('HH') >= 0,
|
||||
format: timeFormat,
|
||||
showSecond: timeFormat.indexOf('ss') >= 0,
|
||||
showHour: timeFormat.indexOf('HH') >= 0,
|
||||
};
|
||||
const timePickerCls = classNames({
|
||||
[`${prefixCls}-time-picker-1-column`]: !(rcTimePickerProps.showSecond || rcTimePickerProps.showHour),
|
||||
[`${prefixCls}-time-picker-2-columns`]: rcTimePickerProps.showSecond !== rcTimePickerProps.showHour,
|
||||
});
|
||||
const timePicker = props.showTime ? (
|
||||
<TimePickerPanel
|
||||
{...rcTimePickerProps}
|
||||
{...props.showTime}
|
||||
prefixCls={`${prefixCls}-time-picker`}
|
||||
className={timePickerCls}
|
||||
placeholder={locale.timePickerLocale.placeholder}
|
||||
transitionName="slide-up"
|
||||
/>
|
||||
@ -86,7 +102,7 @@ export default function wrapPicker(Picker, defaultFormat?) {
|
||||
pickerInputClass={pickerInputClass}
|
||||
locale={locale}
|
||||
timePicker={timePicker}
|
||||
toggleOpen={this.toggleOpen}
|
||||
onOpenChange={this.handleOpenChange}
|
||||
/>
|
||||
);
|
||||
},
|
||||
|
@ -52,6 +52,7 @@ export interface InputProps {
|
||||
onBlur?: React.FormEventHandler;
|
||||
autosize?: boolean | AutoSizeType;
|
||||
autoComplete?: 'on' | 'off';
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
export default class Input extends Component<InputProps, any> {
|
||||
|
@ -42,4 +42,4 @@ title: Steps
|
||||
| status | 指定状态。当不配置该属性时,会使用 Steps 的 `current` 来自动指定状态。可选:`wait` `process` `finish` `error` | String | wait |
|
||||
| title | 标题 | React.Element | - |
|
||||
| description | 步骤的详情描述,可选 | React.Element | - |
|
||||
| icon | 步骤图标,可选 | React.Element | - |
|
||||
| icon | 步骤图标的类型,可选 | string | - |
|
||||
|
@ -562,7 +562,11 @@ export default class Table extends React.Component<TableProps, any> {
|
||||
if (typeof rowKey === 'function') {
|
||||
return rowKey(record, index);
|
||||
}
|
||||
return record[rowKey as string] || index;
|
||||
let recordKey = record[rowKey as string] !== undefined ? record[rowKey as string] : index;
|
||||
warning(recordKey !== undefined,
|
||||
'Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key.'
|
||||
);
|
||||
return recordKey;
|
||||
}
|
||||
|
||||
checkSelection(data, type, byDefaultChecked) {
|
||||
|
@ -31,7 +31,7 @@ export interface TooltipProps {
|
||||
overlay?: React.ReactNode;
|
||||
openClassName?: string;
|
||||
arrowPointAtCenter?: boolean;
|
||||
getTooltipContainer: (triggerNode: React.ReactNode) => HTMLElement;
|
||||
getTooltipContainer?: (triggerNode: React.ReactNode) => HTMLElement;
|
||||
}
|
||||
|
||||
export default class Tooltip extends React.Component<TooltipProps, any> {
|
||||
|
27
package.json
27
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "antd",
|
||||
"version": "2.0.0-beta.12",
|
||||
"version": "2.0.0",
|
||||
"title": "Ant Design",
|
||||
"description": "An enterprise-class UI design language and React-based implementation",
|
||||
"homepage": "http://ant.design/",
|
||||
@ -42,11 +42,11 @@
|
||||
"object-assign": "~4.1.0",
|
||||
"omit.js": "^0.1.0",
|
||||
"rc-animate": "~2.3.0",
|
||||
"rc-calendar": "~7.1.0",
|
||||
"rc-calendar": "~7.2.0",
|
||||
"rc-cascader": "~0.10.1",
|
||||
"rc-checkbox": "~1.4.0",
|
||||
"rc-collapse": "~1.6.4",
|
||||
"rc-dialog": "~6.3.0",
|
||||
"rc-dialog": "~6.4.0",
|
||||
"rc-dropdown": "~1.4.8",
|
||||
"rc-editor-mention": "~0.2.2",
|
||||
"rc-form": "~1.0.0",
|
||||
@ -69,7 +69,7 @@
|
||||
"rc-tree": "~1.3.6",
|
||||
"rc-tree-select": "~1.8.0",
|
||||
"rc-upload": "~2.1.0",
|
||||
"rc-util": "^3.3.0",
|
||||
"rc-util": "^4.0.0",
|
||||
"react-addons-pure-render-mixin": "^15.0.0",
|
||||
"react-slick": "~0.14.2",
|
||||
"shallowequal": "^0.2.2",
|
||||
@ -99,7 +99,7 @@
|
||||
"eslint-plugin-react": "^6.1.2",
|
||||
"eslint-tinker": "^0.4.0",
|
||||
"history": "^3.0.0",
|
||||
"jest-cli": "^13.2.3",
|
||||
"jest-cli": "^15.1.1",
|
||||
"jsonml-to-react-component": "~0.2.0",
|
||||
"jsonml.js": "^0.1.0",
|
||||
"jsonp": "^0.2.0",
|
||||
@ -123,9 +123,9 @@
|
||||
"react-stateless-wrapper": "^1.0.2",
|
||||
"react-sublime-video": "^0.2.0",
|
||||
"reqwest": "^2.0.5",
|
||||
"typescript-babel-jest": "^0.1.5",
|
||||
"typings": "^1.3.2",
|
||||
"values.js": "^1.0.3",
|
||||
"webpack-babel-jest": "^1.0.4"
|
||||
"values.js": "^1.0.3"
|
||||
},
|
||||
"scripts": {
|
||||
"dist": "antd-tools run dist",
|
||||
@ -141,8 +141,8 @@
|
||||
"demolint": "RUN_ENV=DEMO eslint components/*/demo/*.md --ext '.md'",
|
||||
"lesshint": "lesshint components -r scripts/lesshint-report.js",
|
||||
"eslint-fix": "eslint --fix test site scripts ./.eslintrc.js ./webpack.config.js --ext '.js,.jsx,.tsx' --ignore-pattern '!.eslintrc.js' && eslint-tinker ./components/*/demo/*.md",
|
||||
"test": "npm run lint && npm run dist",
|
||||
"jest": "jest",
|
||||
"test": "npm run lint && npm run dist && npm run jest",
|
||||
"jest": "jest --no-cache",
|
||||
"pre-publish": "node ./scripts/prepub",
|
||||
"prepublish": "antd-tools run guard",
|
||||
"pub": "antd-tools run update-self && antd-tools run pub",
|
||||
@ -150,21 +150,20 @@
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"tsx",
|
||||
"js",
|
||||
"jsx",
|
||||
"json"
|
||||
],
|
||||
"unmockedModulePathPatterns": [
|
||||
"<rootDir>/node_modules/*"
|
||||
],
|
||||
"modulePathIgnorePatterns": [
|
||||
"/_site/"
|
||||
],
|
||||
"testPathIgnorePatterns": [
|
||||
"/node_modules/"
|
||||
],
|
||||
"scriptPreprocessor": "<rootDir>/node_modules/webpack-babel-jest",
|
||||
"testDirectoryName": "tests"
|
||||
"scriptPreprocessor": "node_modules/typescript-babel-jest",
|
||||
"testRegex": "(/tests/.*|\\.(test|spec))\\.(js)$"
|
||||
},
|
||||
"pre-commit": [
|
||||
"lint"
|
||||
|
@ -19,7 +19,8 @@ module.exports = {
|
||||
source: [
|
||||
'./components',
|
||||
'./docs',
|
||||
'CHANGELOG.md', // TODO: fix it in bisheng
|
||||
'CHANGELOG.zh-CN.md', // TODO: fix it in bisheng
|
||||
'CHANGELOG.en-US.md',
|
||||
],
|
||||
lazyLoad(nodePath, nodeValue) {
|
||||
if (typeof nodeValue === 'string') {
|
||||
@ -38,7 +39,7 @@ module.exports = {
|
||||
};
|
||||
},
|
||||
changelog(markdownData) {
|
||||
if (markdownData.meta.filename === 'CHANGELOG.md') {
|
||||
if (/CHANGELOG/.test(markdownData.meta.filename)) {
|
||||
return {
|
||||
meta: markdownData.meta,
|
||||
};
|
||||
|
@ -35,6 +35,7 @@ module.exports = {
|
||||
'app.footer.data-vis': 'Data Visualization',
|
||||
'app.footer.data-vis-spec': 'Specification of Data Visualization',
|
||||
'app.footer.motion': 'Motion',
|
||||
'app.footer.antd-library': 'Axure library of Ant Design',
|
||||
'app.footer.material': 'Sitemap Template',
|
||||
'app.footer.community': 'Community',
|
||||
'app.footer.change-log': 'Change Log',
|
||||
@ -43,5 +44,10 @@ module.exports = {
|
||||
'app.footer.bug-report': 'Bug Report',
|
||||
'app.footer.version': 'Version: ',
|
||||
'app.footer.author': 'Created by Ant UED',
|
||||
'app.publish.title': 'antd@2.0.0 is released!',
|
||||
'app.publish.greeting': 'Hello, ',
|
||||
'app.publish.intro': ' is released, and please upgrade. ',
|
||||
'app.publish.old-version-guide': 'If you want to read old version documentation, please visit ',
|
||||
'app.publish.old-version-tips': ', or change the version of documentation with the bottom-right selector.',
|
||||
},
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { FormattedMessage, injectIntl } from 'react-intl';
|
||||
import { Select, Modal } from 'antd';
|
||||
import { version as antdVersion } from 'antd/package.json';
|
||||
import { docVersions } from '../../';
|
||||
@ -18,28 +18,9 @@ function isLocalStorageNameSupported() {
|
||||
}
|
||||
}
|
||||
|
||||
function infoNewVersion() {
|
||||
Modal.info({
|
||||
title: 'antd 新版发布!',
|
||||
content: (
|
||||
<div>
|
||||
<img src="https://os.alipayobjects.com/rmsportal/nyqBompsynAQCpJ.svg" alt="Ant Design" />
|
||||
<p>
|
||||
您好,<a target="_blank" rel="noopener noreferrer" href="/#/changelog">antd@1.0</a> 已正式发布,欢迎升级。
|
||||
如果您还需要使用旧版,请查阅 <a target="_blank" rel="noopener noreferrer" href="http://012x.ant.design">012x.ant.design</a>
|
||||
,也可通过页面右下角的文档版本选择框进行切换。
|
||||
</p>
|
||||
</div>
|
||||
),
|
||||
onOk: () => localStorage.setItem('infoNewVersionSent', 'true'),
|
||||
className: 'new-version-info-modal',
|
||||
width: 470,
|
||||
});
|
||||
}
|
||||
|
||||
docVersions[antdVersion] = antdVersion;
|
||||
|
||||
export default class Footer extends React.Component {
|
||||
class Footer extends React.Component {
|
||||
componentDidMount() {
|
||||
// for some iOS
|
||||
// http://stackoverflow.com/a/14555361
|
||||
@ -49,12 +30,36 @@ export default class Footer extends React.Component {
|
||||
// 大版本发布后全局弹窗提示
|
||||
// 1. 点击『知道了』之后不再提示
|
||||
// 2. 超过截止日期后不再提示
|
||||
if (localStorage.getItem('infoNewVersionSent') !== 'true' &&
|
||||
new Date().getTime() < new Date('2016/05/22').getTime()) {
|
||||
infoNewVersion();
|
||||
if (localStorage.getItem('antd@2.0.0-notification-sent') !== 'true' &&
|
||||
Date.now() < new Date('2016/10/14').getTime()) {
|
||||
this.infoNewVersion();
|
||||
}
|
||||
}
|
||||
|
||||
infoNewVersion() {
|
||||
const messages = this.props.intl.messages;
|
||||
Modal.info({
|
||||
title: messages['app.publish.title'],
|
||||
content: (
|
||||
<div>
|
||||
<img src="https://os.alipayobjects.com/rmsportal/nyqBompsynAQCpJ.svg" alt="Ant Design" />
|
||||
<p>
|
||||
{messages['app.publish.greeting']}
|
||||
<a target="_blank" rel="noopener noreferrer" href="/changelog">antd@2.0.0</a>
|
||||
{messages['app.publish.intro']}
|
||||
{messages['app.publish.old-version-guide']}
|
||||
<a target="_blank" rel="noopener noreferrer" href="http://1x.ant.design">1x.ant.design</a>
|
||||
{messages['app.publish.old-version-tips']}
|
||||
</p>
|
||||
</div>
|
||||
),
|
||||
okText: 'OK',
|
||||
onOk: () => localStorage.setItem('antd@2.0.0-notification-sent', 'true'),
|
||||
className: 'new-version-info-modal',
|
||||
width: 470,
|
||||
});
|
||||
}
|
||||
|
||||
handleVersionChange = (url) => {
|
||||
window.location.href = url;
|
||||
}
|
||||
@ -74,15 +79,15 @@ export default class Footer extends React.Component {
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a target="_blank" rel="noopener noreferrer" href="https://github.com/ant-design/antd-init">antd-init</a> -
|
||||
<a target="_blank" rel="noopener noreferrer" href="https://github.com/dvajs/dva">dva</a> - <FormattedMessage id="app.footer.dva" />
|
||||
</div>
|
||||
<div>
|
||||
<a target="_blank" rel="noopener noreferrer" href="https://github.com/dvajs/dva-cli">dva-cli</a> -
|
||||
<FormattedMessage id="app.footer.scaffold" />
|
||||
</div>
|
||||
<div>
|
||||
<a target="_blank" rel="noopener noreferrer" href="http://ant-tool.github.io">ant-tool</a> - <FormattedMessage id="app.footer.dev-tools" />
|
||||
</div>
|
||||
<div>
|
||||
<a target="_blank" rel="noopener noreferrer" href="https://github.com/dvajs/dva">dva</a> - <FormattedMessage id="app.footer.dva" />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h2><FormattedMessage id="app.footer.links" /></h2>
|
||||
@ -98,6 +103,9 @@ export default class Footer extends React.Component {
|
||||
<div><a href="http://motion.ant.design">Ant Motion</a> -
|
||||
<FormattedMessage id="app.footer.motion" />
|
||||
</div>
|
||||
<div><a href="http://library.ant.design/">AntD Library</a> -
|
||||
<FormattedMessage id="app.footer.antd-library" />
|
||||
</div>
|
||||
<div><a href="http://ux.ant.design">Ant UX</a> -
|
||||
<FormattedMessage id="app.footer.material" />
|
||||
</div>
|
||||
@ -145,3 +153,5 @@ export default class Footer extends React.Component {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default injectIntl(Footer);
|
||||
|
@ -35,6 +35,7 @@ module.exports = {
|
||||
'app.footer.data-vis': '数据可视化',
|
||||
'app.footer.data-vis-spec': '数据可视化规范',
|
||||
'app.footer.motion': '设计动效',
|
||||
'app.footer.antd-library': 'Ant Design 的 Axure 部件库',
|
||||
'app.footer.material': '页面逻辑素材',
|
||||
'app.footer.community': '社区',
|
||||
'app.footer.change-log': '更新记录',
|
||||
@ -43,5 +44,10 @@ module.exports = {
|
||||
'app.footer.bug-report': '报告 Bug,',
|
||||
'app.footer.version': '文档版本:',
|
||||
'app.footer.author': '蚂蚁金服体验技术部出品',
|
||||
'app.publish.title': 'antd@2.0.0 发布!',
|
||||
'app.publish.greeting': '你好,',
|
||||
'app.publish.intro': ' 已正式发布,欢迎升级。',
|
||||
'app.publish.old-version-guide': '如果您还需要使用旧版,请查阅 ',
|
||||
'app.publish.old-version-tips': ',也可通过页面右下角的文档版本选择框进行切换。',
|
||||
},
|
||||
};
|
||||
|
@ -1,6 +1,3 @@
|
||||
jest.unmock('../components/button/button');
|
||||
jest.unmock('../components/icon/index');
|
||||
|
||||
import React from 'react';
|
||||
import TestUtils from 'react-addons-test-utils';
|
||||
import Button from '../components/button/button';
|
||||
|
@ -1,5 +1,3 @@
|
||||
jest.unmock('../components/icon/index');
|
||||
|
||||
import React from 'react';
|
||||
import TestUtils from 'react-addons-test-utils';
|
||||
import { wrap } from 'react-stateless-wrapper';
|
||||
|
@ -8,8 +8,6 @@ describe('antd dist files', function() {
|
||||
if (!distFilesExisted) {
|
||||
it('empty test case placeholder', () => {});
|
||||
return;
|
||||
} else {
|
||||
jest.unmock('../dist/antd');
|
||||
}
|
||||
|
||||
// fixed jsdom miss
|
||||
@ -33,6 +31,8 @@ describe('antd dist files', function() {
|
||||
it('should has modules in antd', () => {
|
||||
expect('Affix' in antd).toBeTruthy();
|
||||
expect('Alert' in antd).toBeTruthy();
|
||||
expect('AutoComplete' in antd).toBeTruthy();
|
||||
expect('BackTop' in antd).toBeTruthy();
|
||||
expect('Badge' in antd).toBeTruthy();
|
||||
expect('Breadcrumb' in antd).toBeTruthy();
|
||||
expect('Button' in antd).toBeTruthy();
|
||||
@ -53,12 +53,12 @@ describe('antd dist files', function() {
|
||||
expect('Menu' in antd).toBeTruthy();
|
||||
expect('message' in antd).toBeTruthy();
|
||||
expect('Modal' in antd).toBeTruthy();
|
||||
expect('Mention' in antd).toBeTruthy();
|
||||
expect('notification' in antd).toBeTruthy();
|
||||
expect('Pagination' in antd).toBeTruthy();
|
||||
expect('Popconfirm' in antd).toBeTruthy();
|
||||
expect('Popover' in antd).toBeTruthy();
|
||||
expect('Progress' in antd).toBeTruthy();
|
||||
expect('QueueAnim' in antd).toBeTruthy();
|
||||
expect('Radio' in antd).toBeTruthy();
|
||||
expect('Rate' in antd).toBeTruthy();
|
||||
expect('Row' in antd).toBeTruthy();
|
||||
@ -77,8 +77,6 @@ describe('antd dist files', function() {
|
||||
expect('Tree' in antd).toBeTruthy();
|
||||
expect('TreeSelect' in antd).toBeTruthy();
|
||||
expect('Upload' in antd).toBeTruthy();
|
||||
expect('Validation' in antd).toBeTruthy();
|
||||
expect('BackTop' in antd).toBeTruthy();
|
||||
});
|
||||
|
||||
// https://github.com/ant-design/ant-design/issues/1970
|
||||
|
@ -1,7 +1,3 @@
|
||||
jest.unmock('../components/layout/index');
|
||||
jest.unmock('../components/layout/col');
|
||||
jest.unmock('../components/layout/row');
|
||||
|
||||
import React from 'react';
|
||||
import TestUtils from 'react-addons-test-utils';
|
||||
import { wrap } from 'react-stateless-wrapper';
|
||||
|
@ -1,7 +1,3 @@
|
||||
jest.unmock('../components/popover/placements');
|
||||
jest.unmock('../components/popover/index');
|
||||
jest.unmock('../components/tooltip/index');
|
||||
|
||||
import React from 'react';
|
||||
import TestUtils from 'react-addons-test-utils';
|
||||
import Popover from '../components/popover/index';
|
||||
|
Loading…
Reference in New Issue
Block a user