fix:修复查看模式ESC与dialog冲突
This commit is contained in:
@@ -41,6 +41,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.right-box.right-box-chart{
|
||||||
|
top: 0px;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.home.se{
|
.home.se{
|
||||||
|
|||||||
@@ -942,8 +942,17 @@ export default {
|
|||||||
nowTimeType: this.nowTimeType
|
nowTimeType: this.nowTimeType
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 按ESC退出查看模式
|
// 按ESC键退出查看模式
|
||||||
escExit (e) {
|
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) {
|
if (e.keyCode === 27 && this.mode) {
|
||||||
// 默认模式
|
// 默认模式
|
||||||
this.mode = ''
|
this.mode = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user