fix: 修复新建项目无响应问题

- 替换 prompt() 为 InputDialog Vue 模态组件
- 替换 alert()/confirm() 为 Electron showMessageBox IPC
- 添加 dialog:showMessage / dialog:showConfirm IPC 通道
This commit is contained in:
gmh01
2026-07-23 19:44:04 +08:00
parent 95116e2338
commit 686d94e178
7 changed files with 180 additions and 14 deletions

View File

@@ -5,7 +5,9 @@ contextBridge.exposeInMainWorld('api', {
selectDirectory: () => ipcRenderer.invoke('dialog:selectDirectory'),
selectFile: (options) => ipcRenderer.invoke('dialog:selectFile', options),
selectIcon: () => ipcRenderer.invoke('dialog:selectIcon'),
saveFile: (options) => ipcRenderer.invoke('dialog:saveFile', options)
saveFile: (options) => ipcRenderer.invoke('dialog:saveFile', options),
showMessage: (options) => ipcRenderer.invoke('dialog:showMessage', options),
showConfirm: (options) => ipcRenderer.invoke('dialog:showConfirm', options)
},
dir: {
readTree: (dirPath) => ipcRenderer.invoke('dir:readTree', dirPath)