From c88074959a31a708143e4ffc23b11829cbd06f47 Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 29 Jul 2020 22:05:40 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E4=BC=98=E5=8C=96=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=85=8B=E9=9A=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/deploy/app/CloneConfirm.js | 1 + spug_web/src/pages/deploy/app/Table.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/spug_web/src/pages/deploy/app/CloneConfirm.js b/spug_web/src/pages/deploy/app/CloneConfirm.js index 1d37797..c36eb60 100644 --- a/spug_web/src/pages/deploy/app/CloneConfirm.js +++ b/spug_web/src/pages/deploy/app/CloneConfirm.js @@ -49,6 +49,7 @@ class CloneConfirm extends React.Component { diff --git a/spug_web/src/pages/deploy/app/Table.js b/spug_web/src/pages/deploy/app/Table.js index 3f529fb..1836284 100644 --- a/spug_web/src/pages/deploy/app/Table.js +++ b/spug_web/src/pages/deploy/app/Table.js @@ -18,7 +18,7 @@ import lds from 'lodash'; class ComTable extends React.Component { constructor(props) { super(props); - this.cloneObj = {}; + this.cloneObj = null; } componentDidMount() { @@ -60,11 +60,16 @@ class ComTable extends React.Component { handleClone = (e, id) => { e.stopPropagation(); + this.cloneObj = null; Modal.confirm({ icon: 'exclamation-circle', title: '选择克隆对象', content: this.cloneObj = v[1]}/>, onOk: () => { + if (!this.cloneObj) { + message.error('请选择目标应用及环境') + return Promise.reject() + } const info = JSON.parse(this.cloneObj); store.showExtForm(null, id, info, true) },