fix(数据源): 修改数据源数据库不保存依然可以变更数据
This commit is contained in:
parent
328026ba2c
commit
b1942b5572
@ -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
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
v-if="privileges && canEdit"
|
||||
key="cancel"
|
||||
secondary
|
||||
@click="editDatasource(false)"
|
||||
@click="cancelEdit"
|
||||
>{{ $t('commons.cancel') }}
|
||||
</deBtn>
|
||||
<deBtn
|
||||
@ -109,6 +109,10 @@ export default {
|
||||
this.$refs.DsFormContent.editDatasource(type)
|
||||
this.canEdit = type
|
||||
},
|
||||
cancelEdit() {
|
||||
this.$refs.DsFormContent.cancelEdit()
|
||||
this.canEdit = false
|
||||
},
|
||||
validaDatasource() {
|
||||
this.$refs.DsFormContent.validaDatasource()
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user