diff --git a/components/badge/ScrollNumber.jsx b/components/badge/ScrollNumber.jsx
index 27a2fd19d5..d218a0432e 100644
--- a/components/badge/ScrollNumber.jsx
+++ b/components/badge/ScrollNumber.jsx
@@ -7,7 +7,7 @@ function getNumberArray(num) {
num.toString().split('').reverse().map(i => Number(i)) : [];
}
-class AntScrollNumber extends React.Component {
+export default class ScrollNumber extends React.Component {
constructor(props) {
super(props);
this.state = {
@@ -113,7 +113,7 @@ class AntScrollNumber extends React.Component {
}
}
-AntScrollNumber.defaultProps = {
+ScrollNumber.defaultProps = {
prefixCls: 'ant-scroll-number',
count: null,
component: 'sup',
@@ -121,7 +121,7 @@ AntScrollNumber.defaultProps = {
height: 18,
};
-AntScrollNumber.propTypes = {
+ScrollNumber.propTypes = {
count: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.number
@@ -130,5 +130,3 @@ AntScrollNumber.propTypes = {
onAnimated: React.PropTypes.func,
height: React.PropTypes.number,
};
-
-export default AntScrollNumber;
diff --git a/components/badge/index.jsx b/components/badge/index.jsx
index 7076faaad3..7a7d0484bd 100644
--- a/components/badge/index.jsx
+++ b/components/badge/index.jsx
@@ -3,7 +3,7 @@ import Animate from 'rc-animate';
import ScrollNumber from './ScrollNumber';
import classNames from 'classnames';
-class AntBadge extends React.Component {
+export default class Badge extends React.Component {
render() {
let { count, prefixCls, overflowCount, className, style, children } = this.props;
const dot = this.props.dot;
@@ -42,14 +42,14 @@ class AntBadge extends React.Component {
}
}
-AntBadge.defaultProps = {
+Badge.defaultProps = {
prefixCls: 'ant-badge',
count: null,
dot: false,
overflowCount: 99,
};
-AntBadge.propTypes = {
+Badge.propTypes = {
count: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.number
@@ -57,5 +57,3 @@ AntBadge.propTypes = {
dot: React.PropTypes.bool,
overflowCount: React.PropTypes.number,
};
-
-export default AntBadge;
diff --git a/components/cascader/index.jsx b/components/cascader/index.jsx
index 6017d3a015..b942fff437 100644
--- a/components/cascader/index.jsx
+++ b/components/cascader/index.jsx
@@ -1,11 +1,11 @@
import React from 'react';
-import Cascader from 'rc-cascader';
+import RcCascader from 'rc-cascader';
import Input from '../input';
import Icon from '../icon';
import arrayTreeFilter from 'array-tree-filter';
import classNames from 'classnames';
-class AntCascader extends React.Component {
+export default class Cascader extends React.Component {
constructor(props) {
super(props);
this.state = {
@@ -75,7 +75,7 @@ class AntCascader extends React.Component {
delete otherProps.onChange;
return (
-
}
-
+
);
}
}
-AntCascader.defaultProps = {
+Cascader.defaultProps = {
prefixCls: 'ant-cascader',
placeholder: '请选择',
transitionName: 'slide-up',
@@ -114,5 +114,3 @@ AntCascader.defaultProps = {
allowClear: true,
onPopupVisibleChange() {},
};
-
-export default AntCascader;
diff --git a/components/collapse/index.jsx b/components/collapse/index.jsx
index 38db75e087..458c8d5c94 100644
--- a/components/collapse/index.jsx
+++ b/components/collapse/index.jsx
@@ -1,16 +1,14 @@
-import Collapse from 'rc-collapse';
+import RcCollapse from 'rc-collapse';
import React from 'react';
-class AntCollapse extends React.Component {
+export default class Collapse extends React.Component {
render() {
- return ;
+ return ;
}
}
-AntCollapse.defaultProps = {
+Collapse.defaultProps = {
prefixCls: 'ant-collapse',
};
-AntCollapse.Panel = Collapse.Panel;
-
-export default AntCollapse;
+Collapse.Panel = Collapse.Panel;
diff --git a/components/date-picker/index.jsx b/components/date-picker/index.jsx
index b6dd9fb69a..0d92cf69ee 100644
--- a/components/date-picker/index.jsx
+++ b/components/date-picker/index.jsx
@@ -1,10 +1,10 @@
import React from 'react';
-import Calendar from 'rc-calendar';
+import RcCalendar from 'rc-calendar';
import MonthCalendar from 'rc-calendar/lib/MonthCalendar';
-import DatePicker from 'rc-calendar/lib/Picker';
+import RcDatePicker from 'rc-calendar/lib/Picker';
import GregorianCalendar from 'gregorian-calendar';
import CalendarLocale from 'rc-calendar/lib/locale/zh_CN';
-import AntRangePicker from './RangePicker';
+import RangePicker from './RangePicker';
import PickerMixin from './PickerMixin';
import TimePicker from 'rc-time-picker';
import classNames from 'classnames';
@@ -116,7 +116,7 @@ function createPicker(TheCalendar, defaultFormat) {
}
return (
-
+
);
}
});
}
-const AntDatePicker = createPicker(Calendar);
-const AntMonthPicker = createPicker(MonthCalendar, 'yyyy-MM');
+const DatePicker = createPicker(RcCalendar);
+const MonthPicker = createPicker(MonthCalendar, 'yyyy-MM');
-const AntCalendar = React.createClass({
+const Calendar = React.createClass({
getDefaultProps() {
return {
locale: CalendarLocale,
@@ -162,12 +162,12 @@ const AntCalendar = React.createClass({
};
},
render() {
- return ;
+ return ;
}
});
-AntDatePicker.Calendar = AntCalendar;
-AntDatePicker.RangePicker = AntRangePicker;
-AntDatePicker.MonthPicker = AntMonthPicker;
+DatePicker.Calendar = Calendar;
+DatePicker.RangePicker = RangePicker;
+DatePicker.MonthPicker = MonthPicker;
-export default AntDatePicker;
+export default DatePicker;
diff --git a/components/menu/index.jsx b/components/menu/index.jsx
index 341810ca51..8b9e63419c 100644
--- a/components/menu/index.jsx
+++ b/components/menu/index.jsx
@@ -1,11 +1,11 @@
import React from 'react';
-import Menu, { Item, Divider, SubMenu, ItemGroup } from 'rc-menu';
+import RcMenu, { Item, Divider, SubMenu, ItemGroup } from 'rc-menu';
import animation from '../common/openAnimation';
function noop() {
}
-const AntMenu = React.createClass({
+const Menu = React.createClass({
getDefaultProps() {
return {
prefixCls: 'ant-menu',
@@ -76,13 +76,13 @@ const AntMenu = React.createClass({
className,
};
}
- return
;
+ return ;
}
});
-AntMenu.Divider = Divider;
-AntMenu.Item = Item;
-AntMenu.SubMenu = SubMenu;
-AntMenu.ItemGroup = ItemGroup;
+Menu.Divider = Divider;
+Menu.Item = Item;
+Menu.SubMenu = SubMenu;
+Menu.ItemGroup = ItemGroup;
-export default AntMenu;
+export default Menu;
diff --git a/components/modal/Modal.jsx b/components/modal/Modal.jsx
index d869650dce..2f850351bf 100644
--- a/components/modal/Modal.jsx
+++ b/components/modal/Modal.jsx
@@ -8,7 +8,7 @@ function noop() {}
let mousePosition;
let mousePositionEventBinded;
-const AntModal = React.createClass({
+const Modal = React.createClass({
getDefaultProps() {
return {
prefixCls: 'ant-modal',
@@ -99,4 +99,4 @@ const AntModal = React.createClass({
}
});
-export default AntModal;
+export default Modal;
diff --git a/components/modal/index.jsx b/components/modal/index.jsx
index c8ad51a0ac..ebfabe515f 100644
--- a/components/modal/index.jsx
+++ b/components/modal/index.jsx
@@ -1,8 +1,8 @@
-import AntModal from './Modal';
+import Modal from './Modal';
import confirm from './confirm';
import objectAssign from 'object-assign';
-AntModal.info = function (props) {
+Modal.info = function (props) {
const config = objectAssign({}, props, {
iconClassName: 'info-circle',
okCancel: false,
@@ -10,7 +10,7 @@ AntModal.info = function (props) {
return confirm(config);
};
-AntModal.success = function (props) {
+Modal.success = function (props) {
const config = objectAssign({}, props, {
iconClassName: 'check-circle',
okCancel: false,
@@ -18,7 +18,7 @@ AntModal.success = function (props) {
return confirm(config);
};
-AntModal.error = function (props) {
+Modal.error = function (props) {
const config = objectAssign({}, props, {
iconClassName: 'exclamation-circle',
okCancel: false,
@@ -26,11 +26,11 @@ AntModal.error = function (props) {
return confirm(config);
};
-AntModal.confirm = function (props) {
+Modal.confirm = function (props) {
const config = objectAssign({}, props, {
okCancel: true,
});
return confirm(config);
};
-export default AntModal;
+export default Modal;
diff --git a/components/pagination/index.jsx b/components/pagination/index.jsx
index 725d20a0a5..5e0e8e3544 100644
--- a/components/pagination/index.jsx
+++ b/components/pagination/index.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import Pagination from 'rc-pagination';
+import RcPagination from 'rc-pagination';
import Select from '../select';
import zhCN from './locale/zh_CN';
@@ -11,7 +11,7 @@ class MiniSelect extends React.Component {
MiniSelect.Option = Select.Option;
-class AntPagination extends React.Component {
+export default class Pagination extends React.Component {
render() {
let className = this.props.className;
let selectComponentClass = Select;
@@ -29,7 +29,7 @@ class AntPagination extends React.Component {
}
return (
-
-
+
{children}
);
}
});
-export default AntRadio;
+export default Radio;
diff --git a/components/radio/radioButton.jsx b/components/radio/radioButton.jsx
index ea3f0fe906..d99433b57c 100644
--- a/components/radio/radioButton.jsx
+++ b/components/radio/radioButton.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import AntRadio from './radio';
+import Radio from './radio';
const RadioButton = React.createClass({
getDefaultProps() {
@@ -9,7 +9,7 @@ const RadioButton = React.createClass({
},
render() {
return (
-
+
);
}
});
diff --git a/components/table/index.jsx b/components/table/index.jsx
index fce523df6d..acf6645175 100644
--- a/components/table/index.jsx
+++ b/components/table/index.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import Table from 'rc-table';
+import RcTable from 'rc-table';
import Checkbox from '../checkbox';
import Radio from '../radio';
import FilterDropdown from './filterDropdown';
@@ -27,7 +27,7 @@ const defaultPagination = {
onShowSizeChange: noop,
};
-let AntTable = React.createClass({
+let Table = React.createClass({
getInitialState() {
return {
// 减少状态
@@ -604,7 +604,7 @@ let AntTable = React.createClass({
let table = (
-
@@ -69,12 +69,12 @@ class AntTabs extends React.Component {
onChange={this.handleChange}
animation={animation}>
{children}
-
+
);
}
}
-AntTabs.defaultProps = {
+Tabs.defaultProps = {
prefixCls: 'ant-tabs',
animation: 'slide-horizontal',
type: 'line', // or 'card' 'editable-card'
@@ -82,6 +82,4 @@ AntTabs.defaultProps = {
onEdit() {},
};
-AntTabs.TabPane = Tabs.TabPane;
-
-export default AntTabs;
+Tabs.TabPane = RcTabs.TabPane;
diff --git a/components/tag/index.jsx b/components/tag/index.jsx
index 2f195c849e..cd9b9fd034 100644
--- a/components/tag/index.jsx
+++ b/components/tag/index.jsx
@@ -4,7 +4,7 @@ import Animate from 'rc-animate';
import Icon from '../icon';
import classNames from 'classnames';
-class AntTag extends React.Component {
+export default class Tag extends React.Component {
constructor(props) {
super(props);
@@ -61,11 +61,9 @@ class AntTag extends React.Component {
}
}
-AntTag.defaultProps = {
+Tag.defaultProps = {
prefixCls: 'ant-tag',
closable: false,
onClose() {},
afterClose() {},
};
-
-export default AntTag;
diff --git a/components/time-picker/index.jsx b/components/time-picker/index.jsx
index 5240390c4d..2b97c64256 100644
--- a/components/time-picker/index.jsx
+++ b/components/time-picker/index.jsx
@@ -1,12 +1,12 @@
import React from 'react';
import DateTimeFormat from 'gregorian-calendar-format';
-import TimePicker from 'rc-time-picker/lib/TimePicker';
+import RcTimePicker from 'rc-time-picker/lib/TimePicker';
import objectAssign from 'object-assign';
import defaultLocale from './locale/zh_CN';
import classNames from 'classnames';
import GregorianCalendar from 'gregorian-calendar';
-const AntTimePicker = React.createClass({
+const TimePicker = React.createClass({
getDefaultProps() {
return {
format: 'HH:mm:ss',
@@ -105,7 +105,7 @@ const AntTimePicker = React.createClass({
}
return (
-
-
+
{this.props.children}
-
+
{uploadList}
@@ -269,9 +269,9 @@ const AntUpload = React.createClass({
{uploadList}
-
+
{this.props.children}
-
+
);
@@ -279,9 +279,9 @@ const AntUpload = React.createClass({
return (
-
+
{this.props.children}
-
+
{uploadList}
@@ -290,10 +290,10 @@ const AntUpload = React.createClass({
}
});
-AntUpload.Dragger = React.createClass({
+Upload.Dragger = React.createClass({
render() {
- return ;
+ return ;
}
});
-export default AntUpload;
+export default Upload;
diff --git a/components/validation/index.jsx b/components/validation/index.jsx
index 99c88ab43f..aa5e79dfb1 100644
--- a/components/validation/index.jsx
+++ b/components/validation/index.jsx
@@ -1,7 +1,7 @@
import React from 'react';
import warning from 'warning';
-export default class AntValidation extends React.Component {
+export default class Validation extends React.Component {
render() {
warning(false, '`Validation` is removed, please use `Form` which has supported validation after antd@0.12.0,' +
' or you can just import Validation from \'rc-form-validation\' for compatibility');
@@ -9,7 +9,7 @@ export default class AntValidation extends React.Component {
}
}
-AntValidation.Validator = () => {};
-AntValidation.FieldMixin = {
+Validation.Validator = () => {};
+Validation.FieldMixin = {
setField() {},
};