自定义的右键菜单事件如何调用data里面的数据
Philxiaobo opened this issue · comments
xiaobo commented
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')
}
},
}