From 1a67732f77de8afd138b6e75235edcc4c0e9a166 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 16 一月 2020 23:29:57 +0800 Subject: [PATCH] 2020-01-16 --- src/templates/subtableconfig/index.jsx | 31 +++++++++++++------------------ 1 files changed, 13 insertions(+), 18 deletions(-) diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx index e2196ff..c3fe1aa 100644 --- a/src/templates/subtableconfig/index.jsx +++ b/src/templates/subtableconfig/index.jsx @@ -314,7 +314,7 @@ this.setState({ modaltype: type === 'copy' ? 'actionCopy' : 'actionEdit', card: card, - formlist: getActionForm(card, functip, this.state.config, this.props.permFuncField, 'subtable') + formlist: getActionForm(card, functip, this.state.config, this.props.permFuncField) }) } @@ -1033,16 +1033,15 @@ } }) - let refreshtype = element.type + 'loading' + // 鍒犻櫎鎸夐挳鍏冪礌 + let _delActions = _this.state.delActions + if (element.type === 'action') { + _delActions.push(element.card.uuid) + } _this.setState({ config: _config, - delActions: [..._this.state.delActions, element.card.uuid], - [refreshtype]: true - }, () => { - _this.setState({ - [refreshtype]: false - }) + delActions: _delActions }) }, onCancel() {} @@ -1564,17 +1563,13 @@ } this.setState({ - [addType + 'loading']: true, config: {...config, [addType]: items} - }, () => { - notification.success({ - top: 92, - message: '鎿嶄綔鎴愬姛', - duration: 2 - }) - this.setState({ - [addType + 'loading']: false - }) + }) + + notification.success({ + top: 92, + message: '鎿嶄綔鎴愬姛', + duration: 2 }) } -- Gitblit v1.8.0