diff --git a/mock/dashboard.js b/mock/dashboard.js index 489529c..9a65a8a 100644 --- a/mock/dashboard.js +++ b/mock/dashboard.js @@ -99,24 +99,24 @@ let dataKey = mockStorge('Dashboard', Mock.mock({ }, numbers: [ { - icon: 'pay-circle-o', + icon: 'message', color: color.green, - title: 'Online Review', + title: '总浏览PV', number: 2781, }, { icon: 'team', color: color.blue, - title: 'New Customers', + title: '总浏览UV', number: 3241, }, { - icon: 'message', + icon: 'shopping-cart', color: color.purple, - title: 'Active Projects', + title: '成交订单数', number: 253, }, { - icon: 'shopping-cart', + icon: 'pay-circle-o', color: color.red, - title: 'Referrals', + title: '交易额', number: 4324, }, ], diff --git a/src/components/DataTable/DataTable.js b/src/components/DataTable/DataTable.js index 542080b..9a15473 100644 --- a/src/components/DataTable/DataTable.js +++ b/src/components/DataTable/DataTable.js @@ -66,6 +66,9 @@ class DataTable extends React.Component { ...fetchData, }, }).then((result) => { + if (!this.refs.DataTable) { + return + } const { pagination } = this.state pagination.total = result.total || pagination.total this.setState({ @@ -81,6 +84,7 @@ class DataTable extends React.Component { const { loading, dataSource, pagination } = this.state return (