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) => {