feat(stores): add Pinia domain stores and update docs
Implement concrete Pinia stores for app UI and domain data instead of placeholder re-exports, including seeded student records and snackbar state. Refresh README guidance for components, plugins, and services to document the current project structure, data flow, and usage conventions.feat(stores): add Pinia domain stores and update docs Implement concrete Pinia stores for app UI and domain data instead of placeholder re-exports, including seeded student records and snackbar state. Refresh README guidance for components, plugins, and services to document the current project structure, data flow, and usage conventions.
This commit is contained in:
+14
-1
@@ -1,3 +1,16 @@
|
||||
# Plugins
|
||||
|
||||
Plugins are a way to extend the functionality of your Vue application. Use this folder for registering plugins that you want to use globally.
|
||||
`src/plugins` 負責集中註冊全域 Vue plugin。`src/main.ts` 只需要呼叫 `registerPlugins(app)`。
|
||||
|
||||
## 目前檔案
|
||||
|
||||
- `index.ts`:統一註冊 Vuetify、Pinia、Vue I18n 與 Vue Router。
|
||||
- `vuetify.ts`:建立 Vuetify instance,設定 MDI SVG icon set 與預設 theme。
|
||||
- `i18n.ts`:建立 Vue I18n instance,載入 `src/language/en-US.json` 與 `src/language/zh-TW.json`。
|
||||
|
||||
## 使用規則
|
||||
|
||||
- 新增需要 app-wide 安裝的 plugin 時,先建立獨立設定檔,再在 `index.ts` 註冊。
|
||||
- 不要在 view 或 component 內重複安裝 plugin。
|
||||
- Vuetify theme 設定放在 `src/styles/themes.ts`,不要直接塞在 component。
|
||||
- 語系文字放在 `src/language/*.json`,不要散落在 plugin 設定檔。
|
||||
|
||||
Reference in New Issue
Block a user