|
@@ -1113,7 +1113,7 @@
|
|
|
}
|
|
}
|
|
|
})">关闭</el-button>
|
|
})">关闭</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-image-viewer v-if="imageShow" :url-list="[imageUrl]" @close="imageShow = false" />
|
|
|
|
|
|
|
+ <el-image-viewer v-if="imageShow" :url-list="[imageUrl]" @close="imageShow = false" hide-on-click-modal />
|
|
|
<el-dialog :close-on-click-modal="false" title="文件预览" v-model="fileShow">
|
|
<el-dialog :close-on-click-modal="false" title="文件预览" v-model="fileShow">
|
|
|
<vue-office-docx :src="fileUrl" style="height: 600px; margin: 0; padding: 0"></vue-office-docx>
|
|
<vue-office-docx :src="fileUrl" style="height: 600px; margin: 0; padding: 0"></vue-office-docx>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -1611,9 +1611,13 @@ const handleAudit = (type) => {
|
|
|
|
|
|
|
|
let isShow = ref('0')
|
|
let isShow = ref('0')
|
|
|
|
|
|
|
|
-// 键盘事件处理
|
|
|
|
|
|
|
+// 键盘事件处理(使用事件捕获,优先于 el-image-viewer 内部监听器执行)
|
|
|
const handleKeydown = (event) => {
|
|
const handleKeydown = (event) => {
|
|
|
if (event.key === 'Escape') {
|
|
if (event.key === 'Escape') {
|
|
|
|
|
+ // 如果图片预览打开中,只关闭图片,不触发页面跳转
|
|
|
|
|
+ if (imageShow.value) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
myRouter.push({
|
|
myRouter.push({
|
|
|
path: previousRoute.value,
|
|
path: previousRoute.value,
|
|
|
query: {
|
|
query: {
|
|
@@ -1632,13 +1636,13 @@ onMounted(() => {
|
|
|
isShow.value = myRoute.query.isShow
|
|
isShow.value = myRoute.query.isShow
|
|
|
initDetail();
|
|
initDetail();
|
|
|
initOption();
|
|
initOption();
|
|
|
- // 添加键盘事件监听器
|
|
|
|
|
- window.addEventListener('keydown', handleKeydown)
|
|
|
|
|
|
|
+ // 添加键盘事件监听器(使用事件捕获,优先于 el-image-viewer 内部监听器执行)
|
|
|
|
|
+ window.addEventListener('keydown', handleKeydown, true)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
|
// 移除键盘事件监听器
|
|
// 移除键盘事件监听器
|
|
|
- window.removeEventListener('keydown', handleKeydown)
|
|
|
|
|
|
|
+ window.removeEventListener('keydown', handleKeydown, true)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|
|
@@ -2169,4 +2173,4 @@ onUnmounted(() => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|