Files
Web_Template_Vue3_Dev/AI-Coding/openspec-lite/modules/layouts.yaml

41 lines
1.7 KiB
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.
# Module Speclayouts布局体系
module:
id: layouts
name: 布局体系Layout Shell + 多布局实现)
type: ui
entrypoints:
- library/layouts/index.vue
- library/layouts/VabLayoutVertical/
- library/layouts/VabLayoutHorizontal/
- library/layouts/VabLayoutCommon/
- library/layouts/VabLayoutComprehensive/
- library/layouts/VabLayoutFloat/
- library/layouts/VabLayoutColumn/
public_api:
concept:
- "通过 theme.layout 选择渲染的布局组件:<component :is=\"'vab-layout-' + theme.layout\" />"
usage_examples:
- "在 settings store 中设置 theme.layout 为 vertical/horizontal/...Layout 会动态切换"
dependency_closure:
runtime:
- "Pinia settings storesrc/store/modules/settingstheme/layout/collapse/device"
- "Element Plusel-backtop"
- "Theme 组件library/components/VabThemeVabThemeDrawer/VabThemeSetting"
- "事件总线注入library/plugins/vab.ts$pub/$sub/$unsubTheme 抽屉依赖该注入)"
styles:
- "library/styles/variables/variables.module.scss布局 SCSS 变量)"
- "library/styles/variables/vab-*-variables.module.scssTheme 注入 Element Plus CSS 变量)"
acceptance:
- "Layout 可渲染并不报错"
- "窗口宽度 < 992 时进入 mobile 模式并能折叠菜单watch/resize 生效)"
- "Theme 抽屉/设置入口存在时不报错(缺失 $pub/$sub 注入会导致 Theme 不工作)"
pitfalls:
- "Layout 通过 require.context 自动注册 layouts 子目录下的 .vue迁移到非 webpack 环境时需要等效能力或手动注册"
- "Layout 与 Theme 都依赖 webpack 能力require.context / 动态 require scss module抽取到非 webpack 构建器时需要等效替代方案"