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,32 @@
|
||||
# Views Guide
|
||||
|
||||
`views` 是 route entry。View 應維持薄層,負責掛載 page driver 與 page component,不承載大段 UI、dialog、表單欄位或 store mutation 細節。
|
||||
|
||||
## 規則
|
||||
|
||||
- 使用 `<script setup lang="ts">`。
|
||||
- 直接 route component 放在 `src/views` 或 `src/views/<feature>`。
|
||||
- 一般 view 目標 < 80 行。
|
||||
- route params/query 的解析可在 view 做簡單轉換;超過簡單轉換時放進 page driver。
|
||||
- 不直接 import 或包住 `MainLayout.vue`。
|
||||
- 不直接定義大型 `<v-dialog>`、`<v-overlay>`、大型表格或大型表單。
|
||||
|
||||
## 建議形狀
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
import PageReports from '@/components/pages/PageReports.vue'
|
||||
import { useReportsPage } from '@/composables/page-drivers/useReportsPage'
|
||||
|
||||
const page = useReportsPage()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<PageReports :page="page.pageModel.value" />
|
||||
</template>
|
||||
```
|
||||
|
||||
## 子目錄
|
||||
|
||||
- `views/maint` 是 maintenance demo route entry。詳見 `src/views/maint/GUIDE.md`。
|
||||
- `views/errors` 是錯誤頁入口,通常使用 `meta.layout = 'none'`。
|
||||
Reference in New Issue
Block a user