From b1942b5572c6a91ee6361457315c95b6c5801ae7 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 1 Feb 2024 10:42:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E6=BA=90):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=95=B0=E6=8D=AE=E6=BA=90=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E4=B8=8D=E4=BF=9D=E5=AD=98=E4=BE=9D=E7=84=B6=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/system/datasource/DsFormContent.vue | 8 ++++++++ core/frontend/src/views/system/datasource/DsTable.vue | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/core/frontend/src/views/system/datasource/DsFormContent.vue b/core/frontend/src/views/system/datasource/DsFormContent.vue index 673ae90d30..b142fc2cca 100644 --- a/core/frontend/src/views/system/datasource/DsFormContent.vue +++ b/core/frontend/src/views/system/datasource/DsFormContent.vue @@ -694,6 +694,14 @@ export default { }) }, methods: { + async cancelEdit() { + const params = this.configFromTabs?.id ? this.configFromTabs : this.$route.query + let { id, showModel } = params + await this.getDatasourceDetail(id, showModel) + this.edit(this.params) + this.changeType(true) + this.editDatasource(false) + }, editDatasource(type) { this.$emit('update:canEdit', type) this.disabled = !type diff --git a/core/frontend/src/views/system/datasource/DsTable.vue b/core/frontend/src/views/system/datasource/DsTable.vue index fc316b2572..52092f2995 100644 --- a/core/frontend/src/views/system/datasource/DsTable.vue +++ b/core/frontend/src/views/system/datasource/DsTable.vue @@ -24,7 +24,7 @@ v-if="privileges && canEdit" key="cancel" secondary - @click="editDatasource(false)" + @click="cancelEdit" >{{ $t('commons.cancel') }}