重构: 应用代码移入 internal/app 包,根目录只留入口

根目录原 7 个 app*.go 平铺,现收进 internal/app/ 子包:
- package main → package app
- NewApp → New(导出)
- startup/shutdown → Startup/Shutdown(导出,供 main.go 引用)
- main.go 改为薄入口,仅导入 internal/app 并装配 Wails

前端同步更新(Wails 绑定路径 go/main → go/app):
- window.go.main.App → window.go.app.App(10 处)
- env.d.ts 类型声明路径 wailsjs/go/main/App → wailsjs/go/app/App

根目录 Go 文件从 7 个减至 1 个(main.go),元文件更清晰
This commit is contained in:
yml2213
2026-07-29 13:27:08 +08:00
parent 5631f579ea
commit 2c88edb741
16 changed files with 31 additions and 29 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import { useToast } from '@/composables/useToast'
const { selectedProductId, selectedProductName, selectedProduct } = useProducts()
const { showToast } = useToast()
const App = window.go.main.App
const App = window.go.app.App
// 状态
const loading = ref(false)