Ele_0002:获取当前启动exe所在目录地址 穿透效果
1,获取当前启动exe所在目录地址
a = path.join(process.cwd(),"/resources/app/modelconvert64.exe ")
2, 穿透效果
让透明的窗口可点击穿透(鼠标事件作用于原生桌面) setIgnoreMouseEvents 设置为 true win.setIgnoreMouseEvents(true) 实现部分区域不可穿透 // shareWin.vue const win = window.require('@electron/remote').getCurrentWindow(); let el = document.getElementById('share_tips'); el.addEventListener('mouseenter', () => { win.setIgnoreMouseEvents(false); }); el.addEventListener('mouseleave', () => { win.setIgnoreMouseEvents(true, { forward: true }); });
琥珀君的博客