Files

41 lines
1.9 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-theme主题系统入口与交互
module:
id: vab-theme
name: VabTheme主题配置入口/抽屉/设置面板)
type: ui
entrypoints:
- library/components/VabTheme/index.vue
- library/components/VabTheme/components/VabThemeDrawer.vue
- library/components/VabTheme/components/VabThemeSetting.vue
- library/components/VabTheme/components/
public_api:
concept:
- "VabTheme一个刷子图标入口用于触发打开主题抽屉Drawer"
- "VabThemeDrawer主题抽屉监听事件总线打开/随机主题,并调用 settings store 的 saveTheme/resetTheme/updateTheme"
- "VabThemeSetting右侧固定设置入口主题配置/随机换肤/购买源码/清理缓存),通过事件总线触发行为"
usage_examples:
- "点击 VabTheme 触发 $pub('theme') 打开抽屉"
- "点击 VabThemeSetting 的随机换肤触发 $pub('random-theme')"
dependency_closure:
runtime:
- "Pinia settings storesrc/store/modules/settingstheme.showTheme、saveTheme/resetTheme/updateTheme 等)"
- "事件总线/全局注入library/plugins/vab.ts$pub/$sub/$unsub/$baseLoading 等)"
- "i18n translatesrc/i18n/index.ts组件内调用 translate"
- "Element PlusDrawer/Radio/Select/Button 等"
styles:
- "主题变量library/styles/variables/vab-*-variables.module.scssupdateTheme() 动态注入 CSS 变量)"
acceptance:
- "页面渲染包含主题入口(刷子图标)"
- "触发 $pub('theme') 时抽屉能打开;关闭时不报错"
- "保存/重置主题后调用 updateTheme() 生效CSS 变量与 body class 变化)"
pitfalls:
- "Theme 依赖 $pub/$sub 注入;若未安装 vab 插件,事件不会触发"
- "settings.updateTheme() 依赖 webpack 的 require 动态引入 scss module迁移到非 webpack 环境需等效实现"
- "移动端(<992某些操作会触发 reload抽取时需确认期望行为"