标签:null func pup ssh app logs als nbsp nms
1、引入模块 const Electron = require(‘electron‘); const remote = Electron.remote; const Menu = remote.Menu; const MenuItem = remote.MenuItem; 2、 data() { return { isShowMember:false, menu:null, } }, created() { this.targetId = this.id; notificationCenter.on("onClosePop", this.onClosePop); this.initMenu(); }, 3、methods: { //初始化右键菜单 initMenu(){ this.menu = new Menu(); let that = this; this.menu.append(new MenuItem({ label: ‘删除‘, click: function() { //删除本地文件. that.imServices.deleteLocationMsgFiles(that.rightMessage); //删除消息 that.imServices.removeMessages(that.rightMessage.peer, that.rightMessage.msgID); that.rightMenuMsg(that.rightMessage); } })); }, rightShow(item) { this.rightMessage = item; this.menu.popup(remote.getCurrentWindow()); },
标签:null func pup ssh app logs als nbsp nms
原文地址:http://www.cnblogs.com/sxz2008/p/7529055.html