mirror of
https://gitee.com/blossom-editor/blossom.git
synced 2025-12-06 08:48:29 +08:00
fix: 含有二级的菜单项在点击时阻止事件发生
This commit is contained in:
parent
6f39fe9a5f
commit
e7a7413ce9
@ -118,7 +118,7 @@
|
||||
<div v-if="curDoc.ty !== 3" @click="handleShowArticleImportDialog()"><span class="iconbl bl-file-upload-line"></span>导入文章</div>
|
||||
|
||||
<!-- 更多二级菜单 -->
|
||||
<div @mouseenter="handleHoverRightMenuLevel2($event, 2)">
|
||||
<div @mouseenter="handleHoverRightMenuLevel2($event, 2)" data-bl-prevet="true">
|
||||
<span class="iconbl bl-a-rightsmallline-line"></span>
|
||||
<span class="iconbl bl-apps-line"></span>更多
|
||||
<div class="menu-content-level2" :style="rMenuLevel2">
|
||||
@ -147,7 +147,7 @@
|
||||
<div v-if="curDoc.ty === 3" @click="createUrl('tempVisit', true)"><span class="iconbl bl-visit"></span>浏览器临时访问</div>
|
||||
|
||||
<!-- 导出及二级菜单 -->
|
||||
<div v-if="curDoc.ty === 3" @mouseenter="handleHoverRightMenuLevel2($event, 4)">
|
||||
<div v-if="curDoc.ty === 3" @mouseenter="handleHoverRightMenuLevel2($event, 4)" data-bl-prevet="true">
|
||||
<span class="iconbl bl-a-rightsmallline-line"></span>
|
||||
<span class="iconbl bl-file-download-line"></span>导出文章
|
||||
<div class="menu-content-level2" :style="rMenuLevel2">
|
||||
@ -157,7 +157,7 @@
|
||||
<div @click="articleBackup('HTML')"><span class="iconbl bl-HTML"></span>导出为本地 HTML</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="curDoc.ty === 3" @mouseenter="handleHoverRightMenuLevel2($event, 2)">
|
||||
<div v-if="curDoc.ty === 3" @mouseenter="handleHoverRightMenuLevel2($event, 2)" data-bl-prevet="true">
|
||||
<span class="iconbl bl-a-rightsmallline-line"></span>
|
||||
<span class="iconbl bl-a-linkspread-line"></span>复制链接
|
||||
<div class="menu-content-level2" :style="rMenuLevel2">
|
||||
@ -422,7 +422,15 @@ const handleClickRightMenu = (doc: DocTree, event: MouseEvent) => {
|
||||
})
|
||||
}
|
||||
|
||||
const closeTreeDocsMenuShow = () => {
|
||||
const closeTreeDocsMenuShow = (event: MouseEvent) => {
|
||||
if (event.target) {
|
||||
let isPrevent = (event.target as HTMLElement).getAttribute('data-bl-prevet')
|
||||
if (isPrevent === 'true') {
|
||||
event.preventDefault()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
document.body.removeEventListener('click', closeTreeDocsMenuShow)
|
||||
rMenu.value.show = false
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user