From be03d101a34a6686a950ca4550fdae602cc28024 Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Tue, 5 Mar 2019 21:35:49 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=85=A8=E9=83=A8=E5=B1=95=E5=BC=80=20tabl?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin-web/src/pages/Admin/ResourceList.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/admin-web/src/pages/Admin/ResourceList.js b/admin-web/src/pages/Admin/ResourceList.js index 31d77285b..b44dc3be7 100644 --- a/admin-web/src/pages/Admin/ResourceList.js +++ b/admin-web/src/pages/Admin/ResourceList.js @@ -97,6 +97,7 @@ class ResourceList extends PureComponent { modalVisible: false, modalType: 'add', //add update initValues: {}, + defaultExpandAllRows: false, }; componentDidMount() { @@ -107,6 +108,12 @@ class ResourceList extends PureComponent { }); } + changeExpandAll() { + this.setState({ + defaultExpandAllRows: !this.state.defaultExpandAllRows, + }); + } + handleModalVisible = (flag, modalType, initValues) => { this.setState({ modalVisible: !!flag, @@ -168,7 +175,7 @@ class ResourceList extends PureComponent { const { resourceList: { list }, } = this.props; - const { modalVisible, modalType, initValues } = this.state; + const { modalVisible, modalType, initValues, defaultExpandAllRows } = this.state; const parentMethods = { handleAdd: this.handleAdd, handleModalVisible: this.handleModalVisible, @@ -243,9 +250,17 @@ class ResourceList extends PureComponent { > 新建 + - +