From f3dc093edfa9dceaab6fe54af44adb7c080127a7 Mon Sep 17 00:00:00 2001 From: lihaoyuan <18278596806@163.com> Date: Sat, 18 Oct 2025 17:19:39 +0800 Subject: [PATCH] =?UTF-8?q?update:=E4=BF=AE=E6=94=B9=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D=E7=BD=AE=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=BC=B9=E5=87=BA=E6=98=BE=E7=A4=BA=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E7=88=B6=E7=BB=84=E4=BB=B6=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=AD=90=E7=BB=84=E4=BB=B6=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/store/storeConf/DbConfigForm.vue | 9 ++++++--- src/views/store/storeConf/index.vue | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/store/storeConf/DbConfigForm.vue b/src/views/store/storeConf/DbConfigForm.vue index 9e46655..cd53f02 100644 --- a/src/views/store/storeConf/DbConfigForm.vue +++ b/src/views/store/storeConf/DbConfigForm.vue @@ -288,13 +288,16 @@ this.$refs.formRef.validate((valid) => { if (valid) { this.$emit('save', this.cloneData(this.innerFormData)) - this.myVisible=false } else { - this.$message.error('请完善表单信息') - return false + this.$message.error('请检查表单信息是否正确或者完整') + return false; } }) }, + // 新增:供父组件调用,手动关闭抽屉 + closeDrawer() { + this.myVisible = false; + } }, } diff --git a/src/views/store/storeConf/index.vue b/src/views/store/storeConf/index.vue index 335bd5d..f5b1d0e 100644 --- a/src/views/store/storeConf/index.vue +++ b/src/views/store/storeConf/index.vue @@ -271,8 +271,10 @@ if (res.status == 200) { this.$message.success('操作成功') this.fetchDbConfigList() + this.$refs.storeConfDrawerRef.closeDrawer(); // 成功:调用子组件关闭抽屉 + }else{ + this.$message.error(res.msg) } - this.drawerVisible = false }, // 处理删除