+
{table}
{this.renderPagination()}
diff --git a/components/tabs/demo/editable-card.md b/components/tabs/demo/editable-card.md
index 56678bfda4cd8babfe6169a832e7fa64021d6300..7f5ceeed9e0fb01c7714f382f88363f920c859e6 100644
--- a/components/tabs/demo/editable-card.md
+++ b/components/tabs/demo/editable-card.md
@@ -30,7 +30,7 @@ const Demo = React.createClass({
},
add() {
const panes = this.state.panes;
- const activeKey = 'newTab' + this.newTabIndex++;
+ const activeKey = `newTab${this.newTabIndex++}`;
panes.push(
新页面);
this.setState({ panes, activeKey });
},
diff --git a/components/tabs/index.jsx b/components/tabs/index.jsx
index c277766ddc8263946019a6cde56923e95e3845fa..611c7159e090b758feea669cf55d252b58afd5dc 100644
--- a/components/tabs/index.jsx
+++ b/components/tabs/index.jsx
@@ -30,9 +30,9 @@ class AntTabs extends React.Component {
children, tabBarExtraContent } = this.props;
let className = classNames({
[this.props.className]: !!this. props.className,
- [prefixCls + '-mini']: size === 'small' || size === 'mini',
- [prefixCls + '-vertical']: tabPosition === 'left' || tabPosition === 'right',
- [prefixCls + '-card']: type.indexOf('card') >= 0,
+ [`${prefixCls}-mini`]: size === 'small' || size === 'mini',
+ [`${prefixCls}-vertical`]: tabPosition === 'left' || tabPosition === 'right',
+ [`${prefixCls}-card`]: type.indexOf('card') >= 0,
});
if (tabPosition === 'left' || tabPosition === 'right' || type.indexOf('card') >= 0) {
animation = null;
@@ -53,14 +53,14 @@ class AntTabs extends React.Component {
// Add new tab handler
tabBarExtraContent = (
-
+
{tabBarExtraContent}
);
}
// Wrap the extra content
tabBarExtraContent = (
-
+
{tabBarExtraContent}
);
diff --git a/components/tag/demo/control.md b/components/tag/demo/control.md
index 5c2f6917215bd6a50d34ae98a097aaa676e6e36b..65490b5454931718c630ce33cb6aa8f386db676e 100644
--- a/components/tag/demo/control.md
+++ b/components/tag/demo/control.md
@@ -29,7 +29,7 @@ const App = React.createClass({
addTag() {
const tags = [...this.state.tags];
index += 1;
- tags.push({ key: index, name: '新标签' + index });
+ tags.push({ key: index, name: `新标签${index}` });
this.setState({ tags });
},
render() {
diff --git a/components/tag/index.jsx b/components/tag/index.jsx
index d7356b13532d53400af6535f148655a59ca4971e..29ee35cb6530b35d21d20405b9565944323e33b4 100644
--- a/components/tag/index.jsx
+++ b/components/tag/index.jsx
@@ -16,9 +16,9 @@ class AntTag extends React.Component {
close(e) {
const dom = ReactDOM.findDOMNode(this);
- dom.style.width = dom.offsetWidth + 'px';
+ dom.style.width = `${dom.offsetWidth}px`;
// It's Magic Code, don't know why
- dom.style.width = dom.offsetWidth + 'px';
+ dom.style.width = `${dom.offsetWidth}px`;
this.setState({
closing: true,
});
@@ -40,18 +40,18 @@ class AntTag extends React.Component {
const close = closable ?
: '';
const className = classNames({
[prefixCls]: true,
- [prefixCls + '-' + color]: !!color,
- [prefixCls + '-close']: this.state.closing,
+ [`${prefixCls}-${color}`]: !!color,
+ [`${prefixCls}-close`]: this.state.closing,
});
return (
{this.state.closed ? null : (
-
+
{close}
)}
diff --git a/components/time-picker/index.jsx b/components/time-picker/index.jsx
index 83a8a525dbc095371222196a3531901d012b900f..aecc2e727f8439fc74a44ec105ff302e984a40b6 100644
--- a/components/time-picker/index.jsx
+++ b/components/time-picker/index.jsx
@@ -86,7 +86,7 @@ const AntTimePicker = React.createClass({
}
let className = classNames({
[props.className]: !!props.className,
- [props.prefixCls + '-' + props.size]: true,
+ [`${props.prefixCls}-${props.size}`]: true,
});
if (props.format.indexOf('ss') < 0) {
props.showSecond = false;
diff --git a/components/timeline/index.jsx b/components/timeline/index.jsx
index 41e14811db9fcf47948fe4f9df1fa05078990a88..1c6b8765f69b5df57ecc5d28d0a589b066c393e7 100644
--- a/components/timeline/index.jsx
+++ b/components/timeline/index.jsx
@@ -13,15 +13,15 @@ const TimelineItem = React.createClass({
render() {
const { prefixCls, color, last, children, pending } = this.props;
const itemClassName = classNames({
- [prefixCls + '-item']: true,
- [prefixCls + '-item-last']: last,
- [prefixCls + '-item-pending']: pending,
+ [`${prefixCls}-item`]: true,
+ [`${prefixCls}-item-last`]: last,
+ [`${prefixCls}-item-pending`]: pending,
});
return (
-
-
- {children}
+
+
+ {children}
);
}
@@ -38,7 +38,7 @@ const Timeline = React.createClass({
const pendingNode = typeof pending === 'boolean' ? null : pending;
const className = classNames({
[prefixCls]: true,
- [prefixCls + '-pending']: !!pending,
+ [`${prefixCls}-pending`]: !!pending,
});
return (
diff --git a/components/transfer/demo/advanced.md b/components/transfer/demo/advanced.md
index 5d3834321c77222b09590283da27c5d42adaacfd..961d3c0f9e3caa485557c91574c8870b8b7029c0 100644
--- a/components/transfer/demo/advanced.md
+++ b/components/transfer/demo/advanced.md
@@ -26,8 +26,8 @@ const App = React.createClass({
for (let i = 0; i < 20; i++) {
const data = {
key: i,
- title: '内容' + (i + 1),
- description: '内容' + (i + 1) + '的描述',
+ title: `内容${i + 1}`,
+ description: `内容${i + 1}的描述`,
chosen: Math.random() * 2 > 1
};
if (data.chosen) {
@@ -60,7 +60,7 @@ const App = React.createClass({
operations={['向右操作文案', '向左操作文案']}
targetKeys={this.state.targetKeys}
onChange={this.handleChange}
- render={item => item.title + '-' + item.description}
+ render={item => `${item.title}-${item.description}`}
footer={this.renderFooter} />
);
}
diff --git a/components/transfer/demo/basic.md b/components/transfer/demo/basic.md
index ace1b7085d71a37e84f0f9a5bb288501877aebce..3c5c682db5c06f66f0bc3d518b006dd5600b71c9 100644
--- a/components/transfer/demo/basic.md
+++ b/components/transfer/demo/basic.md
@@ -25,8 +25,8 @@ const App = React.createClass({
for (let i = 0; i < 20; i++) {
const data = {
key: i,
- title: '内容' + (i + 1),
- description: '内容' + (i + 1) + '的描述',
+ title: `内容${i + 1}`,
+ description: `内容${i + 1}的描述`,
chosen: Math.random() * 2 > 1
};
if (data.chosen) {
diff --git a/components/transfer/demo/search.md b/components/transfer/demo/search.md
index 8672bb80a1b37b27228971ae28f4f3077c63ae0e..1911b69151f81225e34f737e14a6ac464f9a66af 100644
--- a/components/transfer/demo/search.md
+++ b/components/transfer/demo/search.md
@@ -25,8 +25,8 @@ const App = React.createClass({
for (let i = 0; i < 20; i++) {
const data = {
key: i,
- title: '内容' + (i + 1),
- description: '内容' + (i + 1) + '的描述',
+ title: `内容${i + 1}`,
+ description: `内容${i + 1}的描述`,
chosen: Math.random() * 2 > 1
};
if (data.chosen) {
diff --git a/components/transfer/index.jsx b/components/transfer/index.jsx
index aaf8d2e60725d3bee42a75b0e0041495f68e921c..6bb6fd26793d7a110d4faaba0dd7391a1d47e0d1 100644
--- a/components/transfer/index.jsx
+++ b/components/transfer/index.jsx
@@ -105,22 +105,22 @@ class Transfer extends Component {
this.filterDataSource(dataSource, filter).map(item => item.key);
this.setState({
- [direction + 'CheckedKeys']: holder,
+ [`${direction}CheckedKeys`]: holder,
});
}
handleFilter(direction, e) {
this.setState({
// deselect all
- [direction + 'CheckedKeys']: [],
+ [`${direction}CheckedKeys`]: [],
// add filter
- [direction + 'Filter']: e.target.value,
+ [`${direction}Filter`]: e.target.value,
});
}
handleClear(direction) {
this.setState({
- [direction + 'Filter']: '',
+ [`${direction}Filter`]: '',
});
}
@@ -140,7 +140,7 @@ class Transfer extends Component {
holder.push(selectedItem.key);
}
this.setState({
- [direction + 'CheckedKeys']: holder,
+ [`${direction}CheckedKeys`]: holder,
});
}
@@ -181,14 +181,14 @@ class Transfer extends Component {
searchPlaceholder={searchPlaceholder}
body={body}
footer={footer}
- prefixCls={prefixCls + '-list'}/>
+ prefixCls={`${prefixCls}-list`}/>
+ className={`${prefixCls}-operation`}/>
+ prefixCls={`${prefixCls}-list`}/>
);
}
diff --git a/components/transfer/list.jsx b/components/transfer/list.jsx
index 8987b94767182b2cad9213927052eb58a90ee544..bd8e9fde779a882679cf4961ac968e3ad7bbe162 100644
--- a/components/transfer/list.jsx
+++ b/components/transfer/list.jsx
@@ -78,7 +78,7 @@ class TransferList extends Component {
const listCls = classNames({
[prefixCls]: true,
- [prefixCls + '-with-footer']: !!footerDom,
+ [`${prefixCls}-with-footer`]: !!footerDom,
});
const showItems = dataSource.map((item) => {
@@ -105,7 +105,7 @@ class TransferList extends Component {
checked: checkStatus === 'all',
checkPart: checkStatus === 'part',
checkable:
- })}
{(checkedKeys.length > 0 ? checkedKeys.length + '/' : '') + dataSource.length} 条
+ })}{(checkedKeys.length > 0 ? `${checkedKeys.length}/` : '') + dataSource.length} 条
{titleText}
{ bodyDom ||
diff --git a/components/transfer/search.jsx b/components/transfer/search.jsx
index c2061641ad7e86a7e08c99aeb3aa6861de0cf7e4..203e36ab883d8a2f7ac432c530953fb6bc5f04cc 100644
--- a/components/transfer/search.jsx
+++ b/components/transfer/search.jsx
@@ -21,13 +21,13 @@ class Search extends Component {
const { placeholder, value, prefixCls } = this.props;
return (