We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
list 中每个 item 都注册了 menu,右键某一条菜单出来的时候,隐藏掉其它的菜单
list 中每个 item 都注册了 menu,右键某一条菜单出来的时候,其它菜单没有隐藏掉
The text was updated successfully, but these errors were encountered:
visible (value) { const elm = document.querySelector(this.containerSelector)
if (value) { this.$emit('show', this) elm.addEventListener('click', this.handleBodyClick) } else { this.$emit('hide', this) elm.removeEventListener('click', this.handleBodyClick) } }
click 改为 mousedown 就可以了
Sorry, something went wrong.
`/* eslint-disable no-param-reassign */ export default { // 之所以用 inserted 而不是 bind,是需要确保 contentmenu mounted 后才进行 addRef 操作 inserted (el, binding, vnode) { const contextmenu = vnode.context.$refs[binding.arg]
contextmenu.addRef({ el, vnode }) contextmenu.$contextmenuId = el.id || contextmenu._uid // eslint-disable-line no-underscore-dangle
} }` 这里id注入有可能有问题的会,menu的渲染先于此注入,showAll 那个注册就是 undefined 给contextMenu 传入一个key 嘛~~
No branches or pull requests
期望结果
list 中每个 item 都注册了 menu,右键某一条菜单出来的时候,隐藏掉其它的菜单
实际结果
list 中每个 item 都注册了 menu,右键某一条菜单出来的时候,其它菜单没有隐藏掉
复现步骤
删除The text was updated successfully, but these errors were encountered: