Skip to content
New issue

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

自定义的右键菜单事件如何调用data里面的数据 #109

Closed
Philxiaobo opened this issue Feb 11, 2020 · 0 comments
Closed

自定义的右键菜单事件如何调用data里面的数据 #109

Philxiaobo opened this issue Feb 11, 2020 · 0 comments

Comments

@Philxiaobo
Copy link

data () {
return {
msg: 'A Tree Plugin For Vue2',
searchText: '',
editingItem: {},
editingNode: null,
itemEvents: {
mouseover: function () {
console.log('mouseover')
},
contextmenu: function () {
如何在这个函数里访问msg变量
console.log(arguments[2])
arguments[2].preventDefault()
console.log('contextmenu')
}
},
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant