设置右键菜单

const {remote} = require('electron') var rightTemplate = [     {         label:"粘贴" ,           accelerator:'ctrl+c', // 增加快捷键     },     {         label:"复制",           accelerator:'ctrl+v', // 增加快捷键     } ]
var m = remote.Menu.buildFromTemplate(rightTemplate) // 右键打开菜单 window.addEventListener('contextmenu',(e) => {    e.preventDefault()    m.popup({        window:remote.getCurrentWindow()    }) })
上一篇:上传本地代码到远程仓库 , updates were rejected because the remote contains work .. refusing to merge unrelated.


下一篇:Qt6 QML Book/网络设置/通过HTTP为用户界面提供服务