fix: fix issue of empty Screws tilt adjust helper dialog (#1329)
This commit is contained in:
1 parent
ec1b32eaaf
commit
44f4079dac
2 files changed
+7
-7
No files matched your search
@@ -22,7 +22,10 @@
|
||||
<v-card-text v-if="Object.keys(results).length">
|
||||
<template v-for="(result, name, index) of results">
|
||||
<v-divider v-if="index" :key="`result-divider-${name}`" class="my-1" />
|
||||
<the-screws-tilt-adjust-dialog-entry :key="`result-${name}`" :name="name" :result="result" />
|
||||
<the-screws-tilt-adjust-dialog-entry
|
||||
:key="`result-${name}-${name}`"
|
||||
:name="name"
|
||||
:result="result" />
|
||||
</template>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
@@ -50,14 +53,11 @@ import TheScrewsTiltAdjustDialogEntry from '@/components/dialogs/TheScrewsTiltAd
|
||||
export default class TheScrewsTiltAdjustDialog extends Mixins(BaseMixin, ControlMixin) {
|
||||
mdiArrowCollapseDown = mdiArrowCollapseDown
|
||||
mdiCloseThick = mdiCloseThick
|
||||
get state() {
|
||||
return this.$store.state.printer.screws_tilt_adjust ?? {}
|
||||
}
|
||||
get error() {
|
||||
return this.state.error ?? false
|
||||
return this.$store.state.printer.screws_tilt_adjust?.error ?? false
|
||||
}
|
||||
get results() {
|
||||
return this.state.results ?? {}
|
||||
return this.$store.state.printer.screws_tilt_adjust?.results ?? {}
|
||||
}
|
||||
get showDialog() {
|
||||
return this.error || Object.keys(this.results).length
|
||||
|
||||
@@ -61,6 +61,6 @@ export const mutations: MutationTree<PrinterState> = {
|
||||
|
||||
clearScrewsTiltAdjust(state) {
|
||||
Vue.set(state.screws_tilt_adjust, 'error', false)
|
||||
Vue.set(state.screws_tilt_adjust, 'results', [])
|
||||
Vue.set(state.screws_tilt_adjust, 'results', {})
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user