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