调整项目结构:前端和 Electron 核心
This commit is contained in:
6
main/preload.js
Normal file
6
main/preload.js
Normal file
@ -0,0 +1,6 @@
|
||||
const { contextBridge, ipcRenderer } = require('electron')
|
||||
|
||||
contextBridge.exposeInMainWorld('electronAPI', {
|
||||
playSound: (file) => ipcRenderer.send('play-sound', file),
|
||||
showTooltip: (text) => ipcRenderer.send('show-tooltip', text)
|
||||
})
|
Reference in New Issue
Block a user