仓库自包含化:CI/文档/规范入库,升级 echarts,填关于页链接
CI / test (push) Successful in 53s
Release / release (push) Successful in 32s

This commit is contained in:
2026-07-09 19:05:28 +08:00
parent db45a669e3
commit 9d0c116ce3
31 changed files with 2235 additions and 71 deletions
+5
View File
@@ -0,0 +1,5 @@
# API 层与状态管理规范
- 所有请求经统一 request 封装(`src/api/request`):注入 JWT、401 统一跳登录、错误统一提示;组件内不直接 `fetch`/裸 axios。
- 跨页面共享状态才进 Pinia;页面内状态用 `ref`/`computed` 就地管理,不把一切塞 store。
- 请求函数返回类型化数据(`Promise<Instance[]>`),错误向上抛由封装层兜底,不在每个调用点重复 try/catch。