Files
Web_Template_Vue3_Dev/AI-Coding/openspec-lite/tasks/add-page.yaml

29 lines
1021 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Task Template: 新增页面 + 路由(轻量版)
# 目标:约束 AI 在本仓库(或迁移后的新仓库)新增页面时的输出与验收。
task:
id: add-page
intent: "新增一个页面,并把路由挂载到 Layout如需要同步 meta 供菜单/面包屑使用)"
inputs:
required:
- module # 例如 goods / userManagement
- page_name # 例如 list / detail
- route_path # 例如 /goods/list
- route_name # 例如 GoodsList
outputs:
files_to_change:
- "src/views/<module>/<page>.vue"
- "src/router/index.ts"
rules:
- "页面文件必须位于 src/views/<module>/ 下"
- "路由必须挂载到 asyncRoutes 的 Layout children除非明确说明是 constantRoutes"
- "如需要菜单展示,必须填写 meta.title如需要图标必须填写 meta.icon"
acceptance:
- "访问 route_path 能渲染页面"
- "刷新后仍可访问(路由可恢复)"
- "若配置 meta菜单/面包屑能展示正确标题"