fix:修复查看模式ESC与dialog冲突

This commit is contained in:
zyh
2022-06-01 18:00:13 +08:00
parent 90b1c8ee73
commit 155486ba2e
2 changed files with 14 additions and 1 deletions

View File

@@ -41,6 +41,10 @@
}
}
}
.right-box.right-box-chart{
top: 0px;
height: 100%;
}
}
}
.home.se{

View File

@@ -942,8 +942,17 @@ export default {
nowTimeType: this.nowTimeType
})
},
// 按ESC退出查看模式
// 按ESC退出查看模式
escExit (e) {
const message = document.querySelectorAll('.el-message-box__wrapper')
const showMessage = message.length && Array.from(message).some(item => {
return item.style.display !== 'none'
})
const showFullscreen = document.querySelector('.chart-fullscreen')
// 防止ESC键冲突
if (showMessage || showFullscreen) {
return false
}
if (e.keyCode === 27 && this.mode) {
// 默认模式
this.mode = ''