1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat: new unsaved change reminder

This commit is contained in:
2021-07-16 23:24:55 +02:00
parent 003c02b1fb
commit f7a74df009
7 changed files with 76 additions and 52 deletions

View File

@ -137,7 +137,6 @@ export default {
},
data () {
return {
tabUid: 'prop', // ???
isLoading: false,
isSaving: false,
isOptionsModal: false,
@ -164,6 +163,9 @@ export default {
workspace () {
return this.getWorkspace(this.connection.uid);
},
tabUid () {
return this.$vnode.key;
},
tableOptions () {
const db = this.workspace.structure.find(db => db.name === this.schema);
return db && this.table ? db.tables.find(table => table.name === this.table) : {};
@ -207,8 +209,7 @@ export default {
}
},
isChanged (val) {
if (this.isSelected && this.lastTable === this.table && this.table !== null)
this.setUnsavedChanges(val);
this.setUnsavedChanges({ uid: this.connection.uid, tUid: this.tabUid, isChanged: val });
}
},
created () {