docs: update LLM guides for completed architecture phase
Refresh the development guidance to point to layered src GUIDE files and document Phase 4 completion, including AppShell extraction and page driver/component adoption for non-maintenance pages.docs: update LLM guides for completed architecture phase Refresh the development guidance to point to layered src GUIDE files and document Phase 4 completion, including AppShell extraction and page driver/component adoption for non-maintenance pages.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# Components Guide
|
||||
|
||||
`components` 放 Vue UI 元件。元件以 props 接收資料,以 emits 回報事件;不要直接處理 route、HTTP client、token/session 或全域流程。
|
||||
|
||||
## 分層
|
||||
|
||||
- `pages/`:完整頁面組裝,檔名使用 `Page` 前綴。
|
||||
- `sections/`:頁面區塊容器,例如搜尋區、表格、dialog shell、panel。
|
||||
- `items/`:單筆資料、欄位群組或原子級呈現。
|
||||
- `layouts/`:app shell layout。詳見 `src/components/layouts/GUIDE.md`。
|
||||
- `base/`:真正跨頁共用且不屬於特定 domain 的基礎元件。
|
||||
- `login/`:登入頁專用 UI。
|
||||
- `maint/`:maintenance demo 舊有或領域型 UI 元件。
|
||||
|
||||
## 規則
|
||||
|
||||
- 不假設元件全域註冊;使用時明確 import。
|
||||
- route component 放在 `views`,不要放在 `components`。
|
||||
- `pages` 可組合 sections/items,但不直接處理 API。
|
||||
- `sections` 決定布局與區塊互動,不知道 route。
|
||||
- `items` 不知道自己在表格、grid 或 dialog 中。
|
||||
- 只服務單一 domain 的元件放在 domain/feature 目錄,不放進 `base`。
|
||||
|
||||
## 命名
|
||||
|
||||
- Page component:`PageXxx.vue`
|
||||
- Section component:`SectionXxx.vue`
|
||||
- Item component:`ItemXxx.vue`
|
||||
- Layout component:依 shell/區塊命名,例如 `MainLayout.vue`
|
||||
Reference in New Issue
Block a user