Jelajahi Sumber

fix #3035,w ill report an error when data is empty

陈帅 7 tahun lalu
induk
melakukan
c2068aa957
1 mengubah file dengan 2 tambahan dan 5 penghapusan
  1. 2 5
      src/components/StandardTable/index.js

+ 2 - 5
src/components/StandardTable/index.js

@@ -63,11 +63,8 @@ class StandardTable extends PureComponent {
 
 
   render() {
   render() {
     const { selectedRowKeys, needTotalList } = this.state;
     const { selectedRowKeys, needTotalList } = this.state;
-    const {
-      data: { list, pagination },
-      rowKey,
-      ...rest
-    } = this.props;
+    const { data = {}, rowKey, ...rest } = this.props;
+    const { list = [], pagination } = data;
 
 
     const paginationProps = {
     const paginationProps = {
       showSizeChanger: true,
       showSizeChanger: true,