Fix: 解决打包后的应用找不到素材的问题

This commit is contained in:
2025-09-10 17:09:13 +08:00
parent 51c66cd498
commit 14148ee1ec
12 changed files with 86 additions and 44 deletions

View File

@ -15,6 +15,8 @@ contextBridge.exposeInMainWorld('electronAPI', {
onPetSelectionChanged: (callback) => {
ipcRenderer.on('pet-selection-changed', (_, fileName) => callback(fileName));
},
getPetFiles: () => ipcRenderer.invoke('get-pet-files'),
getPetUrl: (fileName) => ipcRenderer.invoke('get-pet-url', fileName),
showTooltip: (text) => ipcRenderer.send('show-tooltip', text),
onUpdatePosition: (callback) => {
ipcRenderer.on('update-position', (_, position) => callback(position))