Files

31 lines
1.1 KiB
YAML
Raw Permalink 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.
# Module Specvab-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-routesgetRoutes菜单路由来源"
- "vue-routeruseRouterrouter.push 内链跳转)"
- "浏览器 APIwindow.addEventListener('keydown'), navigator.userAgent, localStorage"
- "VabIcon搜索图标与历史删除图标"
acceptance:
- "Ctrl/⌘+K 可打开/关闭面板Escape 关闭)"
- "输入关键字能过滤菜单并 Enter 跳转"
- "搜索历史能写入/删除/清空"
pitfalls:
- "该组件包含较多样式与 DOM 交互teleport/fixed mask抽取到新项目需确保全局样式/层级不冲突"
- "菜单来源依赖 routes store 已完成 setRoutes否则列表为空"