[Fixbug]解决emptyText报错的问题
This commit is contained in:
parent
615ff1abae
commit
3a6d323dbd
|
@ -1181,7 +1181,7 @@ var Table = function (_Component) {
|
||||||
var locale = (0, _tool.getComponentLocale)(this.props, this.context, 'Table', function () {
|
var locale = (0, _tool.getComponentLocale)(this.props, this.context, 'Table', function () {
|
||||||
return _i18n2["default"];
|
return _i18n2["default"];
|
||||||
});
|
});
|
||||||
var emptyText = defaultEmptyText !== undefined ? defaultEmptyText() : function () {
|
var emptyText = defaultEmptyText !== undefined ? defaultEmptyText : function () {
|
||||||
return _react2["default"].createElement(
|
return _react2["default"].createElement(
|
||||||
'div',
|
'div',
|
||||||
null,
|
null,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1016,7 +1016,7 @@ class Table extends Component {
|
||||||
getEmptyText() {
|
getEmptyText() {
|
||||||
const { emptyText : defaultEmptyText, clsPrefix, data } = this.props;
|
const { emptyText : defaultEmptyText, clsPrefix, data } = this.props;
|
||||||
let locale = getComponentLocale(this.props, this.context, 'Table', () => i18n);
|
let locale = getComponentLocale(this.props, this.context, 'Table', () => i18n);
|
||||||
let emptyText = defaultEmptyText !== undefined ? defaultEmptyText() : () => <div><Icon type="uf-nodata" className="table-nodata"></Icon><span>{locale["no_data"]}</span></div>;
|
let emptyText = defaultEmptyText !== undefined ? defaultEmptyText : () => <div><Icon type="uf-nodata" className="table-nodata"></Icon><span>{locale["no_data"]}</span></div>;
|
||||||
|
|
||||||
return !data.length ? (
|
return !data.length ? (
|
||||||
<div className={`${clsPrefix}-placeholder`}>
|
<div className={`${clsPrefix}-placeholder`}>
|
||||||
|
|
Loading…
Reference in New Issue