# Apollo Design > Independent Vue 3 native UI library. Use Apollo's documented APIs, not assumptions from React or other UI libraries. UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Import tokens before component CSS: `@apollo-design/theme/tokens.css`, then `@apollo-design/ui/style.css`. # Getting Started UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/guide/getting-started Apollo Design is an **independent Vue 3 + TypeScript component library** with consistent interactions, static CSS and CSS-variable themes. Its public APIs and user scenarios define the component contracts. ### Requirements - Vue **3.5+** (Composition API) - TypeScript 5.x (recommended) - Modern browsers (ES2022) ### Install ```bash npm install @apollo-design/ui @apollo-design/theme vue ``` Install `@apollo-design/icons` if you need icons. See [AI integration](https://apollocmh.github.io/apollo-design-ui/guide/ai) for versioned API documentation and examples. ### Usage ```ts import '@apollo-design/theme/tokens.css'; import '@apollo-design/ui/style.css'; ``` ```vue ``` --- # AI Integration UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/guide/ai Apollo Design is an independent Vue 3 native UI library. Give your coding assistant its documentation before asking it to write code; do not assume React or another library's APIs. ### Documentation for AI - [Documentation index](https://apollocmh.github.io/apollo-design-ui/llms.en.txt) - [Full English documentation and examples](https://apollocmh.github.io/apollo-design-ui/llms-full.en.txt) - [Full Chinese documentation and examples](https://apollocmh.github.io/apollo-design-ui/llms-full.txt) - [Button Markdown](https://apollocmh.github.io/apollo-design-ui/components/button.en.md) Components are available at `components/.md` and `components/.en.md`; guides at `guide/.md` and `guide/.en.md`. Prefer individual pages to keep context small. Files identify their UI version and source commit and update with the documentation site. Check the version before using them in an older project. Add the index URL to your project's AI instructions and ask the assistant to read the relevant APIs and examples first. Clients do not necessarily discover `llms.txt` automatically. Use Apollo's documented Props, Slots, Emits, v-model and imports. Import `@apollo-design/theme/tokens.css` before `@apollo-design/ui/style.css`. Query missing information instead of inventing APIs. ### Local MCP `@apollo-design/mcp` serves bundled documentation through stdio, with no network requests, account, API key or hosted server required at runtime. Use the npm package matching your UI version (currently `0.1.9`). The first npx launch downloads the package; subsequent queries read bundled files. ```bash npx -y @apollo-design/mcp@0.1.9 --project /absolute/path/your-vue-project ``` Configure your MCP client, replacing the absolute project path: ```json { "mcpServers": { "apollo-design": { "command": "npx", "args": [ "-y", "@apollo-design/mcp@0.1.9", "--project", "/absolute/path/your-vue-project" ] } } } ``` Node.js 22.12+ is required. `--project` resolves the application's installed `@apollo-design/ui` and checks its exact version. Missing packages and version mismatches fail explicitly. Without this option you can browse the bundle, but the project version is reported as unverified. Read-only tools: `search_components`, `get_document`, `list_examples`, and `get_example`. They retrieve documentation and actual Vue demos with local helper files, without executing code or modifying your project. The site and MCP share the same content pipeline and public import rewriting. --- # Styles UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/guide/styles JavaScript, static component CSS and theme selection are independent. All three import strategies use the same public `ThemeConfig` and independent preset imports; resolver registration is not needed to choose or customize a theme. The structural resources and official resolver below require UI 0.1.8 or newer. - **Automatic:** configure `Components({ resolvers: [ApolloResolver()] })` from `unplugin-vue-components/vite` and `@apollo-design/ui-resolver`. In App.vue import `monoPreset` from `@apollo-design/theme/presets/mono` and its optional `mono.css`, then use `Mono`. The resolver imports public component JavaScript and the ordered structural CSS resources in `ui/style-manifest.json`; it never imports a preset or aggregate CSS. Include generated component declarations in TypeScript. - **Manual subpaths:** import `ConfigProvider` from `@apollo-design/ui/config-provider` and `Button` from `@apollo-design/ui/button`, plus the same preset, `ui/base.css` and `ui/button/structure.css`. Complex components need their complete public manifest styles list, or their existing self-contained `ui//style.css` entry. Slot-provided components need their own styles. - **Aggregate:** import `{ ConfigProvider, Button }` from `@apollo-design/ui`, then `ui/style.css` and the chosen preset stylesheet. The theme object and template are identical to the manual example. For neutral structural entries, load public variables, base/component structure, then user overrides. Load legacy aggregate/self-contained styles before an optional preset so their default rules cannot replace the selection. Do not combine overlapping legacy and structural entries. Existing aggregate-style applications can set `ApolloResolver({ importStyle: false })` while retaining JavaScript resolution. Each optional `theme/presets/default.css`, `/mono.css` or `/material3.css` contains only that preset's public derived variables for light/dark/system. Set `data-apollo-preset` and `data-apollo-theme` on the desired static scope. A single-preset application loads only that preset; Docs deliberately loads all three for its Header preview. The legacy `theme/tokens.css` still supplies default light/dark/compact scopes and is unnecessary alongside a chosen independent preset. AutoComplete uses Select structure, TimePicker/TimeRangePicker use DatePicker, and Layout.Sider has a separate layout-sider entry. ConfigProvider needs no stylesheet of its own. Published CSS uses the default `apollo` prefix; custom prefixes require matching styles. See [Theming](https://apollocmh.github.io/apollo-design-ui/guide/theming) for user overrides, nesting and system/SSR behavior. ### Default link styles The shared base applies themed link colors, decoration and a visible keyboard focus indicator, independently of Select. Native inline styles or application CSS can override these defaults. ### Native form controls Shared styles preserve the browser's foreground, background and disabled colors for native controls. Apollo components declare their own theme colors. When styling a native control, set its foreground and background together. For example, `style="color: inherit; background: transparent"` lets a native button follow its parent without placing light text on the browser's light background in a dark scope. --- # Tree Shaking UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/guide/tree-shaking Apollo Design supports automatic imports through `@apollo-design/ui-resolver` and explicit imports. Its ESM modules allow bundlers to tree-shake unused exports. Component CSS and theme variables are loaded as described below. ### Automatic imports Use `@apollo-design/ui-resolver` with `unplugin-vue-components` to import components and their structural CSS from Vue templates. ```bash npm install @apollo-design/ui @apollo-design/theme vue npm install -D @apollo-design/ui-resolver unplugin-vue-components ``` The current resolver supports UI `>=0.1.8 <0.2.0` and `unplugin-vue-components ^32.1.0`. Keep Apollo packages on the same release version. Your Vue project must already have `vite` and `@vitejs/plugin-vue` installed. ```ts // vite.config.ts import { defineConfig } from 'vite'; import vue from '@vitejs/plugin-vue'; import Components from 'unplugin-vue-components/vite'; import { ApolloResolver } from '@apollo-design/ui-resolver'; export default defineConfig({ plugins: [ vue(), Components({ resolvers: [ApolloResolver()], dts: 'src/components.d.ts', }), ], }); ``` Include the generated `src/components.d.ts` in your application's TypeScript project. An existing `include: ["src/**/*.ts", "src/**/*.vue"]` covers it. Load default theme variables in your application entry: ```ts // main.ts import '@apollo-design/theme/tokens.css'; ``` Use `A`-prefixed names in templates without manually importing components: ```vue ``` Compound components use explicit names such as `AInputSearch`, `AFormItem`, `ASpaceCompact` and `ALayoutSider`. Their kebab-case equivalents, such as ``, also work in templates. `ApolloResolver()` imports component JavaScript and the required structural CSS by default. Bundlers deduplicate repeated stylesheet paths. Your application chooses and loads the theme variables; do not also load `ui/style.css` or overlapping component `style.css` files. See [Styles](https://apollocmh.github.io/apollo-design-ui/guide/styles) and [Theming](https://apollocmh.github.io/apollo-design-ui/guide/theming) for independent presets such as Mono and Material. If you already load aggregate CSS or want to manage styles yourself, disable automatic style imports: ```ts ApolloResolver({ importStyle: false }) ``` JavaScript resolution remains enabled, while your application takes responsibility for styles. The resolver handles Vue templates. Services such as `message` and `notification`, and components used in TSX or render functions, still require explicit imports and their corresponding styles. ### Manual imports Choose components and their self-contained stylesheets explicitly: ```ts import { Button, Space, Table } from '@apollo-design/ui'; import '@apollo-design/theme/tokens.css'; import '@apollo-design/ui/button/style.css'; import '@apollo-design/ui/space/style.css'; import '@apollo-design/ui/table/style.css'; ``` Public subpaths also work, for example `import { Button } from '@apollo-design/ui/button'`. Bundlers retain the used components and their actual JavaScript dependencies. Each component's `style.css` includes implementation-owned style dependencies. Components supplied by your application through slots need their own styles. ### Aggregate CSS Load all component styles in your application entry: ```ts import '@apollo-design/theme/tokens.css'; import '@apollo-design/ui/style.css'; ``` Named JavaScript imports remain tree-shakeable. When combining aggregate CSS with the resolver, set `importStyle: false` to avoid overlapping styles. See [Styles](https://apollocmh.github.io/apollo-design-ui/guide/styles) for structural entries, independent presets and import order. --- # Theming UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/guide/theming [Open the theme gallery](https://apollocmh.github.io/apollo-design-ui/guide/themes) to compare all three themes in light and dark. ### Independent style and appearance Default, Mono and Material presets use the same public `ThemePreset` and `ThemeConfig` API. Material references MUI’s neutral surfaces, 4px default corners and elevation shadows while retaining Apollo’s component interactions. Compare light and dark appearances in the [theme gallery](https://apollocmh.github.io/apollo-design-ui/guide/themes). Import `defaultPreset`, `monoPreset` or `material3Preset` from the independent `@apollo-design/theme/presets/default`, `/mono` or `/material3` entry. Each also has a default export. The root entry does not load every preset. Custom presets do not require resolver registration. ```ts import { monoPreset } from '@apollo-design/theme/presets/mono'; const theme = { preset: monoPreset, mode: 'system' as const, token: { colorPrimary: '#6455ff', borderRadius: 8 }, components: { Button: { paddingInline: 20 } }, }; ``` Pass this configuration to `ConfigProvider`. `mode` accepts `light | dark | system`. Live providers subscribe to system appearance after mounting and release their subscription. Pure `getDesignToken(config, systemAppearance?)` and SSR default to light; pass `'dark'` as the second argument when the server knows the preference. ### Precedence and scope Derivation applies default seeds, common preset tokens, the selected appearance scheme, user seeds and derivation, then final user Map/Alias overrides. Component tokens override their component defaults. A local explicit algorithm replaces an inherited mode; a local mode replaces an inherited algorithm. `ConfigProvider` inherits raw parent configuration by default; `inherit: false` resets it. Standalone `ThemeProvider` retains its existing reset-by-default behavior; use `inherit: true` to merge the parent. Parallel/nested providers and their portals and contextual App Message/Notification APIs retain their scopes. ### Resources and preview See [Styles](https://apollocmh.github.io/apollo-design-ui/guide/styles) for automatic, manual subpath and aggregate imports. Optional `@apollo-design/theme/presets/default.css`, `/mono.css` and `/material3.css` are generated through the same public derivation API. Load only the preset you use, then set `data-apollo-preset="mono"` and `data-apollo-theme="light|dark|system"`. Direct CSS variable overrides do not recalculate derived palettes; use a provider for seed derivation. The Docs Header offers independent style and appearance controls on desktop and narrow screens. Preferences persist across navigation and refresh. A pre-paint script sets the public selectors before styles load; SSR keeps deterministic markup and live context starts after hydration. The site's `--site-*` aliases read the public tokens rather than duplicating palettes. Inline demos inherit the selection while intentional local overrides remain active. Standalone URLs carry initial `preset`, `theme` and `lang`. Frames are created once with current preferences; subsequent same-origin messages verify source and frameId and update context without navigation, preserving input, selection and open state. Docs explicitly loads three optional preset stylesheets for switching; a single-preset application does not need all three. --- # Theme gallery UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/guide/themes ### Compare the previews The gallery above presents the same content in Default, Mono and Material. The first row uses light mode and the second uses dark mode. Each card owns its theme scope, so changing the surrounding site's appearance preserves the mode shown on its label. Narrow screens wrap the cards in the same order without requiring page-wide horizontal scrolling. Edit a name, toggle notifications, or use Continue and Reset to change the progress value. State belongs to each preview independently. You can also use Tab to compare keyboard focus and disabled controls across the six appearances. Reset restores only progress to 64. The edited name and notification switch keep their own state so you can continue comparing themes. ### Choose and customize Default is the standard appearance, Mono uses a monochrome style, and Material references [MUI Material UI](https://github.com/mui/material-ui) for neutral surfaces, restrained corners and elevation shadows. The brand stays **#0073E6** in both appearances: filled actions darken on hover, while dark-mode text and links use lighter colors. The public `material3Preset` / `material3` names are retained, so existing imports and configuration need no renaming. See [Theming](https://apollocmh.github.io/apollo-design-ui/guide/theming) for application setup, brand overrides, appearance switching and nested scopes. This page focuses on comparing working components. --- # Internationalization UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/guide/i18n Built-in component texts are provided by `@apollo-design/locale`: wrap your app with `ConfigProvider` from `@apollo-design/ui` and a locale object (`zh_CN` / `en_US` / dozens more, with stable language and region identifiers). For example, `useLocale('Table')` returns reactive computed refs for the component texts and language code. This site switches its own UI strings and component docs between zh-CN and en-US; missing translations fall back explicitly with a visible hint. --- # Compatibility UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/guide/compatibility ## 兼容对象 Apollo 对自身公开 API、文档化行为、类型、语义样式接口和实际用户负责。Ant Design 不是唯一规格,不绑定 Apollo 的发布版本,也不要求组件/API/Token/DOM 数量相同。默认保留已有合理行为与视觉。 ## 保留的边界 - 已有组件导出、props、事件 payload、`v-model` 名称、expose、令牌和样式入口默认保持兼容;开发阶段模板扩展 API 按 ADR 0006 直接迁移;为保留 React 回调/DOM 形态而妨碍 Vue 公共用法的行为按 ADR 0007 直接修正。 - 根节点使用 Vue `class` / `style`;先前已经完成的根别名迁移不回滚。非根 `classNames.*` / `styles.*` 和现存 deprecated alias 保留各组件已文档化行为。 - 同名 ConfigProvider 配置字段、数据项字段和组件 attrs 不等同,不因名称类似 React 而删除。 - 现有 VNode 数据和命令式服务按职责保留。组件顶层内容渲染函数 prop 直接替换为具名/作用域插槽,不保留函数兼容层或弃用期(用户裁决、ADR 0006);逐组件同步实现、类型、调用者、文档与测试。数据项渲染字段另行按实际契约评估。迁移不得破坏数字动画、缓存或业务 payload。 - `prefixCls` 的 DOM 响应性需要保证,但现有静态 CSS 不自动支持任意前缀。完整前缀样式策略继续追踪 KNOWN-ISSUES 的 D04。 - `middle` 等既有值、子组件别名和已验收视觉不为独立化重新命名。 ## 变更分类与迁移 错误实现 → 用场景与契约证明后修复;有意设计改变 → 记录理由、影响、类型、示例和回归;环境差异 → 记录平台与复现条件;上游差异 → 可作参考,不自动构成缺陷或豁免。 破坏性公共 API 必须单独记录:旧/新写法、受影响版本、替代方案、弃用期、运行时及类型兼容层、移除条件、验证命令。当前 `0.1.x` 未发布开发阶段,用户已授权模板扩展 API 直接迁移;这类变更记录旧/新写法与测试证据,兼容层和弃用期明确为无,无需逐组件重复申请批准。用户另已授权按 ADR 0007 直接修正牺牲 Vue 公共用法的 React 回调/DOM 兼容:不保留错误载荷或树形态的兼容层/弃用期;逐组件记录影响与验证。其他破坏性变更仍单独评审。 Vue 公共语义与 React 回调/DOM 冲突的直接修正规则见 [ADR 0007](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/adr/0007-vue-public-contracts-over-react-shapes.md)。已批准的模板扩展迁移见 [ADR 0006](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/adr/0006-development-template-slots.md),Transfer 首批变化见 [迁移记录](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/transfer-slots.md)。Alert / Collapse 已有内容插槽的优先级调整另见 [行为迁移记录](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/content-slot-precedence.md)。List 的 `renderItem` → 泛型 `#item`、内容插槽及废弃告警调整见 [List 迁移记录](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/list-slots.md)。其他待评估事项见 [独立化记录](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/independence.md),未裁决事项不算已批准。 Typography 的固定标签类型、Link 原生操作树、编辑/复制/测量、有效 Token 和关联 Table 主题变量修正见 [Typography 契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/typography-contracts.md)。 Badge / Ribbon 的原生根 style/ref、完整 text 内容/槽、当前配置与九 Token、数字/偏移及可读前景修正见 [Badge 契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/badge-contracts.md);直接修正开发期错误落点,原二十六场景和参考证据保留。 ## 上游参考与历史回归 List 当前配置、稳定内容结构、嵌套样式与分页修正,以及共享 `RenderEmptyHandler` 类型收窄,集中见 [List 契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/list-contracts.md)。 共享reset的原生控件颜色配对修正见 [颜色迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/native-control-colors.md)。Spin全屏模式保留正文文档流,root为内容外壳,mask为实际覆盖层;相关落点变更与验证也见List契约迁移。 Spin的完整Vue内容、显式indicator scope、稳定section/indicator、SSR确定进度(含0)与4个有效Token集中见 [Spin契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/spin-contracts.md)。这按ADR0007直接修正旧DOM/首帧形态,不恢复已移除indicator prop或增加兼容通道。 QRCode的statusRender直接替换为#status、稳定refresh事件操作、根/图像样式拥有关系、默认白色宿主与可访问名称、当前遮罩Token和语言,集中见 [QRCode契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/qrcode-contracts.md)。原编码引擎与合法输入的矩阵/路径保留。 `tests/compat`、Oracle 与 `tests/visual/baselines/react` 保留来源版本以便复现;版本固定只约束这组参考实验。上游对照默认不决定新组件完成或发布验收。现有 DOM 回归测试仍执行,必要差异必须根据 Apollo 契约审查,不允许无依据放宽。 ## 9. 历史差异登记 `image-optional-alt-accessible-name`:Image省略alt时,实际img使用空替代文本;预览触发器使用“Preview image”,弹层使用“Image preview”作为通用名称,避免公开可选prop产生无名称控件。旧React对照缺少触发器名称的5个场景保留,精确断言仅此差异,并以Apollo原生回归及实际浏览器axe验证。集中迁移与当前验证边界见 [Image契约修正](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/image-contracts.md)。 原 D 编号及逐组件迁移证据完整保存在 [2026-10 历史兼容记录](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/history/compatibility-2026-10.md)。旧链接/脚本引用该表时按历史记录解释;其中的 Phase、逐字同构和强制对拍要求已被本文取代。不要删除已有问题复现或第三方来源说明。 Statistic/Timer/Countdown的原生#value业务作用域、当前计时方向/非负事件、SSR/清理、attrs/ref及两字号Token修正集中见[Statistic契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/statistic-contracts.md);不新增旧内容函数兼容层。 Skeleton及五个子组件的原生根attrs/style、嵌套块配置、Image默认槽、当前八Token和装饰占位语义修正集中见[Skeleton契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/skeleton-contracts.md);直接修正开发期错误形态,不新增兼容通道。 Result全部状态的完整图标槽/默认图形开关、条件内容、原生根attrs/style、当前Provider/四Token和装饰语义修正集中见[Result契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/result-contracts.md);开发期直接修正,不为旧React图形分支增加兼容通道。 Button完整内容宿主、独立color/variant、加载请求与指示器分离、当前Provider/58 Token及合法发布工具入口修正见[Button契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/button-contracts.md);内部Search/Dropdown/FloatButton链路同步调整。 Empty 的完整 image/description/footer 内容、当前 Provider/语言、自然布局、空宿主及默认文字对比度修正见 [Empty 契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/empty-contracts.md);保留插画几何与原始参考证据。 Tag / CheckableTag / CheckableTagGroup 的完整内容、所属原生关闭按钮/链接、Vue 事件和强类型模型、当前 Provider/三个 Token 与两套真实语义,集中见 [Tag 契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/tag-contracts.md);原始参考矩阵保留,开发期直接修正错误 DOM/回调形态。 Avatar / AvatarGroup 的原生事件与同步取消钩子、完整内容槽、当前尺寸/Token、业务key和溢出按钮,集中见 [Avatar契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/avatar-contracts.md);直接移除四个分组旧别名,保留原始参考证据。 ### D-typography-native-controls 开发阶段按 ADR0007 直接修正 Link 的 span/a 所属结构、text 编辑键盘入口与原生按钮内装饰图标语义。原 76 场景、参考 HTML 与参考 PNG 不变;19 个场景的精确差异存于 Typography contract-differences.ts,任何额外差异继续失败。详情与迁移见 Typography 契约迁移。 Descriptions 的稳定原生描述项、当前配置/十Token、所属attrs与label槽修正见[Descriptions契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/descriptions-contracts.md)。Timeline 的原生根事件、实际ref、完整标量内容、当前六Token与显式方向见[Timeline契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/timeline-contracts.md)。Breadcrumb 的所属内容/菜单按钮、参数、原生attrs、当前七Token与内容槽见[Breadcrumb契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/breadcrumb-contracts.md);三单元已完成产物、正式视觉和Docs统一验收,见[四单元验收回执](https://github.com/apollocmh/apollo-design-ui/blob/b6578306f58bf0918d0f4cb8519cf4cf1a900b15/packages/docs/content/guide/docs/audit/evidence/four-unit-final-acceptance.json)。共享Menu Enter导航修复证据保留,完整Menu审计另行继续。 Space/Compact/Addon 的当前插槽、稳定内容身份、完整 separator 数据、紧凑上下文与主题作用域见[Space契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/space-contracts.md);Grid/Row/Col 的原生样式、当前配置与响应式字段见[Grid契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/grid-contracts.md)。直接修正开发期错误行为,不新增内容回调兼容层;两单元已分别完成发布、视觉和Docs验收,Space关联Input窄链通过不代表完整Input API已验收。 Flex的完整内容、当前gap与原生样式见[Flex契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/flex-contracts.md);Alert/ErrorBoundary的内容、关闭流程与Vue错误恢复见[Alert契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/alert-contracts.md);Layout家族的原生根、当前配置与Sider受控/响应式链见[Layout契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/layout-contracts.md)。三者与Space已统一验收,证据及剩余边界见[本批最终回执](https://github.com/apollocmh/apollo-design-ui/blob/b6578306f58bf0918d0f4cb8519cf4cf1a900b15/packages/docs/content/guide/docs/audit/evidence/space-flex-alert-layout-final-acceptance.json)。 Theme的可写深响应式配置、同应用默认来源共享/跨应用与SSR隔离、mounted变量注入和可释放scope所有权,以及空算法/undefined覆盖、精确Alias类型和原生DOM引用target,集中见[Theme契约迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/theme-foundation-contracts.md)。开发期直接移除无消费的ThemeConfig.prefixCls;DOM类名沿用ConfigProvider顶层prefixCls,CSS变量名使用cssVarPrefix,不新增兼容通道。该源码里程碑不代表ConfigProvider/Tree完整单元或全库最终门禁已关闭。 共享 `useControlledValue` 的受控请求、撤控保留值与函数更新规则见[受控状态迁移](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/controlled-value.md)。开发阶段直接修正 rc 内部状态语义,不提供旧行为开关。 组件 Token 配置保留字符串、数字和布尔标量,以支持已公开的 `InputNumber.handleVisible`;不接受函数或嵌套对象。各组件仍按其字段契约消费,布尔开关不会当作其他组件的 CSS 数值。 Switch 的 Provider 样式、具名槽、原生 attrs 和真实模板 ref 类型修正见[Switch API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/switch/index.zh-CN.md);全局 large 解析为该组件已支持的 medium,不新增尺寸能力。 十三个组件 Token 和已消费的全局别名读取当前主题,嵌套、替换和撤除均更新实际 CSS;保留原生与语义样式优先级。 ### D-back-top-native-button BackTop 改为原生 button 和完整内容槽,click 发送原生 MouseEvent,公开真实按钮引用;target 跟随当前模板 ref,并在换目标、重复点击和卸载时清理滚动动画。历史 div/首节点克隆的差异在本组件 semantic 测试中精确登记,参考基线保留。迁移见[BackTop API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/back-top/index.zh-CN.md)。 ### D-rate-native-events-and-focus Rate 的 change/hoverChange/focus/blur 使用 Vue emits,焦点事件带原始 FocusEvent;具名槽和真实实例引用保留精确类型。radio 组只保留一个已选值和一个 Tab 入口,动态 tooltip 不替换焦点项;新增可达性属性与旧前缀差异逐场景精确比较,不忽略整类属性。迁移见[Rate API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/rate/index.zh-CN.md)。 六个组件 Token 读取当前主题,嵌套、替换、撤除和全局派生及时生效;原生与语义样式继续按既有优先级覆盖。 ### D-pagination-native-model-inputs Pagination 保留既有原生插槽交付,修正受控页码/尺寸撤控、总量收缩、键盘提交、焦点归属及禁用交互。尺寸选择器使用原生 class;十二个组件 Token 与输入样式读取当前主题。精确 DOM 差异保留在 semantic 测试,参考基线不变,详见[Pagination API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/pagination/index.zh-CN.md)。 ### D-input-number-native-contracts InputNumber 的 change/step/pressEnter 统一为 Vue 事件,模板引用暴露实际元素与方法;显式 null、受控撤除、输入法、光标及异步清理遵守文档契约。当前 Provider、variant 和组件 Token 跟随配置替换或移除,详见[InputNumber API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/input-number/index.zh-CN.md)。 ### D-steps-live-tokens Steps 使用唯一 change emit,接通九个有效组件 Token。直接移除从未被组件消费的 customIconSize/customIconTop/iconTop/titleLineHeight;使用现有 iconSize/customIconFontSize 或原生样式表达受支持的定制,不新增旧字段兼容。既有四槽和 inline Tooltip 成果保留,详见[Steps API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/steps/index.zh-CN.md)。 ### D-progress-live-contracts Progress 补齐动态位置、原生样式、当前 Provider/六 Token、Circle 描边与渐变、CSS 长度宽度等已声明行为;保留 format/rounding 与现有别名。单色 inner 文字修正前景对比,语义 color 仍优先;自定义渐变和透明背景的配色边界见[Progress API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/progress/index.zh-CN.md)。Upload 已交付进度语义不变。 ### D-masonry-native-layout Masonry 的 layoutChange 使用 Vue emits,MasonryRef 与文档化 nativeElement() getter 一致;同 key 数据替换和离场资源保持正确。CSS 字符串 gutter 交由浏览器解析,纵向百分比使用文档化 intrinsic/显式高度基准,避免根高反馈循环;item.height 仍是槽和事件的数据,不新增布局提示语义。详见[Masonry API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/masonry/index.zh-CN.md)。 ### D-tooltip-current-overlay Tooltip 的 openChange/popupClick/afterOpenChange 使用 Vue emits,原生 class/style 只作用于浮层根,模板 ref 暴露真实元素属性。afterOpenChange 通知通过 Popover、Popconfirm 同链迁移为 `@after-open-change` / `onAfterOpenChange`,不保留旧回调 prop。当前主题、箭头、层级与定位跟随实际配置和尺寸更新,详见[Tooltip API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/tooltip/index.zh-CN.md)。两层包装的其余契约仍按各自进行中任务处理。 ### D-float-button-native-group FloatButton / Group 使用当前插槽、Provider 与主题别名;Group 通知改为 Vue emits,原生 attrs 只作用于根,trigger 在列表前以支持自然 Tab 顺序,Escape 在接受关闭后返回焦点。BackTop 保留当前目标并释放动画/监听,PurePanel 展示真实分支;既有样式生成器正确消费显式自定义前缀,不新增运行时 CSS。详见[FloatButton API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/float-button/index.zh-CN.md)。 ### D-popover-current-owner Popover 拥有 openChange/popupClick/afterOpenChange 的 Vue emits,继承的样式与销毁别名真实转发;自身四 Token、当前 Provider 与 PurePanel 颜色生效。包装层把当前层级基准传给 Tooltip,共享同一层级上下文,不重复叠加。真实引用、原生样式与内容插槽沿用既有成果;wireframe 的视觉缺口仍明确延期,详见[Popover API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/popover/index.zh-CN.md)。 ### D-tree-native-contracts Tree / DirectoryTree 修正受控模型、完整事件转发、原生事件载荷、实际焦点/滚动/行测量与加载和拖放资源。顶层 titleRender、icon/switcherIcon 等内容函数迁为具名作用域插槽;数据项函数按数据职责保留,TreeSelect 同步迁移实际消费桥。九个组件 Token 使用当前主题,prototype 命名键安全保留;Directory 叶子显示文件图标,历史 DOM 参考只登记精确差异。详见[Tree API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/tree/index.zh-CN.md)。 ### D-mentions-current-contracts Mentions 保留六组既有整改,补齐当前 Provider/二十一个有效组合 Token、可空容器与真实模板 ref;只读、禁用和 hidden 路由到实际拥有者。PurePanel 在自身 host 展示真实菜单。移除未消费的 Mentions addonBg 与 OptionProps.children,Option 内容使用默认槽、key 支持 string/number;Input 自己有效的 addonBg 保留。详见[Mentions API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/mentions/index.zh-CN.md)。 ### D-tabs-native-contracts Tabs 保留已交付 popup/extra 槽,修正受控撤除、同 key 面板身份、item 级销毁优先级、SSR 稳定 ARIA id 与真实 ref 属性。导航和溢出选项拥有独立的可访问树,关闭按钮保留键盘入口;当前 Provider 与二十四个有效 Token 实际消费。移除从未实现的顶层 children 与两个空 margin Token,items[].children 和 horizontalItemGutter 保留;开发版 editable 命令类型要求 remove 携带 key。详见[Tabs API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/tabs/index.zh-CN.md)。 ### D-upload-native-contracts Upload / Dragger 修正文件预处理替换、请求/移除竞态、受控列表与取消、预览资源释放,统一原生 attrs、插槽、真实引用及当前 Provider/Token。beforeUpload=false 的 change 文件统一为 UploadFile,通过 originFileObj 读取原文件;自定义请求收到实际文件与默认请求服务。删除无消费的 supportServerRender/styleAttrs 和 UploadListProps.className;预览、下载、异步移除等有返回值的业务回调保留。原生根样式落 wrapper,详见[Upload API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/upload/index.zh-CN.md)。 ### D-popconfirm-native-sessions Popconfirm 的所属通知使用 Vue emits,确认 Promise 仍是业务回调;当前配置与 Token 由 Popconfirm 拥有,不误用 Popover 配置。异步结果只关闭发起它的已接受会话,卸载后不再触发旧关闭;引用暴露实际实例。详见[Popconfirm API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/popconfirm/index.zh-CN.md)。 ### D-select-native-search-and-events Select 的通知使用 Vue emits,value/open/searchValue 使用对应 v-model;showSearch 仅承载过滤与排序等搜索算法配置。原 showSearch.searchValue/onSearch/searchIcon 分别迁到顶层模型、search 事件与 #searchIcon,移除 onDropdownVisibleChange。当前配置、有效 Token、实际模板引用和共享引擎消费者同步修正;详见[Select API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/select/index.zh-CN.md)。AutoComplete 同步转发 searchValue 模型更新。 ### D-drawer-native-lifecycle Drawer 的 close/afterOpenChange/resize/resizeStart/resizeEnd 使用 Vue emits,引用暴露实际 nativeElement 与 focus。resizable 直接使用 boolean,原对象内回调迁为对应 Vue 事件(尺寸载荷为 number);删除未消费的 panelRef/destroyInactivePanel。修复真实 motion 完成通知、延迟销毁、受控尺寸与拖拽、嵌套推移和焦点资源,详见[Drawer API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/drawer/index.zh-CN.md)。 ### D-locale-provider-order LocaleProvider 与 ConfigProvider 的静态确认语言来源按挂载顺序固定优先级,内容更新不重新占位;清空来源后旧清理不恢复过期语言。普通 Modal 只读取本应用响应式语言,静态 confirm 仍可显式传 locale;无上下文静态服务的全局来源边界保留。详见[Locale 当前契约](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/foundation/locale-contract.md)。 ### D-a11y-accepted-navigation useRovingFocus 的 activeIndex 按既有文档作为受控输入,拒绝请求不再修改已接受值或抢焦点,撤控保留已接受值。需要本地初值时不传受控 activeIndex,调用 setActive(index, false);零偏移保持当前位置,跳末项使用 moveEnd。键盘事件保留原生阻止/输入法边界,挂载前播报在真实宿主就绪后保留。详见[a11y 当前契约](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/foundation/a11y-contract.md)。 ### D-auto-complete-native-combobox AutoComplete 的通知改为 Vue emits,并明确 value/searchValue/open 三个模型、实际模板引用与像素/条目滚动参数。backfill 只预览键盘候选,Enter/Tab/点击才提交;Tab 保留原生焦点移动。Provider 展示配置由真实包装者拥有,继续共享已文档化的 Select Token。原 showSearch.onSearch 迁为 search 事件,旧 onDropdownVisibleChange 迁 openChange;详见[AutoComplete API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/auto-complete/index.zh-CN.md)。 ### D-color-picker-native-content ColorPicker 的 panelRender/showText 内容函数直接迁为 #panelRender/#showText;panel 作用域改为稳定组件引用,可用 ``,不再需要 VNode 渲染适配器。默认触发器和预设色块具备原生键盘交互,尺寸采用共享 SizeType,attrs 落到实际触发节点;PurePanel 使用正常文档流并转发真实槽/事件,移除轮询和高度镜像。当前配置、渐变 alpha 与数字颜色输入同步修正,详见[ColorPicker API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/color-picker/index.zh-CN.md)。 ### D-transfer-native-models Transfer 保留已有四槽成果,补齐 targetKeys/selectedKeys 双模型、所属 Vue 事件与真实引用。Search.handleClear 和 Operation.moveToLeft/moveToRight 命令 prop 改为 clear/move-to-left/move-to-right 事件;选择范围基于当前筛选视图,业务 key 和 Vue 节点身份保留。七 Token 接受 string/number 并读取当前主题;移除从未消费的 ListBodyProps.filteredItems,#list.filteredItems 保留。详见[Transfer API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/transfer/index.zh-CN.md)。 ### D-picker-native-panels Picker 面板引擎的通知使用 Vue emits,PickerPanel 提供 value/pickerValue/mode 三个模型;cellRender 内容 prop 迁为 #cellRender,对日期与时间列提供真实 Dayjs/number/meridiem 类型。当前时间配置、Provider、原生槽和面板引用直接消费;滚动对齐、取消与卸载资源已修复。DatePicker/RangePicker/Calendar 仅同步引擎消费桥,CellRenderInfo.locale 修正为实际面板语言子集,包装器其余契约继续各自整改。详见[Picker 当前契约](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/foundation/picker-contract.md)。 ### D-dropdown-native-menu Dropdown/DropdownButton 的开关、动效与主按钮通知使用 Vue emits,afterOpenChange prop 迁为 after-open-change 事件;真实引用保留既有三个 getter 方法。Provider、有效 Token、原生 attrs 与完整按钮/浮层槽真实消费,未实现的 icon 类型字段改用已有图标槽;id 落到实际触发节点。Menu 同步当前前缀、分组/动效、selectable 与键盘监听,语义样式传至实际菜单项。PurePanel 保持正常静态定位,详见[Dropdown API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/dropdown/index.zh-CN.md)。 ### D-form-core-native-scopes Form Core 的通知由 Vue emits 拥有,store/useForm 的业务回调仍保留。Form、Field、List 默认槽分别接收 `{ values, form }`、`{ control, meta, form }`、`{ fields, operations, meta }`,模板与 h() 使用同一对象;UI Form/FormItem 同步迁移,FormList 已有对象形态保留。外部 store、动态注册、受控 fields 和校验资源同步修正,实际宿主通过 nativeElement 返回。详见[Form Core 当前契约](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/foundation/form-core-contract.md);UI Form 的完整外观整改仍单独推进。 ### D-cascader-native-paths Cascader/CascaderPanel 的通知使用 Vue emits,选择器提供 value/open/searchValue 三个模型。displayRender、optionRender、popupRender、showSearch.render、函数式标签与图标内容迁为原生槽;popupRender 的 menu 可直接用 ``。移除未消费的 trigger/placeholder2 与重复开关通知,nativeElement 改为实际属性;过滤、排序和异步加载保留函数。修正类型安全的路径身份、当前配置/Token、键盘、异步会话和 raw 浮层传递,详见[Cascader API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/cascader/index.zh-CN.md)。 ### D-date-picker-native-input-and-panels DatePicker/RangePicker 的内容函数迁为 cellRender/panelRender/extraFooter/tagRender 等具名槽,移除无实际替换链路的 components/inputRender、失效的 changeOnBlur 与无运行时组件的 PurePanel 类型。通知使用 Vue emits,value/open/pickerValue/mode 支持模型请求;keydown 只接收原生 KeyboardEvent,preventDefault() 在内部操作前生效,暴露 DOM 引用准确包含 null。修正输入草稿/IME、受控撤控、范围活动端与禁用时间、只读面板键盘、动态槽与主题及观察器清理;TimePicker 仅同步关联包装桥,详见[DatePicker API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/date-picker/index.zh-CN.md)。 ### D-menu-native-notifications Menu 的选择/展开通知统一使用 Vue emits,原生键盘监听使用 onKeydown(模板为 @keydown),替代 React 拼法 onKeyDown;顶层 expandIcon 与静态子组件图标渲染迁为具名槽,数据项的图标和操作函数保留。移除从未消费的 children 类型,继续使用 items 数据源;实际 Overflow 根引用、当前 Provider/语义样式、已有十个 Token 和 popup/inline 层级职责同步修正,详见[Menu API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/menu/index.zh-CN.md)。 ### D-tree-select-native-tree-owner TreeSelect 的通知统一为 Vue emits,保留 value/open/searchValue/treeExpandedKeys/treeLoadedKeys 模型,监听 change 不再改变值的形态。顶层标题/标签/浮层与图标内容函数迁为具名槽,数据项 title/icon 与过滤、加载服务保留真实数据职责;旧开关通知别名改为 openChange,nativeElement() 改为实际属性。配置由 TreeSelect 自己拥有,继续共享 Tree/Select Token;修正原始数据服务载荷、异步 children 更新、键盘和实际 tree ARIA 目标,详见[TreeSelect API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/tree-select/index.zh-CN.md)。 ### D-time-picker-native-owner TimePicker/TimeRangePicker 固定为时间轴,移除从 DatePicker 误继承且无实际行为的 mode/defaultMode/update:mode、日期导航和多选标签声明,保留 value/open/pickerValue 模型与真实七/八个槽。两者读取当前 timePicker 配置并只合并一次语义样式,普通 Date Range 继续读取 rangePicker;独立 TimePicker 语言提示和动态撤回生效。没有新增 TimePicker Token 或内部面板,详见[TimePicker API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/time-picker/index.zh-CN.md)。 ### D-test-utils-native-contracts Test Utils 保留既有 Vue 测试入口,修正真实 VNodeChild、CSS/DOM 精确归一、焦点与原生属性断言、异常卸载/observer目标身份和收集器恢复;空执行范围不能冒称通过。ObserverBaseline.resizeTargets 由数量改为实际目标身份集合,包外没有旧字段消费者。C11 只检查公开组件的真实 runtime props,保留精确非模型数据豁免;Steps 同步补齐 update:current,模板可直接使用 v-model:current,原 change 数字载荷保留。 ### D-checkbox-native-input-events Checkbox 的 change 改为 `(event: Event, checked: boolean)`:首参为原生事件,第二参保留本次提议;移除合成 target/nativeEvent 包装及旧 Target DTO。其余 DOM 通知采用原生拼写与事件,Group change 保留值数组;值范围统一为实际支持的 string/number/boolean。修正父拒绝更新后的 checked/indeterminate、动态 skipGroup 注册、当前 Provider 和原生样式,引用暴露真实 nullable DOM。Radio 仅同步已证实的勾选恢复边界,完整事件迁移仍另行审计;Table/Transfer 已同步本次消费,详见[Checkbox API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/checkbox/index.zh-CN.md)。 ### D-motion-native-slots-and-events CSSMotion/MotionList 的可见性通知统一为 owned `visibleChanged` 事件,原 hooks.onVisibleChanged 迁为 `@visible-changed` / onVisibleChanged;其余有返回值的动效服务 hooks 保留。CSSMotion 将原生 attrs 与原 ref 合并到真实单个动画根,支持条件空槽和 Fragment,多个真实根明确不支持;MotionList 默认槽泛型保留移除项的浅快照元数据,component 支持原生标签、Vue 组件或 null。修正动态配置、异步准备错误归属与根替换后的监听释放,Trigger、Modal、Segmented、Form 和 Masonry 同步必要消费。详见[Motion 当前契约](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/foundation/motion-contract.md)。 ### D-form-native-content-and-instances Form 的 requiredMark 内容函数迁为 `#requiredMark={ label, required }`,label 是可直接渲染的稳定组件;feedbackIcons / hasFeedback.icons 迁为 Form 或 FormItem 的 `#feedbackIcon={ status, errors, warnings }`,hasFeedback 保留 boolean。useFormInstance 读取最近的真实 Form 实例,useForm 保留工厂职责;getFieldInstance 返回实际控制实例,是否支持 focus 取决于该控件。移除无消费的 Item status/fieldId,使用已有 validateStatus/id;requiredMark 在 Form 上配置。同步修正动态槽撤除、路径聚合、原生 attrs、实际焦点/滚动、响应式列与当前十一 Token,详见[Form API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/form/index.zh-CN.md)。 ### D-table-native-data-and-content Table 的顶层 title/footer/summary/expandedRowRender/expandIcon/emptyText 内容函数迁为具名槽,expandable 内同名全表内容函数也统一迁移;共享语言与组件 locale.emptyText 只承载静态内容,动态空态使用 #emptyText。按列或数据承担业务职责的 render/title/filterDropdown、排序过滤和选择操作函数保留。通知使用 Vue emits,change 保留四个实际业务载荷,scroll 使用原生 Event;公开泛型贯穿数据、列、槽、事件与真实模板引用,不要求用户添加索引签名。修正受控提议与撤控、同 key 行内容与焦点、当前配置和实际滚动资源;虚拟列表的 Vue holder/行按真实 HTMLElement 根测量,隐藏测量单元不再重复挂载表头交互,不可展开行使用装饰占位。详见[Table API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/table/index.zh-CN.md)。 ### D-radio-native-input-and-group Radio/RadioButton 的 change 改为 `(event: Event, checked: boolean)`,RadioGroup 的 change 改为 `(value: RadioValue, event: Event)`,分别保留 checked/value 模型;RadioChangeEvent 仅为原生 Event 别名,不再构造 target/nativeEvent 包装。选项 change 同步原生双参,Table 保留同一事件,Calendar/Header Demo 使用已有 update:value。移除无实际职责的 Radio skipGroup/type/optionType 声明,Group 的 optionType 保留。修正当前 Provider/十六 Token、完整内容和原生 attrs、选项身份/焦点、Button 引用与单次通知;已交付的受控整组 DOM 恢复继续保留,详见[Radio API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/radio/index.zh-CN.md)。 ### D-segmented-native-selection Segmented 的 change/keydown 由 Vue emits 拥有,value 模型保持;原生 attrs/style 落真实根,选项 id 与表单 value 真实消费。label/icon 使用完整 VNodeChild,语义样式使用 CSSProperties 与当前 SegmentedProps,尺寸接共享 SizeType(含 medium)。选中或首个可用 radio 是唯一 Tab 入口,拒绝提议后恢复已接受的勾选与焦点,RTL/IME/取消默认行为同步修正。当前八 Token 和快速反向 thumb 动效读取有效配置并清理失效资源;原 DOM 参考保留,详见[Segmented API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/segmented/index.zh-CN.md)。 ### D-calendar-native-content-and-panels Calendar 的 headerRender/cellRender/fullCellRender 内容 prop 及四个旧别名统一迁为已有同名具名槽,作用域使用具名对象;移除对应纯回调类型,保留 Header 作用域中的 onChange/onTypeChange 操作服务。value/mode 模型与 change/panelChange/select 顺序保持,Header 使用 RadioGroup 的 update:value。修正条件槽、原生 attrs/真实引用、当前配置/语言/六 Token,并将当前方向传给实际 Picker 面板;复用已交付的面板算法,详见[Calendar API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/calendar/index.zh-CN.md)。 ### D-watermark-native-drawing-lifecycle Watermark 的 remove 通知改由 Vue emits 拥有,模板使用 @remove,h() 的 onRemove 仍是自然监听器。fontSize 保留 number/string,由浏览器解析合法 CSS 单位;移除无效的 fontStyle="none"。修正实际图片身份缓存、异步图片竞态、当前原生 attrs/样式、继承面板和观察器/帧的释放;保留既有水印几何及防篡改行为,真实 Modal 消费同步验证,详见[Watermark API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/watermark/index.zh-CN.md)。 ### D-card-native-content-and-tabs Card 的 tabChange/update:activeTabKey 由 Vue emits 拥有,支持 v-model:activeTabKey;h() 的 onTabChange 仍是自然监听器。Tabs 保留选择状态职责,tabProps 不再建立第二个受控来源。已有 actions 内容增加 #actions 入口;Meta 的默认槽作为 description 的后备,具名 description 槽(含空槽)优先,其次是显式 description 数据。修正条件内容身份与焦点、Card/Grid/Meta 原生 attrs/真实引用、当前配置和十三 Token,详见[Card API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/card/index.zh-CN.md)。 ### D-splitter-native-panels-and-resize Splitter 的 resizeStart/resize/resizeEnd/collapse/draggerDoubleClick 统一由 Vue emits 拥有,移除重复回调 prop 通道,模板仍使用自然的 @resize-start 等写法。Panel 保留真实 Vue 节点、原生 attrs/StyleValue、默认槽和可访问的 nativeElement,尺寸与折叠状态按 key 归属;受控拒绝不写入本地状态,撤控保留已接受值,布局顺序变化取消旧拖拽。补齐分隔条键盘和当前四个有效 Token,保留既有尺寸算法,详见[Splitter API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/splitter/index.zh-CN.md)。 ### D-modal-native-content-and-sessions 普通 Modal 的 ok/cancel/afterClose/afterOpenChange 改由 Vue emits 拥有,取消/关闭支持 open 模型请求,OK 保留业务通知职责。modalRender/footer 内容函数迁为 #modalRender={ModalPanel}、#footer={OkBtn,CancelBtn},提供稳定可直接使用的组件;命令式确认的异步操作与程序内容配置保留。useModal 仍返回 [api,holderVNode],结果以 ModalHookInstance 准确描述 PromiseLike,修正早期调用、会话结算/注销、关闭后更新及当前 confirmLoading。删除从未生效的普通 focusTrap 和命令式 open 声明,分别使用 focusable.trap、destroy();补齐实际 Portal 容器、当前配置/六 Token、原生 attrs、焦点与资源,详见[Modal API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/modal/index.zh-CN.md)。 ### D-slider-native-handles-and-proposals Slider 的 handle/activeHandle 槽准确公开实际 nodeProps/ref/事件及当前 index/value,ColorPicker 使用同一类型。value 支持已有 null 输入,通知仍返回 number/number[];beforeChange 统一为有效交互的首个提议,changeComplete 使用该会话最后提议,拒绝更新不改变已接受状态,无变更或取消不伪报完成。原生 tabindex/ARIA 落实际把手,键盘取消、拖拽/触摸及卸载资源、当前十八 Token 和范围 Tooltip 同步修正;删除 Tooltip 未消费的开关回调及内部 value/draggingDelete 声明,已有 open/formatter 保留,详见[Slider API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/slider/index.zh-CN.md)。 ### D-carousel-native-slides-and-config Carousel 的 beforeChange/afterChange/swipe/edge 使用所属 Vue emits,模板自然支持短横线事件名;原生 style/attrs 落真实根,内层样式用 styles.slider,移除未消费的 easing。箭头槽提供既有原生按钮的完整内容,原件 key/ref 与条件槽保持真实 Vue 归属;克隆按实际可见范围提供交互,原生 ID 关联和透传插槽 ref 在克隆边界处理。修正动态配置、自动播放暂停原因、动画/尺寸资源及当前八 Token;克隆仍是独立组件实例,不镜像任意内部状态,详见[Carousel API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/carousel/index.zh-CN.md)。 ### D-tour-native-target-and-popup Tour 保留 open/current 模型与已有具名槽,拒绝请求不泄漏到撤控状态,异步步骤和真正重开分别处理。actions 的 originNode 改为稳定可直接渲染的组件;popupAlign 使用 Vue emits,步骤按钮传原生 MouseEvent 并支持取消导航。原生 attrs 经私有 Trigger 通道落真实弹层,修正当前目标/容器、配置/语言/Token、PurePanel 及焦点;遮罩使用原生 SVG 属性,实际滚动、换容器与切换遮罩保持正确几何和子树身份。没有新增观察任意纯位置重排的能力,详见[Tour API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/tour/index.zh-CN.md)。 ### D-affix-anchor-native-scroll-and-links Anchor 与 Anchor.Link 的 click 使用所属 Vue emits,载荷为原生 MouseEvent 和链接信息,preventDefault() 可取消内部导航;change 保留原始 href。Anchor 默认槽是正式组合入口,Anchor.Link 的标题使用 #title 或 title,子链接使用默认槽,移除未消费的 children prop。原生链接交互落实际 a 元素,换容器、当前配置、指示条和卸载资源按真实节点维护;Affix 保留 updatePosition 与既有几何判据,显式未就绪目标会释放旧监听,固定内容尺寸变化同步占位。详见[Anchor API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/anchor/index.zh-CN.md)和[Affix API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/affix/index.zh-CN.md)。 ### D-listy-native-generics-and-content Listy 使用真实泛型 Vue 组件,保留任意数据类型与有效字符串/数字 key,rowKey 字段按其实际值类型约束。itemRender 迁为 #default={item,index},group.title 迁为 #groupHeader={groupKey,items,sticky,fixed},group.key 保留数据分组职责;类型贯穿模板、h()、插槽与 scrollTo 引用。toTaggedKey 的结果包含 key 的原始类型,数字和字符串不再碰撞;不要自行拼接旧格式。修正 Raw/Virtual 的真实滚动目标、跨分组节点身份、组头定位与资源释放,Provider 和当前两个 Token 实际消费,详见[Listy API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/listy/index.zh-CN.md)。 ### D-notices-native-sessions-and-panels Message/Notification 保留命令式 API、有效服务回调和零参数 holder 工厂,提前调用进入实际挂载队列;Message 句柄在真正终止时结算,同 key 的各次等待均有效,手动关闭、销毁、淘汰和卸载不新增 public onClose 通知。关闭按钮和计时关闭仍调用当前 onClose;原始数字/字符串 key 分离,更新重置当前计时。单条配置中移除未消费的 classNames/styles.list 与 listContent,列表语义继续在 hook/全局配置中设置;PurePanel/PureList 使用准确类型、原生槽与事件。补齐当前十个 Token、Provider/关闭图标类型与真实容器消费,Modal/Tag 的共享关闭图标链同步验证,详见[Message API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/message/index.zh-CN.md)和[Notification API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/notification/index.zh-CN.md)。 ### D-app-native-services-and-host AppConfig 和 useApp() 改用真实通知配置及 MessageInstance、NotificationInstance、ModalHookAPI,静态 App.useApp 保留相同准确类型。useApp() 必须在真实 App 提供的 Vue 注入上下文中调用,缺少 Provider 时明确报错,不再返回伪造的空 API。保留原有四种宿主标签与 component=false、默认槽、嵌套配置和实例隔离;当前 Provider 根样式与原生 attrs 合并到实际宿主,动态切换宿主保留服务内容和生命周期。详见[App API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/app/index.zh-CN.md)。 ### D-utils-native-refs-and-resources RefLike 删除没有真实消费者的 React `{current}` 包装,使用 Vue 可写 value 引用或函数 ref;组件自己的 current 业务 prop 继续按实例处理。useComposeRef 接收一个数组、Ref 或 getter 集合源,例如 `useComposeRef(() => [localRef, callback])`;getNodeRef 返回真实 public expose 或 DOM,不再允许任意指定结果泛型。状态工具保留 T 与嵌套 Ref 的身份,既有受控提议和撤控算法保持;mergeProps 类型描述实际的后值覆盖,输入限对象、null、undefined,共享关闭配置同步规范化。补齐所属文档、独立订阅释放、取消、临时 CSS 容器及合法颜色输入边界,详见[Utils 当前契约](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/foundation/rc-util-contract.md)。开发阶段直接迁移,无兼容分支或弃用期;声明产物与全库验收留到统一冻结阶段。 ### D-position-owner-document-and-clipping Position 的公开签名及纯几何算法保持,测量使用目标所属文档、组合祖先和当前逐轴裁剪,修正边框盒缩放、overflow-clip-margin 与临时样式恢复。共享 Trigger 将视口和滚动区域分别传入对齐引擎,按当前容器绑定滚动及所属窗口 resize;迁移已有弹层不重建业务子树,关闭和卸载释放监听。仅支持同一 Document 内的轴对齐矩形,不新增跨 iframe 坐标换算或轮廓裁剪能力,详见[Position 当前契约](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/foundation/position-contract.md)。 ### D-border-beam-native-host-and-effect BorderBeam 的原生 class/style/事件合并到默认槽的单一 HTML 宿主;旧组件 className 改用 classNames.effect,旧装饰 style 改用 styles.effect。Provider 的装饰配置保留原义。完整 Vue 内容、模板 ref、key 与组件插槽保留各自归属,条件或异步根更新后跟随真实宿主;多根、文本及 SVG 内容完整透传但不产生描边。动态 textContent 移除装饰节点时只重建描边,动画会重启,业务内容与焦点保持;共享采样跟随宿主所属文档并在卸载释放,详见[BorderBeam API](https://github.com/apollocmh/apollo-design-ui/blob/master/packages/ui/src/border-beam/index.zh-CN.md)。开发阶段直接迁移,无旧形态兼容层。 ### D-virtual-list-native-generics-and-holder VirtualList/Filler 使用真实泛型 Vue 组件与所属 emits,沿用 default={item,index,style,offsetX} 和 extra 槽;旧多参数 RenderFunc/RenderProps 类型、无效 showScrollBar 与无消费者的 lastDiff 诊断引用直接移除。公开引用保留只读 nativeElement/containerElement、getScrollInfo、scrollTo;按业务 key 读取高度缓存使用 get,数字与同文字符串 key 分离。id/role/ARIA/tabindex 和键盘、焦点监听落真实滚动 holder,class/style/data 留 outer,innerProps 独立指向内容层。Table、Listy、Select、Tree 同步使用实际泛型、作用域与 holder 引用,修正高度/宽度、RTL 和异步滚动请求生命周期,详见[VirtualList 当前契约](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/foundation/virtual-list-contract.md)。开发阶段直接迁移,无旧回调或 DOM 形态兼容层。 --- # Icons UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/guide/icons Icons live in the standalone `@apollo-design/icons` package, installed and imported separately from `@apollo-design/ui`. It ships **848 icons**: 447 Outlined, 251 Filled, and 150 TwoTone. Browse the full catalog on the [icon resource page](https://apollocmh.github.io/apollo-design-ui/components/icon). ### Install and import ```bash pnpm add @apollo-design/icons ``` ```vue ``` Icons are regular Vue components. They inherit `currentColor` and `font-size`, and accept `style` / `class` overrides: ```vue ``` ### TwoTone colors Use `twoToneColor` per icon or `setTwoToneColor` globally: ```ts import { setTwoToneColor } from '@apollo-design/icons'; setTwoToneColor('#1677ff'); ``` ### IconProvider `IconProvider` overrides the icon class prefix (default `apollo-icon`): ```vue ``` ### Custom icons ```ts import { createIcon } from '@apollo-design/icons'; export const MyIcon = createIcon( { name: 'my-icon', theme: 'outlined', icon: { tag: 'svg', attrs: { viewBox: '0 0 24 24' }, children: [{ tag: 'path', attrs: { d: 'M12 2 L22 22 L2 22 Z' } }], }, }, 'MyIcon', ); ``` For iconfont.cn: ```ts import { createFromIconfontCN } from '@apollo-design/icons'; const IconFont = createFromIconfontCN({ scriptUrl: '//at.alicdn.com/t/c/font_xxx.js', }); ``` ### Accessibility Icons render with `role="img"`. Mark decorative icons with `aria-hidden="true"`; give meaningful icons an `aria-label` (or the `ariaLabel` prop) so assistive technology has a real name to announce. --- # Affix UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/components/affix # Affix Keep content fixed to the visible edge of the window or an actual scroll container after reaching an offset. The default slot accepts complete Vue content. ```vue ``` ## API | Prop | Description | Type | Default | | --- | --- | --- | --- | | offsetTop | Top affixing offset | number | 0 when both offsets are absent | | offsetBottom | Bottom offset. Top wins when both conditions match; bottom can still match when top does not | number | — | | target | Actual scrolling element or Window. Omitted: Provider.getTargetContainer, then window | () => HTMLElement \| Window \| null \| undefined | — | | prefixCls | Current component prefix | string | apollo-affix | A null/undefined result means pending. It releases the previous target and fixed state without selecting window. Reactive template refs update automatically; use the existing `updatePosition()` method after a nonreactive target change. | Event | Payload | Timing | | --- | --- | --- | | change | affixed: boolean | Accepted affixed state flips; unchanged scrolling does not repeat it | | Slot | Description | | --- | --- | | default | Complete VNodeChild content with persistent node identity | | AffixRef | Description | | --- | --- | | updatePosition(): void | Coalesce remeasurement of the current target and content into the next frame | No new instance API is introduced. A template ref can use `ref(null)`. ## Native attrs and current configuration The outer measuring div owns native class/style, id, data, ARIA and listeners once. Vue merges string, array and object styles with `ConfigProvider.components.affix.style`; caller styles take precedence. These remain native attrs rather than Affix Props. The fixed and spacer nodes are internal positioning layers. The prefix, component configuration and theme follow current Provider values. The sole component Token is `zIndexPopup`, derived from `zIndexBase + 10` by default. Replacement, removal and explicit zero affect the actual fixed layer. ```vue Toolbar ``` ## Geometry and cleanup Existing rounded comparisons and the outer layout reference are preserved. Top has branch priority; setting it does not remove the bottom condition. Fixed width follows the outer available width. Content keeps its natural height, and its existing ResizeObserver updates the spacer on growth and shrinkage without replacing inputs. Measurement and listeners start after mounting. Scroll listeners cover the current target, ancestors that move the target or placeholder, and the target's owner window. Top and bottom affixing follow the current target position when the outer page or a nested ancestor scrolls. Scrolling retains frame coalescing and the unchanged-position fast path; size notifications perform full measurement. Target replacement, a pending target and unmount release these listeners, observations and pending frames. SSR schedules none of these effects. Arbitrary position rearrangement without a size, scroll or explicit update signal does not add a new observer or polling loop. ## Demos basic, offset-bottom, on-change, target and update-position. Existing geometry and s54 listener-idempotency regressions remain. Final nine-dimensional and distribution acceptance are separate. ## Basic (basic) 最简单的用法:滚动到 `offsetTop` 之后,按钮固钉在顶部。 固钉时组件会渲染一个**等高占位层**(`aria-hidden`),避免页面布局跳动; 且**只有此时**内层才有 `apollo-affix` 类名(`position: fixed`)。 ### basic.vue ```vue ``` ## Offset bottom (offset-bottom) `offsetBottom` 与 `offsetTop` **互斥**:两者都传时只有 `offsetTop` 生效 (antd 的 `internalOffsetTop` 互锁推导,见 `docs/analysis/affix.md` §3)。 ### offset-bottom.vue ```vue ``` ## Change callback (on-change) `@change` 只在状态**翻转**时触发(连续固钉不会重复发)。 Vue 侧是 `emit('change', affixed)`,模板上写 `@change` —— antd 的 `onChange` prop 不移植成 prop(规则 C19)。 ### on-change.vue ```vue ``` ## Container (target) `target` 是一个**返回元素或 `window` 的函数**(不是元素本身)。 换绑 `target` 时,旧 target 上的监听也会被解绑。 ⚠️ 固定在容器底部时,偏移量是「容器可视区底边到**视口**底边的距离」参与计算 (`getFixedBottom` 用 `window.innerHeight`,不是容器高度)。 ### target.vue ```vue ``` ## Update position (update-position) `ref` 只暴露 `updatePosition`(与 antd 的 `useImperativeHandle` 一致): 内容尺寸或布局在程序里变化后,手动触发一次重新测量。 尺寸变化通常由内部的 `ResizeObserver` 自动捕捉,无需手动调用。 ### update-position.vue ```vue ``` --- # Alert UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/components/alert Show information that needs attention, with complete Vue content slots and an owned native close button. All15 working examples are in [`demo/`](https://github.com/apollocmh/apollo-design-ui/tree/b6578306f58bf0918d0f4cb8519cf4cf1a900b15/packages/ui/src/alert/demo). ## Props | Prop | Description | Type | Default | | --- | --- | --- | --- | | type | Alert type | `'success' \| 'info' \| 'warning' \| 'error'` | warning for banner, otherwise info | | variant | Local value overrides current components.alert configuration | `'outlined' \| 'filled'` | outlined | | title | Text title; use #title for rich content | `string` | — | | message | Deprecated title alias, used when title is absent | `string` | — | | description | Text description; use #description for rich content | `string` | — | | showIcon | Explicit false suppresses the banner default icon | `boolean` | true for banner, otherwise false | | banner | Banner appearance | `boolean` | false | | closable | Boolean or close configuration; an object enables closing | `boolean \| AlertClosable` | current Provider, otherwise false | | closeIcon | Legacy scalar icon; prefer #closeIcon or closable.closeIcon | `string \| number \| boolean \| null` | — | | closeText | Deprecated close text; prefer #closeIcon | `string` | — | | afterClose | Legacy completion callback; prefer @after-close | `() => void` | — | | prefixCls | DOM prefix; preload matching static CSS for a custom prefix | `string` | apollo-alert | | id / role | Actual root div attributes | `string` | role=alert | | classNames / styles | root/icon/section/title/description/actions/close; object or function receiving current merged props | `AlertSemanticValue<…>` | — | Native class/style, tabindex, ARIA/data, listeners and once modifiers belong to the actual root div. title remains the documented content prop. Native root listeners receive DOM events; onClick/onMouseenter/onMouseleave are their programmatic forms. ## Slots | Slot | Description | | --- | --- | | #title | Complete title content; present empty content suppresses title/message fallback. | | #description | Complete description; empty content removes description layout. | | #icon | Complete type icon; empty slots suppress default artwork. showIcon=false takes precedence. | | #action | Complete action content, including multiple native controls. | | #closeIcon | Text/artwork inside the native close button; present empty slots suppress every icon fallback. | All five slots are read in the current render and accept fragments and0. Conditional removal restores fallback. There is no implicit default-to-title API. Close content priority is slot, local configuration icon, closeText, legacy closeIcon, Provider configuration icon, Provider closeIcon, default artwork. Explicit0/false/null/empty strings are content values, not absent fields. ## Events and close state | Event | Payload and timing | | --- | --- | | close | Native MouseEvent from click or Enter/Space activation; each instance accepts one close request. | | after-close | Once after the owned alert completes removal, including disabled/reduced motion. | onClose/onAfterClose are programmatic Vue listeners. Configuration onClose/afterClose hooks remain business notifications and cannot suppress Vue events; the same function is not called twice. A configured afterClose takes priority over the legacy plain callback. The button has the default accessible name Close; closable aria-label/aria-labelledby and data attributes belong to that button. Closing is internal one-time state. There is no open/visible model or cancellation hook. Use parent v-if/key to remount; changing closable does not reopen a closed instance. Immediate parent removal during close does not report an internal animation completion. The existing truthy closeText shortcut remains ahead of the legacy boolean visibility branch. ## Ref `AlertRef.nativeElement: HTMLDivElement | null` refers to the actual root and becomes null after removal/unmount. ## ErrorBoundary Typed Alert.ErrorBoundary and named AlertErrorBoundary refer to the same component. Healthy default content remains a complete fragment without a wrapper. There is no reset method/model/expose; use parent key remounting for recovery. | Prop | Description | Type | | --- | --- | --- | | title / message | Error title data; defaults to String(error), message is a legacy alias | `VNodeChild` | | description | Error description; defaults to Vue error-phase information in pre | `VNodeChild` | | id | Error fallback Alert id | `string` | Vue onErrorCaptured handles actual descendant setup/render/lifecycle and owned event errors, including0/false/null/undefined, and stops propagation. The boundary itself and errors outside Vue's call chain are outside its scope. Native attrs/styles belong to the error fallback Alert; healthy fragment children do not receive arbitrary forwarded attrs. The default Error details region is focusable and supports native horizontal keyboard scrolling on narrow screens. Custom description content owns its own interaction and semantics. ## Theme | Token | Purpose | Default source | | --- | --- | --- | | borderRadius | Corner radius | borderRadiusLG | | withDescriptionIconSize | Description icon size | fontSizeHeading3 | | defaultPadding | Normal padding | paddingContentVerticalSM / fixed12px inline | | withDescriptionPadding | Description padding | paddingMD / paddingContentHorizontalLG | The nearest current theme.components.Alert and aliases are consumed on updates/removal. Explicit root CSS variables take precedence. Default/dark/compact/combined source scopes remain local; closing respects theme.token.motion and prefers-reduced-motion. An explicitly empty ThemeProvider restores the default aliases and four component tokens, including through an unconfigured ConfigProvider. A ConfigProvider without any theme source leaves page CSS dark/compact scopes authoritative. Semantic functions receive the resolved type, variant, prefixCls, role, icon visibility and close state; role defaults to alert and accepts an explicit value. Null or undefined Provider type icons retain the default fallback. Default icons are decorative; custom content owns its semantics. Migration and validation boundaries: `docs/migrations/alert-contracts.md`, `docs/audit/2026-10-29-alert-contract-audit.md`. ## Basic (basic) 最简单的用法,适用于简短的警告提示。 ### basic.vue ```vue ``` ## Four styles (description) 共有四种样式 `success`、`info`、`warning`、`error`。 ### description.vue ```vue ``` ## Closable (closable) 显示关闭按钮,点击可关闭警告提示。`@close` 接收真实的原生 `MouseEvent`;关闭完成使用 `@after-close`。 ### closable.vue ```vue ``` ## Banner (banner) 页面顶部通告形式,默认有图标且 `type` 为 'warning'。 ### banner.vue ```vue ``` ## Icon (icon) 可口的图标让信息类型更加醒目。 ### icon.vue ```vue ``` ## Custom icon (custom-icon) 可口的图标让信息类型更加醒目。 ### custom-icon.vue ```vue ``` ## Custom action (action) 可以在右上角自定义操作项。 ### action.vue ```vue ``` ## Filled (filled) 通过 `variant="filled"` 隐藏边框。 ### filled.vue ```vue ``` ## Smoothly unload (smooth-closed) `@close` 通知原生关闭请求,`@after-close` 在内部关闭完成后通知父级。减少动画偏好或 `theme.token.motion=false` 时也会完成移除并发出一次完成事件。Alert 没有受控 open/visible 模型;通过父级 `v-if` 重新挂载可再次显示。 ### smooth-closed.vue ```vue ``` ## Semantic styles (style-class) 通过 `classNames` 和 `styles` 传入对象/函数可以自定义 Alert 的语义化结构样式。 ### style-class.vue ```vue ``` ## Custom title alignment (custom-title-alignment) 未设置 `description` 时,Alert 会让图标、内容、操作区和关闭按钮作为整体垂直居中。 若标题可能换行并希望元素与标题首行对齐,可以通过语义化 `styles` 自行调整。 ### custom-title-alignment.vue ```vue ``` ## Loop banner (loop-banner) 配合跑马灯实现消息轮播通知栏(antd 用 react-fast-marquee,这里用等价 CSS 动画)。 ### loop-banner.vue ```vue ``` ## Error boundary (error-boundary) 以 Vue `onErrorCaptured` 捕获实际后代的渲染、setup、生命周期及所属事件错误;边界自身和脱离 Vue 调用链的错误不属于此边界。示例切换后代的渲染状态后抛错,以父级 key 重新挂载边界恢复内容,不新增 reset 方法。 ### error-boundary.vue ```vue ``` ## Content slot precedence (content-slots) 同名 slot 存在时优先于内容 prop,明确空内容不会回退。移除条件 slot 后恢复 prop。Alert 的 title/description 与 CollapsePanel 的 header 使用同一存在优先规则;面板标题视觉为空时保留 Toggle panel 的可访问名称,切换标题不会重建面板中的输入状态。 A present slot overrides its content prop, including intentionally empty content. Removing a conditional slot restores the prop. Alert title/description and CollapsePanel header follow the same presence rule; the visually empty panel header retains an accessible Toggle panel name, and header changes preserve panel input state. ### content-slots.vue ```vue ``` ## Component tokens (component-token) 通过当前 `theme.components.Alert` 设置圆角、普通内边距、带描述内边距和描述图标尺寸。切换回默认值时移除覆盖,输入值与焦点随原生节点保留。根元素显式 `--apollo-alert-*` 变量仍优先于 Provider;默认与紧凑算法的内边距来自当前 Alias Token。 Use the current `theme.components.Alert` values for all four tokens. Removing the overrides restores the source theme without remounting the editor. Explicit root CSS variables take precedence over Provider tokens. ### component-token.vue ```vue ``` --- # Anchor UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/components/anchor # Anchor Native links form a table of contents and track sections in the actual scrolling container. Items and default-slot composition share the same scrolling, indicator and Affix chain. ```vue ``` ## Anchor Props | Prop | Description | Type | Default | | --- | --- | --- | --- | | items | Recursive link data; a present default slot overrides it, including an empty slot | AnchorLinkItemProps[] | — | | direction | Navigation arrangement | vertical \| horizontal | vertical | | offsetTop | Affix top offset, wrapper maximum height and fallback scroll offset | number | — | | bounds | Active-section tolerance | number | 5 | | targetOffset | Scroll and detection offset, before offsetTop | number | — | | affix | Use Affix; an object retains dynamic offsetBottom/prefixCls configuration | boolean \| AnchorAffixConfig | true | | showInkInFixed | Show the indicator without Affix | boolean | false | | getContainer | Actual scroll target; omitted: Provider.getTargetContainer, then window | () => HTMLElement \| Window \| null \| undefined | — | | getCurrentAnchor | Pure highlight mapping; removal restores the raw href without changing event payloads | (activeLink: string) => string | — | | replace | Use replaceState; link-level settings take precedence | boolean | false | | prefixCls | Current component prefix and the default prefix of its Links | string | apollo-anchor | | classNames | root/item/itemTitle/indicator classes or a function receiving { props } | AnchorSemanticClassNames \| function | — | | styles | Corresponding Vue CSSProperties or a function receiving { props } | AnchorSemanticStyles \| function | — | A null/undefined container is explicitly pending: it releases the old listener and active detection without selecting window. Reactive template refs, Provider replacement and offset changes synchronize the current chain. ## Owned events | Component/event | Payload | Description | | --- | --- | --- | | Anchor change | currentActiveLink: string | The original href; highlight mapping does not change it | | Anchor click | event: MouseEvent, link: AnchorLinkInfo | Before selection, scrolling and history operations | | AnchorLink click | event: MouseEvent, link: AnchorLinkInfo | The same native event, before Anchor's aggregate notification | Link info is `{ href, title }`, preserving full title content. Any click listener may preventDefault to cancel selection, scrolling and history. Notification uses emits once, without manually invoking listeners again. Templates use @click/@change; programmatic listeners retain onClick/onChange. Modifiers, nonprimary buttons, download, new browsing contexts and external links keep native browser navigation. Plain same-document fragments resolve against their owning document and support native mouse and Enter activation. No extra arrow-key or focus model is introduced. Explicit replace uses replaceState for same-page fragments and retains location.replace for ordinary external URLs. ## Items, Link and slots | Data field | Description | | --- | --- | | key | Required string/number business key in items | | href | Required native link address | | title | Required VNodeChild in items, including zero, empty values, arrays and components | | target | Native a.target | | className | Existing item/Link wrapper class | | replace | Override the parent history behavior | | targetOffset | Link-level scroll/detection offset, before component offsets | | prefixCls | Explicit Link prefix | | children | Recursive items only; horizontal navigation does not render nested links | AnchorLink (also Anchor.Link) requires href. Its title data is optional so templates can use #title. There is no children prop; nested links use its default slot. | Component/slot | Responsibility | | --- | --- | | Anchor default | Supported Vue composition; presence overrides items, including conditional empty content | | AnchorLink title | Complete native anchor content; presence overrides title data even when empty or zero | | AnchorLink default | Existing vertical nested-link composition | Anchor and Link expose no public imperative control API or new v-model. Affix retains its own change event and updatePosition method. ## Native attrs, Provider and Tokens Anchor native attrs/class/style belong to its wrapper, outside the inner navigation and inside Affix. Precedence is Provider, component semantic styles, then native attrs. Link class/style/data/id retain their item wrapper; aria-*, tabindex and native focus/keyboard listeners belong to the actionable a. Active links default to aria-current="location". Conditional contents, same-key item replacement and configuration updates preserve nodes and focus. The current Provider prefix, direction, component configuration and theme remain reactive. Links inherit the current Anchor prefix unless explicitly overridden. Native dir lets logical CSS consume direction. The two component Tokens are linkPaddingBlock (paddingXXS by default) and linkPaddingInlineStart (padding); they project onto the actual consuming layer. Replacement, removal and explicit zero work, and existing aliases retain their derived roles. ## Resources and migration Listeners start after mounting. New targets, changed configuration, container switches and unmount cancel stale scroll animations. Each link owns registration, so removing one duplicate href does not remove the others. The indicator tracks direction, content and actual sizes; observations and frames are released on unmount. SSR starts no browser effects. No position polling, router adapter or controlled-highlight model is added. onClick/onChange are owned emits; the old claim that multiple arguments cannot be emitted is removed. Default composition no longer produces an upstream-derived deprecation warning. Replace the unused children prop with the default slot and use #title for content. A custom Anchor prefix now also owns its Links' default classes, keeping ink lookup consistent. The historical DOM baseline remains intact with exact prefix and native-dir differences. ## Demos basic, horizontal, onChange, onClick, replace, target-offset, target-offset-per-link, customize-highlight, static, style-class, component-token and bounds. The Token demo uses real ConfigProvider.components.Anchor. ## Component Token (component-token) 通过包裹类覆盖 `--apollo-anchor-link-padding-block` 与 `--apollo-anchor-link-padding-inline-start`,切换密度即可实时调整锚点链接的内边距。 ### component-token.vue ```vue ``` ## Bounds (bounds) 通过 `bounds` 调整锚点命中的顶部容差,配合 `getContainer` 指定内层滚动容器,滚动时即可观察高亮变化。 ### bounds.vue ```vue ``` ## Static Anchor (static) 设置 `affix={false}` 后锚点随文档流排列、不固钉,但仍会根据滚动容器高亮当前小节。 ### static.vue ```vue ``` ## Semantic Styles (style-class) 通过 `classNames` 定制锚点条目、标题与指示条,并用 `styles.itemTitle` 调整标题字距。 ### style-class.vue ```vue ``` ## basic (basic) Bind anchors to the adjacent scroll container. Click Section B/C or scroll its content to follow the active section. ### basic.vue ```vue ``` ## customize-highlight (customize-highlight) getCurrentAnchor changes the highlight only: Section B stays highlighted while links still scroll to their actual targets. ### customize-highlight.vue ```vue ``` ## horizontal (horizontal) Horizontal anchors control their own scroll area. Click a section or scroll to follow the bottom indicator. ### horizontal.vue ```vue ``` ## onChange (onChange) Scroll or click this demo’s anchors to inspect the change event. Targets belong to this demo only. ### onChange.vue ```vue ``` ## onClick (onClick) Click an anchor to record its link information; scrolling and browser history retain their normal behavior. Call preventDefault() in the callback to intercept it. ### onClick.vue ```vue ``` ## replace (replace) Use replaceState when clicking this demo’s anchors, so Back returns to the previous page rather than the previous anchor. ### replace.vue ```vue ``` ## target-offset (target-offset) Targets stop 60px below the scroll container’s top. targetOffset takes precedence over offsetTop. ### target-offset.vue ```vue ``` ## target-offset-per-link (target-offset-per-link) Set targetOffset per link and compare the 0, 120, and 60px landing positions. ### target-offset-per-link.vue ```vue ``` --- # App UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/components/app Provide independent Message, Notification and Modal services to descendants, with shared root styles for the page. ## Demos See [`demo/`](https://github.com/apollocmh/apollo-design-ui/tree/b6578306f58bf0918d0f4cb8519cf4cf1a900b15/packages/ui/src/app/demo) for service usage and replacement of current message/notification defaults. ## API | Prop | Description | Type | Default | |---|---|---|---| | prefixCls | Current host class prefix | `string` | `apollo-app` | | component | Native host; `false` renders content and service holders without a host | `'div' \| 'section' \| 'main' \| 'span' \| false` | `'div'` | | message | Message hook configuration, merged across nested Apps | `MessageConfigOptions` | — | | notification | Notification hook configuration, merged across nested Apps | `NotificationConfig` | — | The default slot accepts complete Vue content, including `0`, arrays, conditional and empty content. App has no owned events, v-model or imperative component ref methods. Native `class`, `style`, attributes and event listeners target the actual host. Provider `components.app.className/style` is merged first; local native styles take precedence. With `component=false`, attributes have no host and produce a development diagnostic. They are not transferred to children or overlays. Host changes follow Vue's native subtree replacement rules; the three service holders remain stable siblings of the host. ### useApp Call the named `useApp()` or `App.useApp()` in a **descendant component's setup**: ```ts const { message, notification, modal } = App.useApp(); const close = message.loading('Working', 0); close.then((terminated) => console.log(terminated)); const confirm = modal.confirm({ title: 'Continue?' }); confirm.then((accepted) => console.log(accepted)); ``` The exact `UseAppProps` result contains `message: MessageInstance`, `notification: NotificationInstance` and `modal: ModalHookAPI`. Methods retain their hook's real return values and service callbacks. Commands issued during descendant setup enter the corresponding holder queues. Every App owns independent instances; nested consumers receive the closest provider. Unmounting App terminates its work and releases overlays and resources. Without an App provider or Vue injection context, `useApp()` throws `[Apollo App] useApp() requires an App provider.` instead of returning empty fake APIs. Use a descendant's setup; the parent creating App cannot inject a child provider that does not yet exist. ### Configuration, theme and migration Message and notification configurations are shallowly merged by field from parent App to local object. Local fields win. Replacing an object removes its former exclusive fields; removing a local prop restores the current parent configuration. The injected object retains its identity while descendants and holders read current values. Existing notices follow their respective service's update contract. App has no component tokens. Its CSS consumes the global `colorText`, `fontSize`, `lineHeight` and `fontFamily` variables. Current Provider direction, prefix and root style replacement/removal update the host. Replace the old documented `className/rootClassName` with native `class`; native `style` accepts StyleValue. AppConfig and useApp now expose actual configuration and service types. Type exports: `AppProps`, `AppComponentType`, `AppConfig`, `AppSlots`, `UseAppProps`. ## basic (basic) Get instance for `message`, `notification`, `modal`. ### basic.vue ```vue ``` ## config (config) Configure `message` and `notification`. Switching defaults keeps the same App services. ### config.vue ```vue ``` --- # AutoComplete UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/components/auto-complete A text input with selectable suggestions. The shared Select engine owns options, keyboard interaction, accessibility and theme behavior. ## Examples See [`demo/`](https://github.com/apollocmh/apollo-design-ui/tree/b6578306f58bf0918d0f4cb8519cf4cf1a900b15/packages/ui/src/auto-complete/demo). The basic example binds three models and demonstrates keyboard backfill; options support live conditional content. ## API ### Props | Prop | Description | Type | Default | |---|---|---|---| | value / defaultValue | Controlled value / initial value; `v-model:value`, with raw values from typing and selection | `SelectValue` | — | | searchValue | Search text; `v-model:search-value` | `string` | `''` | | open / defaultOpen | Controlled popup / initial state; `v-model:open` | `boolean` | `false` | | options | Suggestions; explicit `[]` also takes precedence over option slots | `DefaultOptionType[]` | — | | dataSource | Deprecated text, `{ value, text? }`, or Option/OptGroup VNodes; existing conversion is retained | `DataSourceItemType[]` | — | | placeholder | Placeholder text; rich content uses `#placeholder` | `string` | — | | allowClear | Clear button, icon and accessible label configuration | `SelectProps['allowClear']` | `false` | | disabled / size / variant / status | Shared Select state and appearance | — | — | | showSearch | Search algorithms: `filterOption/filterSort/optionFilterProp/autoClearSearchValue` | `boolean \| SelectSearchConfig` | `true` | | filterOption | Filter receives an actual option; `false` retains all suggestions | `boolean \| (text, option) => boolean` | — | | defaultActiveFirstOption | Activate the first suggestion; `false` waits for keyboard or pointer activation | `boolean` | `true` | | backfill | Preview keyboard candidates; Enter/Tab or a click commits, with no value/search notifications during preview | `boolean` | `false` | | autoFocus / maxLength / id / tabIndex | Focus, text length, ID and Tab order of the actual input | — | — | | listHeight / listItemHeight / virtual | Option dimensions and virtualization | same as Select | — | | popupMatchSelectWidth / placement / getPopupContainer | Popup width, placement and container, including ShadowRoot | same as Select | — | | classNames / styles | Object or `({ props }) => object`; semantic `root/prefix/input/placeholder/content/clear/popup.{root,list,listItem}` | — | — | Controlled updates are proposals. Rejection retains the accepted value; releasing control retains the last accepted value. Keyboard backfill is a temporary preview. Pointer activation does not backfill. Accepted value changes, typing, actual closure, removing `backfill` or disabling the control clear the preview; reopening does not restore it. Numeric `0` is a valid option value. Default slots are classified during render, preserving conditional slots, `v-if/v-for`, dynamic groups and existing option caching. Rich `dataSource` content remains data; top-level content extension uses slots. Replacing the input with a custom input/textarea remains unsupported and produces an explicit warning. AutoComplete has no public PurePanel entry. ### Events | Event | Payload and behavior | |---|---| | change / update:value | `(value, option)` / `(value)`; typing, selection or clearing commits a value | | search / update:searchValue | `(text: string)`; search notification / model proposal; selection synchronizes search, while derived external-value synchronization does not notify twice | | select / deselect | `(value: string \| number, option)`; option selection; combobox has no multiple-selection removal action | | openChange / update:open | `(open: boolean)`; notification and model proposal | | focus / blur | `(event: FocusEvent)`; actual control focus | | clear | Clear operation | | popupScroll / inputKeyDown | `(event: Event)` / `(event: KeyboardEvent)` | Notifications use typed emits. The `onSearch/onChange` fields accepted by `h()` are Vue listeners, not callback Props called manually. Replace `onDropdownVisibleChange` with `@openChange`; replace `showSearch.onSearch/searchValue/searchIcon` with `@search`, the top-level search model and `#searchIcon` respectively. ### Slots `default` (Option/OptGroup data), `prefix`, `placeholder`, `notFoundContent`, `clearIcon`, `loadingIcon`, `searchIcon`, `labelRender="{ value, label }"`, `optionRender="{ option, index }"`, `popupRender="{ menu }"`, `menuItemSelectedIcon="{ value, disabled, isSelected }"`, and `suffixIcon="{ searchValue, open, focused, showSearch, loading }"`. Slots forward dynamically. Empty content intentionally hides the result, and numeric `0` remains visible. There is no default arrow; `#searchIcon/#loadingIcon` can customize their corresponding state. ### Attrs, Provider and theme Native `class/style/data-*` target the selector root; `id/tabindex/role/aria-*` target the actual input. Attrs are read during rendering, classes merge once, and string/array styles and removal remain current. Fallthrough cannot replace the owned combobox mode or notification handlers. Current `components.autoComplete` classes, styles, semantics and search/clear configuration support replacement and removal. Select and AutoComplete component configuration remain isolated; the shared engine retains global size, direction, Form and Compact contexts. Both root and teleported popup use Select Tokens; AutoComplete has no separate tokens. ### Expose | Member | Description | |---|---| | focus(options?: FocusOptions) / blur() | Operate on the actual input | | scrollTo(arg?) | Number means a pixel coordinate; items use `{ index?, key?, align? }`; the existing `{ top }` coordinate form remains supported | | nativeElement | Actual selector root, `HTMLElement \| null` | Retained style aliases: `dropdownMatchSelectWidth` → `popupMatchSelectWidth`, `popupClassName/dropdownClassName` → `classNames.popup.root`, and `dropdownStyle` → `styles.popup.root`. Content functions use native slots such as `#popupRender`. ## Custom Options (custom) 使用 `#optionRender` 插槽渲染带 `Tag` 的自定义选项,同时保留 AutoComplete 的输入与筛选。 ### custom.vue ```vue ``` ## Disabled In Form (disabled-in-form) `Form` 的 `disabled` 会级联禁用内部 `AutoComplete`,用 `Switch` 切换即可看到启用/禁用状态。 ### disabled-in-form.vue ```vue ``` ## Customize Clear (customize-clear) 开启 `allowClear` 后用 `#clearIcon` 替换清除图标,`onClear` 回调实时统计清空次数。 ### customize-clear.vue ```vue ``` ## Customize Render Panel (render-panel) 通过 `#popupRender` 拿到原始候选菜单 `menu`,在它前后追加面板标题、分隔线与关闭按钮。 ### render-panel.vue ```vue ``` ## allow-clear (allow-clear) `allowClear` with custom clear icon. ### allow-clear.vue ```vue ``` ## and-select (and-select) AutoComplete combined with Select sharing the same options. ### and-select.vue ```vue ``` ## basic (basic) Basic usage with controlled mode. The second input binds all three models. With `backfill`, keyboard navigation previews a candidate; Enter/Tab or a click commits the value. ### basic.vue ```vue ``` ## certain-category (certain-category) Complete suggestions via `showSearch.onSearch`. ### certain-category.vue ```vue ``` ## non-case-sensitive (non-case-sensitive) Case-insensitive filtering via `filterOption`. ### non-case-sensitive.vue ```vue ``` ## options (options) Options via the `options` prop. ### options.vue ```vue ``` ## status (status) Validation status. ### status.vue ```vue ``` ## style-class (style-class) Semantic `classNames` / `styles` (object and function variants). ### style-class.vue ```vue ``` ## uncertain-category (uncertain-category) Options follow the input value. ### uncertain-category.vue ```vue ``` ## variant (variant) Four variants. ### variant.vue ```vue ``` --- # Avatar UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/components/avatar Represent a person or object using an image, icon or characters. Static avatars do not enter the Tab order; use a native link or button for an action. ## Demos Ten examples cover size/shape, content types, dynamic characters/gap, badges, groups, overflow counts, image fallback, hidden layouts, responsive sizes and current component tokens. The max-count example switches whether its visible budget includes the indicator; `max.count` itself always counts visible children only. ## Avatar Props | Property | Description | Type | Default | |---|---|---|---| | prefixCls | Local component class prefix | `string` | current ConfigProvider | | shape | Local shape overrides Group | `'circle' \| 'square'` | Group → `'circle'` | | size | Local size overrides Group and global size; responsive maps use the largest matching configured breakpoint | `SizeType \| 'default' \| number \| ScreenSizeMap` | Group → componentSize → `'medium'` | | gap | Horizontal space reserved when scaling default content, px | `number` | `4` | | src | Image URL or complete VNode data; failures fall back to icon/default | `VNodeChild` | — | | srcSet | Native image srcset; changing it retries the image | `string` | — | | draggable | Native image draggable attribute | `boolean \| 'true' \| 'false'` | — | | icon | Complete icon data | `VNodeChild` | — | | alt | Native alternative; decorative by default, provide a name when identity matters | `string` | `''` | | crossOrigin | Native image crossorigin | `'' \| 'anonymous' \| 'use-credentials'` | — | | beforeFallback | Synchronous hook after error; return false to retain the failed image | `(event: Event) => boolean \| void` | — | Native class/style/id, data/ARIA and other native listeners target the stable span root. String, array and object styles override size, theme and Provider styles. Default text is visible during SSR; root and content resize observation updates its scale after mounting. ## Slots / Events | Slot | Content | |---|---| | image | Complete image content; its presence overrides src, including an intentionally empty slot | | icon | Complete icon content when no image exists; its presence overrides icon data, including an empty slot | | default | Characters or complete business content when no image/icon exists | | Event | Payload | Behavior | |---|---|---| | click | native `MouseEvent` | Once per root click; merged listeners and `.once` work | | error | native image `Event` | Once per image failure; listener return values do not cancel fallback, use beforeFallback | ## AvatarGroup / Avatar.Group Both exports identify the same installable component. | Property | Description | Type | |---|---|---| | prefixCls | Group class prefix | `string` | | size | Current inherited size, including numbers, zero and responsive maps; children may override it | `AvatarSize` | | shape | Inherited shape | `'circle' \| 'square'` | | max | `{count?, style?, popover?}`: visible count, indicator style and Popover configuration | `AvatarGroupMax` | `max.count` excludes the `+N` indicator. Zero, missing, negative and nonfinite counts are unlimited; positive fractions are floored. Direct default-slot children count after flattening Fragments and skipping comments. Render multiple avatars with a direct `v-for`; Group does not inspect a business component's internal output. Overflow owns a native button. Default hover also supports click and Enter/Space; Escape closes while preserving button focus. Explicit focus triggers and controlled `max.popover.open` remain Popover configuration. `max.popover.content` may override popup content. Object/function classNames, styles, containers, triggers and open callbacks are forwarded; rootClassName adds a popup class. Hidden content is destroyed by default; `destroyOnHidden:false` preserves its state. Native Group class/style/attrs target its div. Both components expose only nullable `nativeElement` (span/div). There is no avatar business model or additional instance method. ## Component Token Configure current tokens through `ConfigProvider :theme="{components:{Avatar:{…}}}"`. Source replacement/removal, nested Providers and all four algorithms apply to each avatar and overflow content. Native style variables override their owning root. | Token | Type | Default source | |---|---|---| | containerSize / containerSizeLG / containerSizeSM | `number` | controlHeight / controlHeightLG / controlHeightSM | | textFontSize / textFontSizeLG / textFontSizeSM | `number` | fontSize | | iconFontSize / iconFontSizeSM | `number` | average icon size / fontSize | | iconFontSizeLG | `number \| string` | fontSizeHeading3 | | groupSpace | `number` | marginXXS | | groupOverlapping | `number`, may be negative | -marginXS | | groupBorderColor | `string` | colorBorderBg | See the [Avatar migration notes](https://github.com/apollocmh/apollo-design-ui/blob/master/docs/migrations/avatar-contracts.md) for development-stage event and Group alias changes. ## Basic (basic) Five sizes and circle/square shapes, with complete icon VNode data. ### basic.vue ```vue ``` ## Type (type) Images, complete VNodes, custom colours, characters and icons. Pair foreground and background colours. ### type.vue ```vue ``` ## Autoset Font Size (dynamic) Switch names, colours and gap; text refits its current size. ### dynamic.vue ```vue ``` ## With Badge (badge) Combine badges and avatars. ### badge.vue ```vue ``` ## Avatar.Group (group) Combine avatars, a link and Tooltip. max.count counts visible children; the overflow button is additional. ### group.vue ```vue ``` ## maxCount includes overflow (max-count) Render direct v-for children. The switch changes the demo budget: two visible items plus the indicator, or three plus the indicator; it does not redefine max.count. ### max-count.vue ```vue ``` ## Fallback (fallback) Invalid local image data triggers error and falls back to characters. Custom image VNodes own their image error handling. ### fallback.vue ```vue ``` ## Compute alignment when hidden (toggle-debug) Toggle visibility, avatar size and outer visual scaling to verify measurement after showing. ### toggle-debug.vue ```vue ``` ## Responsive size (responsive) Use the largest matching configured breakpoint, with visible text to inspect the size. ### responsive.vue ```vue ``` ## Current component tokens (component-token) Change the twelve existing Avatar tokens through the current ConfigProvider. Toggle the override off to restore inherited values. Open overflow with a pointer or Enter/Space to inspect hidden avatar spacing. ### component-token.vue ```vue ``` --- # BackTop UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/components/back-top A button to scroll back to top. > ⚠️ Deprecated since antd 6.x. Use `FloatButton.BackTop` instead. ## API | Prop | Description | Type | Default | |---|---|---|---| | visibilityHeight | Show after scrolling past this value (px) | `number` | `400` | | duration | Scroll-to-top duration (ms; <=0 jumps directly) | `number` | `450` | | target | Reactive container getter; supports pending template refs | `() => HTMLElement \| Window \| Document \| null` | `ownerDocument` | | prefixCls | Component class prefix | `string` | `apollo-back-top` | The `click` event emits the original `MouseEvent` once after scrolling starts; use `@click` or `onClick` with `h()`. Vue `.once` works normally. The default slot accepts complete text, numbers, sibling nodes and Fragments. An explicitly empty slot hides the button; an absent slot uses the default icon. Slot VNodes are preserved inside a stable `-custom` span. `nativeElement` exposes the actual `HTMLButtonElement | null`. The root is a native `type="button"` control with Tab, Enter, Space and focus styles. Hidden controls are excluded from keyboard navigation. Native class, style, ARIA, data attributes and listeners belong to this button. Its default icon label is “Back to top”; use `aria-label` to localize it. Give custom icon content an accessible name and keep nested interactive controls outside the slot. Current `ConfigProvider.components['back-top'].className/style` apply to the root; native style wins. `theme.components.BackTop.zIndexPopup` defaults to `zIndexBase + 10`. Theme `motion: false` and the system reduced-motion preference disable scrolling animation. ## Design Notes - `visibilityHeight={0}` keeps it always visible. - The responsive inset narrows at viewports <= 768px / <= 480px. - Changing targets, clicking again or unmounting cancels the previous scroll animation. Container listeners and pending scroll frames are released on target changes and unmount. ## Development migration (2026-10-30) Under ADR 0007, the old root `div` becomes a native button, default content uses spans, and custom content gains a stable span host. Update tag selectors and move nested buttons/links outside the slot. Existing component classes remain available. The default slot now renders all nodes instead of cloning its first child. This development correction has no compatibility adapter or deprecation period; original reference baselines remain unchanged with exact differences asserted by this component's tests. ## Basic (basic) Scroll the content past 100px to reveal the button. The target getter follows the template ref, and `@click` receives the native click event. The control stays inside the demo container and reports completed activations. (Deprecated — use `FloatButton.BackTop`.) ### basic.vue ```vue ``` --- # Badge UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/components/badge A small status descriptor for UI elements. ## When To Use - Displayed at the top-right of icons or avatars to indicate messages or items needing attention. - The count can be a number, text, or a red dot. ## Examples See [`demo/`](https://github.com/apollocmh/apollo-design-ui/tree/b6578306f58bf0918d0f4cb8519cf4cf1a900b15/packages/ui/src/badge/demo) (13 demos, including numeric counts and rich template content). ## API ### Badge | Prop | Description | Type | Default | |---|---|---|---| | prefixCls | DOM prefix; custom prefixes need author-provided CSS | `string` | `apollo-badge` | | scrollNumberPrefixCls | Digit track prefix | `string` | `apollo-scroll-number` | | count | Number to display (`null` hides; overflow shows `+`) | `VNodeChild` | `null` | | overflowCount | Max count | `number` | `99` | | dot | Show a dot, overriding count including zero | `boolean` | `false` | | showZero | Show when value is 0 | `boolean` | `false` | | size | Size (`default` deprecated, equals `medium`) | `'medium' \| 'small'` | `'medium'` | | status | Status dot | `'success' \| 'processing' \| 'error' \| 'default' \| 'warning'` | — | | color | Custom color | `string` | — | | text | Status text | `VNodeChild` | — | | title | Native title (`null`/`false` disables; falls back to count) | `string \| null \| false` | — | | offset | Offset `[x, y]` | `[number \| string, number \| string]` | — | | classNames / styles | Root and indicator semantics; object or props function | — | — | Native Vue class/style, id, ARIA, tabindex and listeners belong to the root span. Style accepts objects, strings and arrays; use styles.indicator for the indicator. Badge declares no business emits or v-model. Changing status/count retains the root and its focus. Independent text=0 does not hide a nonzero count. Explicit title also applies to standalone status indicators; null/false disables it. Non-scalar counts (VNode, arrays, Fragments, text nodes and multiple-root components) share a native indicator and complete rendering with #count. Business nodes retain their attributes and identity; semantic styles/classes, title and offset belong to the indicator. Vue-empty counts create no empty badge and do not hide independent captions. An empty conditional component hides its host without remounting the business instance. ### Badge Slots | Slot | Description | | --- | --- | | default | Content wrapped by the badge | | count | Static rich indicator; overrides the count prop without overflow or digit rolling | | text | Rich status text; overrides the text prop | Slot presence determines precedence, including empty results. Removing a conditional slot restores its prop. Text `0` in #count is static content; showZero and overflowCount apply to numeric props. Dot mode overrides both count channels. Rich indicators retain indicator styles, offset and their previous visible content while leaving. VNodes do not generate an automatic title. Use the count prop for digit animation. ### Badge.Ribbon | Prop | Description | Type | Default | |---|---|---|---| | prefixCls | DOM prefix | `string` | `apollo-ribbon` | | className | Existing independent indicator class; use native class for the wrapper | `string` | — | | text | Ribbon text | `VNodeChild` | — | | color | Color | `string` | — | | placement | Placement corner | `'start' \| 'end'` | `'end'` | | classNames / styles | Root, indicator and content semantics; object or props function | — | — | Ribbon default wraps business content. Its #text accepts complete content, with presence taking priority even when empty; removing the slot restores the text prop. VNodeChild arrays, Fragments and zero render normally. Native attrs/class/style belong to the wrapper; styles.indicator/content target the ribbon and its text. ### Expose and current configuration BadgeRef and RibbonRef expose readonly nativeElement: HTMLElement|null, pointing to the actual current root and clearing on unmount. ConfigProvider.components.badge/ribbon, direction and prefix remain reactive, including replacing/removing semantic objects or functions. Provider style is a separate configuration field: Badge standalone status targets root, other Badge modes target indicator; Ribbon targets indicator. Use semantic styles for an explicit region. ## Theme ### Component Token 9 tokens: `indicatorZIndex`, `indicatorHeight`, `indicatorHeightSM`, `dotSize`, `textFontSize`, `textFontSizeSM`, `textFontWeight`, `statusSize`, `paddingInline`. Values derive from current aliases and consume theme.components.Badge, including applicable zero values, replacement and removal. Explicit root CSS variables win. textFontSize/textFontSizeSM/textFontWeight apply to counts. Small digit tracks use the actual small height. Reduced-motion disables ripple, digit transitions and enter/leave motion. Opaque count/ribbon backgrounds select readable foregrounds while preserving preset backgrounds. Explicit semantic text colors win; authors pair foregrounds with custom gradients, alpha backgrounds or complete style overrides. Extra animation digits are hidden from accessibility; no live region is created automatically. Negative integers keep their sign. Numeric offsets use px, while CSS lengths, percentages and expressions retain their units. See the [development migration](https://github.com/apollocmh/apollo-design-ui/blob/b6578306f58bf0918d0f4cb8519cf4cf1a900b15/docs/migrations/badge-contracts.md) for native root style, complete content and reference fixes. Original reference HTML/PNGs remain evidence, not the specification of Vue usage. ## Basic (basic) 简单的徽标展示,当 `count` 为 `0` 时默认不显示,但是可以使用 `showZero` 修改为显示。 ### basic.vue ```vue ``` ## Standalone (no-wrapper) 不包裹任何元素即是独立使用,可自定样式展示。 ### no-wrapper.vue ```vue ``` ## Overflow Count (overflow) `overflowCount` 封顶数字,超过显示 `+`。 ### overflow.vue ```vue ``` ## Red badge (dot) 没有具体的数字。`dot` 优先级高于 `count`。 ### dot.vue ```vue ``` ## Dynamic (change) 展示动态计数、负号及数字滚动。动画轨道中的额外数字不参与朗读,系统 reduced-motion 下停止滚动过渡。 ### change.vue ```vue ``` ## Clickable (link) 用 a 标签包裹即可获得链接语义。 ### link.vue ```vue ``` ## Offset (offset) 设置偏移量,`[x, y]` 分别为水平(`inset-inline-end` 方向)与垂直偏移。 ### offset.vue ```vue ``` ## Size (size) `size="small"` 缩小徽标(`default` 为废弃用法,等价 `medium`)。 ### size.vue ```vue ``` ## Status (status) 用于表示事态的状态,`processing` 会触发波纹动画。 ### status.vue ```vue ``` ## Colorful (colorful) 预设 13 种颜色(也可传自定义色串)。 ### colorful.vue ```vue ``` ## Ribbon (ribbon) 缎带徽标(`Badge.Ribbon`),支持预设色与自定义色、`start` / `end` 两个挂角。 ### ribbon.vue ```vue ``` ## Semantic style & class (style-class) 通过 `classNames` / `styles` 定制语义结构(root / indicator)。按钮切换九个已有 Token、适用零值与默认恢复;方向改变时输入草稿保留。Vue 原生 class/style 控制根,指示器样式使用 styles.indicator。 ### style-class.vue ```vue ``` ## Template content and numeric counts (content-slots) `#count` renders static rich content without numeric overflow or digit rolling. Use the count prop for animated numbers. Badge and Ribbon #text accept complete rich content. A present slot overrides its prop, including empty content; removing the slot restores the prop. Dot mode takes precedence, including zero counts. Leaving indicators retain their last visible content and both business inputs stay mounted. ### content-slots.vue ```vue ``` --- # BorderBeam UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/components/border-beam A decorative light beam flowing along an HTML container's border. ## API | Prop | Description | Type | Default | |---|---|---|---| | prefixCls | Full effect class and runtime CSS variable prefix | `string` | Provider prefix + `-border-beam` | | color | Solid color or gradient stops (0–100 mapped to 0–70%) | `string \| { color: string; percent: number }[]` | Theme primary gradient | | count | Finite values ≥1 are rounded down; other values use 1 | `number` | `1` | | duration | Finite, positive seconds per revolution; other values use 6 | `number` | `6` | | lineWidth | Beam thickness; numbers use px | `number \| string` | Theme `lineWidth` | | outset | Uniform inset offset; otherwise follows each host border width | `number \| string` | — | | size | Beam head length; numbers use px | `number \| string` | `100px` | | classNames.effect | Class on each decorative effect div | `{ effect?: string }` | — | | styles.effect | Inline style on each decorative effect div | `{ effect?: CSSProperties }` | — | ## Slots and native attrs The default slot accepts `VNodeChild`. One HTML root is decorated, including a component's conditional or asynchronously resolved single root. Comments, whitespace and single-root Fragments preserve the host. Text, SVG and multiple meaningful roots remain complete and receive no effect. There is no extra layout container. Native `class`, `style`, `data-*`, `aria-*` and listeners merge into the selected host VNode using Vue semantics. The host's own styles take precedence for overlapping properties; component hosts follow their normal attrs forwarding rules. Original keys, template refs, ref arrays, named slots and lifecycle hooks remain owned by their caller. Take a template ref on the child to access its element or component; BorderBeam has no public methods, events or model. The host supplies its positioning context, usually `position: relative`. Effects inherit its border radius, ignore pointer events and are `aria-hidden`. Runtime effect variables merge before Provider `style`, Provider `styles.effect`, then component `styles.effect`; the latter wins. Provider `className` and `classNames.effect` remain effect configuration. A visible host's border widths are sampled on one shared 500ms clock, using that host's document. Hidden documents skip style reads and refresh when visible. No HTML hosts means no sampler subscription; host replacement, document adoption and unmount release their resources. SSR preserves content and creates no effects or timers. Reduced motion hides the beam. ## Migration Component `className` and effect-targeting `style` Props have been removed. Use native `class`/`style` for the host and `classNames.effect`/`styles.effect` for the decorative layer. If Vue replaces the host's text content, its removed decoration is recreated while the host's identity and focus remain intact. ## Basic (basic) 包裹任意内容,展示沿边框流动的流光。 ### basic.vue ```vue ``` ## Hover (hover) 通过状态控制流光的显示与隐藏。鼠标悬浮或键盘聚焦都可预览;装饰层透明度变化时保留同一宿主,避免切换 DOM 引起闪动。 Hover or focus the same host to preview the effect without remounting its content. ### hover.vue ```vue ``` ## Multiple beams (count) `count` 大于 1 时展示多条错相流动的流光。 ### count.vue ```vue ``` ## Custom container (custom-container) 流光跟随宿主的圆角与边框(`border-radius: inherit`)。原生 `class/style` 修饰宿主,`styles.effect` 只修饰装饰层。 ### custom-container.vue ```vue ``` ## Gradient color (customized-color) `color` 传色标数组(0–100 会线性映射到 0–70% 保留尾部淡出)。 ### customized-color.vue ```vue ``` ## Duration (duration) `duration` 控制单圈时长(秒)。 ### duration.vue ```vue ``` ## Size (size) `size` 控制流光头部长度。 ### size.vue ```vue ``` ## Line width (line-width) `lineWidth` 控制流光描边厚度(默认随宿主 border 宽度)。 ### line-width.vue ```vue ``` --- # Breadcrumb UI version: 0.1.9 Source commit: b6578306f58bf0918d0f4cb8519cf4cf1a900b15 Page: https://apollocmh.github.io/apollo-design-ui/components/breadcrumb Shows the current page in a hierarchy and provides upward navigation. Use data items or compose `BreadcrumbItem` / `BreadcrumbSeparator` in the default slot. ## Examples `demo/` contains 11 paired examples covering navigation, icons, parameters, menus, separators, native children, scoped content, semantic styles and theme variables. `debug-routes` demonstrates migration of legacy route data. ## API ### Breadcrumb | Property | Description | Type | Default | | --- | --- | --- | --- | | items | Data source; a provided `[]` stays empty and does not evaluate the default slot | `BreadcrumbItemInput[]` | — | | routes | Deprecated legacy data channel; use items | `BreadcrumbItemInput[]` | — | | params | Replaces complete `:key` names in string titles/paths; supports repeated names, zero and empty strings; missing/null values preserve placeholders | `Record` | `{}` | | separator | Automatic separator; slot first, then prop → current Provider → default | `VNodeChild` | `/` | | dropdownIcon | Decorative menu button icon; slot first, then prop → current Provider → default | `VNodeChild` | `DownOutlined` | | prefixCls | Current prefix of this navigation and its owned Item/Separator nodes; custom prefixes require matching static CSS | `string` | `apollo-breadcrumb` | | classNames | root/item/separator classes; functions receive current resolved props | `BreadcrumbSemanticClassNames \| ((info: { props: BreadcrumbProps }) => BreadcrumbSemanticClassNames)` | — | | styles | Styles for the same semantic regions; functions receive current resolved props | `BreadcrumbSemanticStyles \| ((info: { props: BreadcrumbProps }) => BreadcrumbSemanticStyles)` | — | Native class/style, id, ARIA/data attrs and listeners belong to the root nav. Native style overrides semantic styles and theme variables. Provider `components.breadcrumb` supports className, style, classNames, styles, separator and dropdownIcon, using current values. Breadcrumb has no component event or model; it exposes `nativeElement: HTMLElement | null`. | Slot | Scope | Behavior | | --- | --- | --- | | default | — | Native children, only when neither items nor routes is provided; retains caller keys | | itemRender | `{ route, params, routes, paths, href }` | Replaces a data item's default content; paths/href belong to that item | | separator | — | Replaces automatic separators | | dropdownIcon | — | Replaces the decorative menu button icon | A present slot wins, including intentionally empty content. Conditional slots update and restore prop/default content when removed. The last item has no automatic separator. Custom itemRender content goes into a stable host; callers own its links, ARIA, listeners and styles. ### Data items `BreadcrumbItemInput = Partial`. | Field | Description | Type | | --- | --- | --- | | key | Business identity; defaults to index; provide stable keys when reordering | `string \| number` | | title | Complete Vue content; only strings substitute parameters | `VNodeChild` | | href | Direct destination | `string` | | path | Accumulates this and previous path segments as `#/a/b`; takes precedence over href | `string` | | className / style | Classes and effective inline styles of the default link/text/action button | `string` / `CSSProperties` | | onClick | Native click on default content; an item without href uses a native button | `(event: MouseEvent) => void` | | `aria-*` / `data-*` | Attributes of default content | — | | menu | Menu items and Menu configuration | `BreadcrumbItemMenu` | | dropdownProps | Dropdown configuration; controlled state uses open/onOpenChange | `DropdownProps` | | breadcrumbName / children | Deprecated legacy routes title/one-level menu conversion | `string` / `Omit[]` | | type / separator | `type: 'separator'` creates an independent decorative separator and does not accumulate a path | `'separator'` / `VNodeChild` | Menu items support key, label/title, href, path, and Menu's disabled, icon, extra and business event fields. Explicit href wins; otherwise path appends to the current breadcrumb href, or is used directly without a base. A provided label, including empty content, takes precedence over title. ### BreadcrumbItem / BreadcrumbSeparator BreadcrumbItem supports href, menu, dropdownProps, dropdownIcon, separator and prefixCls. The default slot supplies complete content; #separator and #dropdownIcon override local props and then fall back to the owning Breadcrumb's current values. Native class/style, id, ARIA/data attrs and listeners belong to the owning li. @click receives one native MouseEvent. The final item's automatic separator is suppressed. BreadcrumbSeparator has a default content slot and native attrs on its decorative `