This commit is contained in:
2025-09-01 14:48:58 +08:00
parent 529886cd66
commit 35dd9b33a3
5 changed files with 2855 additions and 12639 deletions

View File

@@ -137,6 +137,7 @@ export default {
...mapGetters(['isTop'])
},
beforeDestroy () {
document.removeEventListener('keydown', this.handleKeydown);
if (this.intervalId) {
clearTimeout(this.intervalId)
}
@@ -149,9 +150,17 @@ export default {
this.$nextTick(() => {
this.initGuide()
})
document.addEventListener('keydown', this.handleKeydown);
},
methods: {
/* eslint-disable */
handleKeydown(event) {
// 仅在对话框可见时响应Enter键
if (this.dialogVisible && event.key === 'Enter') {
event.preventDefault(); // 阻止默认行为
this.stationConfirm();
}
},
initGuide() {
const config = {
// allowClose: false,