1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-08 11:08:55 +08:00

fix state updating

This commit is contained in:
lana-k
2020-12-24 15:40:54 +01:00
parent 07cc00671f
commit d66eb48088
3 changed files with 12 additions and 9 deletions

View File

@@ -34,7 +34,7 @@
:sql-result="result"
:init-chart="initChart"
ref="chart"
@update="isUnsaved = true"
@update="$store.commit('updateTabState', { index: tabIndex, isUnsaved: true })"
/>
</div>
</template>
@@ -65,7 +65,6 @@ export default {
result: null,
view: 'table',
tableViewHeight: 0,
isUnsaved: !this.initName,
isGettingResults: false,
error: null,
resizeObserver: null
@@ -94,10 +93,7 @@ export default {
}
},
query () {
this.isUnsaved = true
},
isUnsaved () {
this.$store.commit('updateTabState', { index: this.tabIndex, newValue: this.isUnsaved })
this.$store.commit('updateTabState', { index: this.tabIndex, isUnsaved: true })
}
},
methods: {