From 62663b84495cd34b7da135ac3d233725e6c52b08 Mon Sep 17 00:00:00 2001 From: kclf <1195754634@qq.com> Date: Tue, 6 Dec 2022 11:59:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E5=B9=B2=E4=BF=9D=E7=95=99=E4=B8=80?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/vote/CreateVote.vue | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/components/vote/CreateVote.vue b/src/components/vote/CreateVote.vue index 7105db41..41e86aaa 100644 --- a/src/components/vote/CreateVote.vue +++ b/src/components/vote/CreateVote.vue @@ -264,15 +264,17 @@ export default { }; const handleDel = ({ id, curItem }) => { - // 接口删除 - if (curItem.voteStemId) { - api.deleteVoteStem(curItem.voteStemId).then((res) => { - if (res.data.code === 200) { - virtualDel(id); - } - }); - } else { - virtualDel(id); + if (state.allFormsData.length > 1) { + // 接口删除 + if (curItem.voteStemId) { + api.deleteVoteStem(curItem.voteStemId).then((res) => { + if (res.data.code === 200) { + virtualDel(id); + } + }); + } else { + virtualDel(id); + } } }; const virtualDel = (id) => {