提交 32a6deeb 编写于 作者: W warmhug

Merge branch 'master' into upgrade-ts

......@@ -66,7 +66,7 @@ const columns = [{
| defaultExpandedRowKeys | 默认展开的列 | Array | | - |
| onChange | 分页、排序、筛选变化时触发 | Function(pagination, filters, sorter) | | |
| loading | 页面是否加载中 | Boolean | | false |
| locale | 设置排序、过滤按钮的文字或 `title` | Object | | [默认值](https://github.com/ant-design/ant-design/issues/575#issuecomment-159169511) |
| locale | 默认文案设置,目前包括排序、过滤、空数据文案 | Object | | `{ filterConfirm: '确定', filterReset: '重置', emptyText: '暂无数据' }` [默认值](https://github.com/ant-design/ant-design/issues/575#issuecomment-159169511) |
| indentSize | 展示树形数据时,每层缩进的宽度,以 px 为单位 | Number | | 15 |
| onRowClick | 处理行点击事件 | Function(record, index) | | 无 |
| useFixedHeader | 是否固定表头 | Boolean | | false |
......
......@@ -36,12 +36,13 @@ class AntTag extends React.Component {
}
render() {
const { prefixCls, closable, color, ...restProps } = this.props;
const { prefixCls, closable, color, className, children, ...restProps } = this.props;
const close = closable ? <Icon type="cross" onClick={this.close.bind(this)} /> : '';
const className = classNames({
const classString = classNames({
[prefixCls]: true,
[`${prefixCls}-${color}`]: !!color,
[`${prefixCls}-close`]: this.state.closing,
[className]: !!className,
});
return (
<Animate component=""
......@@ -50,8 +51,8 @@ class AntTag extends React.Component {
transitionAppear
onEnd={this.animationEnd.bind(this)}>
{this.state.closed ? null : (
<div data-show={!this.state.closing} className={className}>
<span className={`${prefixCls}-text`} {...restProps} />
<div data-show={!this.state.closing} {...restProps} className={classString}>
<span className={`${prefixCls}-text`}>{children}</span>
{close}
</div>
)}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册