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') }}