antd.confirm() is deprecated, use antd.Modal.confirm() instead

This commit is contained in:
afc163 2015-09-08 11:42:10 +08:00
parent a63e2f8c0c
commit f785d7b891
3 changed files with 7 additions and 1 deletions

View File

@ -44,6 +44,7 @@
### Modal
* 添加 [通知类型](http://ant.design/components/modal/#demo-info) 的对话框函数。
* 用 `Modal.confirm()` 代替 `confirm()` 方法。
### Message

View File

@ -1,4 +1,5 @@
require('./style/index.less');
import './style/index.less';
import deprecate from 'util-deprecate';
// matchMedia polyfill for
// https://github.com/WickyNilliams/enquire.js/issues/82
@ -46,6 +47,9 @@ const antd = {
Timeline: require('./components/timeline')
};
// deprecate antd.confirm
antd.confirm = deprecate(antd.confirm, 'antd.confirm() is deprecated, use antd.Modal.confirm() instead');
module.exports = antd;
antd.version = require('./package.json').version;

View File

@ -62,6 +62,7 @@
"rc-util": "~2.0.3",
"react-slick": "~0.7.0",
"reqwest-without-xhr2": "~2.0.2",
"util-deprecate": "~1.0.1",
"velocity-animate": "^1.2.2"
},
"devDependencies": {