docs: clarify optional page drivers in page guide
Update documentation to show that simple pages can define page models directly in views without creating a page driver. Adjust examples, section numbering, and naming guidance to better distinguish simple view state from reusable page-driver patterns.docs: clarify optional page drivers in page guide Update documentation to show that simple pages can define page models directly in views without creating a page driver. Adjust examples, section numbering, and naming guidance to better distinguish simple view state from reusable page-driver patterns.
This commit is contained in:
+1
-1
@@ -76,7 +76,7 @@ router -> AppShell -> layout -> view(Page Driver) -> Page Component -> Section -
|
||||
|
||||
1. 新增或修改 `views/*` route entry。
|
||||
2. 若有完整頁面 UI,新增 `components/pages/PageXxx.vue`。
|
||||
3. 若有頁面資料協調或 route param 轉換,新增 `composables/page-drivers/useXxxPage.ts`。
|
||||
3. 若有複雜的資料協調(多 composable、搜尋狀態、CRUD flow、dialog 狀態),新增 `composables/page-drivers/useXxxPage.ts`。簡單頁面直接在 view 用 `computed` 組裝 page model。
|
||||
4. 若畫面有獨立區塊,拆到 `components/sections/*`。
|
||||
5. 若區塊內有欄位群組或單筆資料呈現,拆到 `components/items/*`。
|
||||
6. 跨頁共享狀態才新增或修改 `stores/*`。
|
||||
|
||||
Reference in New Issue
Block a user