Elements

组件

全局配置 Config Provider

ConfigProvider:提供设计令牌层 `[data-density]` 选择器定义的四个密度档位。密度只压缩留白和控件高度,不牺牲可读性。

#基础用法

config-provider/basic Vue React

Outside — the page's own density and ink

Brush, ink, paper, and the inkstone — the same furniture.

Inside — compact controls under the qinghua accent

Density and pigment are fixed in here — mode, scene and paper still ride the page around them.

config-provider/nested Vue React

Comfortable — the outer provider's tier

Local to this host element and its descendants.

Compact — the inner provider, its own scope only

The outer scope stays where it was.

#属性

#ConfigProvider

全局配置的声明式宿主。这个元素既承载设计令牌层属性([data-density] 与 [data-accent] 可放在任意元素上),又通过 useConfig 把同一组值提供给后代,使交互行为(格式化、消息)和视觉主题共用一个配置来源。

属性类型默认值描述
densityString as PropType<ConfigDensity>undefined—
sceneString as PropType<ConfigScene>undefined—
accentStringundefined—
dirString as PropType<"ltr" | "rtl">undefined—
localeStringundefined—