feat: 提交多个新UI组件模块spec和相关属性设定,包括卡片封装、渐变卡片、列式布局组件等,重写了readme.md,用于AI Coding
Some checks are pending
Call HTTPS API / build (push) Waiting to run
Some checks are pending
Call HTTPS API / build (push) Waiting to run
This commit is contained in:
30
AI-Coding/openspec-lite/modules/vab-search.yaml
Normal file
30
AI-Coding/openspec-lite/modules/vab-search.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
# Module Spec:vab-search(菜单搜索:Ctrl/⌘+K)
|
||||
|
||||
module:
|
||||
id: vab-search
|
||||
name: VabSearch(菜单搜索)
|
||||
type: ui
|
||||
entrypoints:
|
||||
- library/components/VabSearch/index.vue
|
||||
|
||||
public_api:
|
||||
concept:
|
||||
- "通过 Ctrl/⌘+K 或点击图标打开搜索面板(teleport 到 body)"
|
||||
- "从 routes store 的 getRoutes 平铺菜单项并模糊搜索"
|
||||
- "维护本地搜索历史 localStorage(key=vab_search_history)"
|
||||
|
||||
dependency_closure:
|
||||
runtime:
|
||||
- "store-routes:getRoutes(菜单路由来源)"
|
||||
- "vue-router:useRouter(router.push 内链跳转)"
|
||||
- "浏览器 API:window.addEventListener('keydown'), navigator.userAgent, localStorage"
|
||||
- "VabIcon:搜索图标与历史删除图标"
|
||||
|
||||
acceptance:
|
||||
- "Ctrl/⌘+K 可打开/关闭面板(Escape 关闭)"
|
||||
- "输入关键字能过滤菜单并 Enter 跳转"
|
||||
- "搜索历史能写入/删除/清空"
|
||||
|
||||
pitfalls:
|
||||
- "该组件包含较多样式与 DOM 交互(teleport/fixed mask);抽取到新项目需确保全局样式/层级不冲突"
|
||||
- "菜单来源依赖 routes store 已完成 setRoutes;否则列表为空"
|
||||
Reference in New Issue
Block a user