Files
AIAgentPrompt/Frontend_electron_vite.md
2026-04-09 19:42:13 +08:00

33 lines
942 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 技术栈和限制
- 运行时Electron
- 语言Typescript
- 框架: Vue 3 (Composition API, 使用 setup 语法糖)
- 辅助开发unplugin-auto-import, unplugin-vue-components
- 样式Less, TDesign
- 状态Pinia v3
- 路由Vue Router v4
- 通信Axios
## 项目结构
```
src/
main/ # electron 进程代码
renderer/ # Vue3 + Vite + TDesign 前端渲染代码
api/ # 与后端对接的 HTTP 通信,使用 axios
assets/ # 静态资源文件
components/ # 通用组件
layout/ # 界面布局组件
router/ # 页面路由
type/ # Typescript 类型
store/ # Pinia 储存
views/ # 路由页面
Root.vue
main.ts
```
## Electron 约束
- 校验代码不要主动执行构建 Electron 生产产物,这非常耗时,只需开发环境校验即可