fix(components): fix tags contenxtmenu

ISSUES CLOSED: #23
This commit is contained in:
张传龙 2022-08-18 10:56:28 +08:00
parent ddf14053da
commit 30c375cc1d
2 changed files with 3 additions and 11 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<n-dropdown <n-dropdown
:show="dropdownShow" :show="show"
:options="options" :options="options"
:x="x" :x="x"
:y="y" :y="y"
@ -72,15 +72,6 @@ const options = computed(() => [
}, },
]) ])
const dropdownShow = computed({
get() {
return props.show
},
set(show) {
emit('update:show', show)
},
})
const actionMap = new Map([ const actionMap = new Map([
[ [
'reload', 'reload',
@ -115,7 +106,7 @@ const actionMap = new Map([
]) ])
function handleHideDropdown() { function handleHideDropdown() {
dropdownShow.value = false emit('update:show', false)
} }
function handleSelect(key) { function handleSelect(key) {

View File

@ -15,6 +15,7 @@
</ScrollX> </ScrollX>
<ContextMenu <ContextMenu
v-if="contextMenuOption.show"
v-model:show="contextMenuOption.show" v-model:show="contextMenuOption.show"
:current-path="contextMenuOption.currentPath" :current-path="contextMenuOption.currentPath"
:x="contextMenuOption.x" :x="contextMenuOption.x"