This repository has been archived on 2025-01-09. You can view files and clone it, but cannot push or open issues or pull requests.
2025-01-09 18:30:49 +08:00

18 lines
457 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const { ipcRenderer } = require('electron')
window.onload = () => {
// 先获取元素
let oBtn = document.getElementById('btn')
oBtn.addEventListener('click', () => {
ipcRenderer.send('openWin2', '来自于 index 进程')
// 打开窗口2之后保存数据至。。。
// localStorage.setItem('name', '啦啦啦啦')
})
// 接受消息
ipcRenderer.on('mti', (_, data) => {
alert(data)
})
}