Compare commits

...

5 Commits
2.3.0 ... 2.3.2

Author SHA1 Message Date
Benjy Cui
b092c022aa bump 2.3.2 2016-11-09 15:24:38 +08:00
Benjy Cui
5995aef78a fix: infinite loop, ref: #3759 2016-11-09 15:16:30 +08:00
Meck
449a982f92 Bump version 2016-11-07 11:59:07 +08:00
Meck
446315faf4 2.3.1 CHANGELOG 2016-11-07 11:59:07 +08:00
Meck
e02d77b3df Styles should be exported as well. 2016-11-07 11:48:28 +08:00
5 changed files with 59 additions and 5 deletions

View File

@@ -9,6 +9,18 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
---
## 2.3.2
`2016-11-09`
* Fix dead loop while using `getFieldProps`.
## 2.3.1
`2016-11-07`
* Add missing `dist/antd.css` back.
## 2.3.0
`2016-11-04`

View File

@@ -9,6 +9,18 @@ timeline: true
---
## 2.3.2
`2016-11-09`
* 修复使用 `getFieldProps` 会导致死循环的问题。
## 2.3.1
`2016-11-07`
* 修正上个版本缺少 `dist/antd.css` 的问题。
## 2.3.0
`2016-11-04`

View File

@@ -1,12 +1,12 @@
import React from 'react';
import { PropTypes } from 'react';
import classNames from 'classnames';
import createDOMForm from 'rc-form/lib/createDOMForm';
import PureRenderMixin from 'rc-util/lib/PureRenderMixin';
import omit from 'omit.js';
import warning from 'warning';
import assign from 'object-assign';
import warning from '../_util/warning';
import FormItem from './FormItem';
import createDOMForm from 'rc-form/lib/createDOMForm';
import { FIELD_META_PROP } from './constants';
export interface FormCreateOption {
@@ -121,14 +121,14 @@ export default class Form extends React.Component<FormProps, any> {
};
},
componentWillMount() {
this.getFieldProps = this.deprecatedGetFieldProps;
this.__getFieldProps = this.props.form.getFieldProps;
},
deprecatedGetFieldProps(name, option) {
warning(
false,
'`getFieldProps` is not recommended, please use `getFieldDecorator` instead'
);
return this.getFieldProps(name, option);
return this.__getFieldProps(name, option);
},
render() {
this.props.form.getFieldProps = this.deprecatedGetFieldProps;

View File

@@ -1 +1,31 @@
/* eslint no-console:0 */
// this file is not used if use https://github.com/ant-design/babel-plugin-import
function camelCase(name) {
return name.charAt(0).toUpperCase() +
name.slice(1).replace(/-(\w)/g, (m, n) => {
return n.toUpperCase();
});
}
const req = require.context('./components', true, /^\.\/[^_][\w-]+\/(style\/)index\.tsx?$/);
console.log(req.keys());
req.keys().forEach((mod) => {
let v = req(mod);
if (v && v.default) {
v = v.default;
}
const match = mod.match(/^\.\/([^_][\w-]+)\/index\.tsx?$/);
if (match && match[1]) {
if (match[1] === 'message' || match[1] === 'notification') {
// message & notification should not be capitalized
exports[match[1]] = v;
} else {
exports[camelCase(match[1])] = v;
}
}
});
module.exports = require('./components');

View File

@@ -1,6 +1,6 @@
{
"name": "antd",
"version": "2.3.0",
"version": "2.3.2",
"title": "Ant Design",
"description": "An enterprise-class UI design language and React-based implementation",
"homepage": "http://ant.design/",