()
| 335 | |
| 336 | // 安装更新 |
| 337 | const installUpdate = async () => { |
| 338 | try { |
| 339 | console.log('开始安装更新...') |
| 340 | await window.api.updater.quitAndInstall() |
| 341 | } catch (error) { |
| 342 | console.error('安装更新失败:', error) |
| 343 | notification.error({ |
| 344 | message: '安装失败', |
| 345 | description: '更新安装失败,请稍后重试', |
| 346 | duration: 5 |
| 347 | }) |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | // 这个组件不渲染任何可见内容,只处理通知逻辑 |
| 352 | return null |
no outgoing calls
no test coverage detected