From 4df1c19e81608c0a3cfae60f2e764bd9b9676e9f Mon Sep 17 00:00:00 2001 From: "meilin.huang" <954537473@qq.com> Date: Thu, 3 Nov 2022 14:05:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dsetup=E5=AF=BC?= =?UTF-8?q?=E8=87=B4open=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mayfly_go_web/src/views/ops/db/component/SqlExecBox.ts | 2 +- .../src/views/ops/db/component/SqlExecDialog.vue | 5 ++++- server/internal/db/application/db_sql_exec.go | 10 +++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/mayfly_go_web/src/views/ops/db/component/SqlExecBox.ts b/mayfly_go_web/src/views/ops/db/component/SqlExecBox.ts index 3dd9773b..1925bdbc 100644 --- a/mayfly_go_web/src/views/ops/db/component/SqlExecBox.ts +++ b/mayfly_go_web/src/views/ops/db/component/SqlExecBox.ts @@ -34,7 +34,7 @@ const SqlExecBox = (props: SqlExecProps): void => { if (boxInstance) { const boxVue = boxInstance.component // 调用open方法显示弹框,注意不能使用boxVue.ctx来调用组件函数(build打包后ctx会获取不到) - boxVue.proxy.open(props); + boxVue.exposed.open(props); } else { boxInstance = renderBox() SqlExecBox(props) diff --git a/mayfly_go_web/src/views/ops/db/component/SqlExecDialog.vue b/mayfly_go_web/src/views/ops/db/component/SqlExecDialog.vue index da2c7ea0..6f91e23e 100644 --- a/mayfly_go_web/src/views/ops/db/component/SqlExecDialog.vue +++ b/mayfly_go_web/src/views/ops/db/component/SqlExecDialog.vue @@ -70,7 +70,7 @@ const { dialogVisible, sqlValue, remark, - btnLoading + btnLoading, } = toRefs(state) state.sqlValue = props.sql as any; @@ -146,6 +146,9 @@ const open = (props: SqlExecProps) => { }); }); }; + +defineExpose({ open }) +