[Fixbug]解决emptyText报错的问题

This commit is contained in:
yangchch6 2019-05-22 15:47:15 +08:00
parent 615ff1abae
commit 3a6d323dbd
9 changed files with 57230 additions and 25403 deletions

View File

@ -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,

82009
dist/demo.js vendored

File diff suppressed because it is too large Load Diff

6
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -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`}>