feat: 初始化项目结构并添加基础配置
添加前后端基础项目结构,包括.gitignore、package.json等配置文件 实现前端基础功能模块,包括路由、状态管理、API请求封装等 添加前端UI组件库和样式体系 配置开发环境Mock系统和构建工具链
This commit is contained in:
16
front-end/AI-Coding/05-Store.md
Normal file
16
front-end/AI-Coding/05-Store.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# 05. 状态管理(Pinia Store)
|
||||
|
||||
- `src/store/index.ts`:`createPinia()` 与 `app.use(pinia)`
|
||||
- i18n 语言读取:`src/i18n/index.ts` 通过 `useSettingsStore(pinia)` 获取语言
|
||||
|
||||
## AI 提取/迁移注意
|
||||
|
||||
- 迁移 `src/store/index.ts` 时,通常也需要迁移:
|
||||
- `src/store/modules/settings.ts`(见 `12-Settings-Store.md` / `openspec-lite/modules/store-settings.yaml`)
|
||||
- `src/store/modules` 下其它基础模块(见 `14-Store-Modules.md`)
|
||||
- 与其相关的类型(`types/`,即 `/#` 别名指向的目录)
|
||||
|
||||
## 验收点
|
||||
|
||||
- Store 能正常注入
|
||||
- 关键 store(如 settings)能在不报错情况下读取
|
||||
Reference in New Issue
Block a user