From 4ffa30e31a018862e068ea3458a117e4c97a1ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?pixel=28=E5=A5=87=E6=B7=BC?= <303176530@qq.com> Date: Sun, 27 Oct 2024 10:21:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0AI=E7=94=9F=E6=88=90?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E7=9A=84=E7=A1=AE=E8=AE=A4=E8=A1=8C=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/view/systemTools/autoCode/index.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web/src/view/systemTools/autoCode/index.vue b/web/src/view/systemTools/autoCode/index.vue index 2342ce425..55cd21116 100644 --- a/web/src/view/systemTools/autoCode/index.vue +++ b/web/src/view/systemTools/autoCode/index.vue @@ -849,6 +849,18 @@ const llmAutoFunc = async (flag) =>{ ElMessage.error('请输入描述') return } + + if(form.value.fields.length>0){ + const res = await ElMessageBox.confirm('AI生成会清空当前数据,是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + if (res !== 'confirm') { + return + } + } + const res = await llmAuto({prompt:flag?'结构体名称为'+form.value.structName:prompt.value}) if (res.code === 0) { form.value.fields = []