修改苏电院交控线路顶部菜单展开后没法收回去问题

This commit is contained in:
dong 2023-04-17 14:40:39 +08:00
parent 0d50ac586b
commit 1f5d891c55
4 changed files with 24 additions and 0 deletions

View File

@ -58,7 +58,16 @@ export default {
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar'); this.$store.dispatch('config/updateMenuBar');
const _that = this;
window.onclick = function (e) {
if (!_that.$store.state.training.trainingStart) {
_that.$refs.menuBar && _that.$refs.menuBar.blankClickClose();
}
};
}); });
},
beforeDestroy() {
window.onclick = function (e) {};
} }
}; };
</script> </script>

View File

@ -372,6 +372,9 @@ export default {
this.$refs.helpAbout.doShow(operate); this.$refs.helpAbout.doShow(operate);
} }
}); });
},
blankClickClose() {
this.$refs.menuBar.doClose();
} }
} }
}; };

View File

@ -33,7 +33,16 @@ export default {
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar'); this.$store.dispatch('config/updateMenuBar');
const _that = this;
window.onclick = function (e) {
if (!_that.$store.state.training.trainingStart) {
_that.$refs.menuBar && _that.$refs.menuBar.blankClickClose();
}
};
}); });
},
beforeDestroy() {
window.onclick = function (e) {};
} }
}; };
</script> </script>

View File

@ -328,6 +328,9 @@ export default {
this.$refs.helpAbout.doShow(operate); this.$refs.helpAbout.doShow(operate);
} }
}); });
},
blankClickClose() {
this.$refs.menuBar.doClose();
} }
} }
}; };