跳转到内容

TreeSelect 树选择 ​

浮层内放一棵树的选择器,适用于层级不规整、深浅不一的数据。

用法 ​

收起时整个控件只占触发器一个 Tab 位,展开时焦点真正进入树、落在已选中的行上

文档

已选:(无)

组件结构 ​

加粗的是必需部件。

data-scope="tree-select":root · label · control · trigger · value-text · indicator · clear-trigger · positioner · content · tree · item · item-text · item-description · item-suffix · item-indicator · branch · branch-control · branch-trigger · branch-indicator · branch-text · branch-content · branch-loading · branch-error · branch-retry-trigger · branch-empty · empty · loading · footer · hidden-input

示例 ​

选中与展开双受控 ​

两份集合都由宿主持有:组件只发事件,宿主写回后才变化,回显的就是写回的两份

文档

已选:guide · 展开:docs

多选与表单 ​

multiple 下确认键是切换、浮层不收起;写了 hidden-input 才随表单提交,多个值按逗号拼接为一串

提交范围

已选:index

变体 ​

variant 只更换触发框的描边与底色,浮层与树的外观不随之变化

outline
subtle
ghost

颜色 ​

tone 决定使用哪族颜色,与 variant 正交,这里统一使用 subtle 形态

brand
neutral
success
warning
danger
info

尺寸 ​

size 更换行高、内边距与字号,不写即默认档

sm
缺省
lg

禁用、只读与校验失败 ​

disabled 连键盘入口都没有;readOnly 照常展开浏览但值不可修改也不可清空;invalid 只报告校验态,交互一切照常

禁用
只读
校验失败

首次全量加载与空集合 ​

第一次展开才取整棵树;正式 Loading/Empty 与候选树互斥,状态文字不进入选值或键盘导航,底部按钮可重放有数据与零集合响应

投放城市

已选:(无)

浮层中的操作区 ​

footer 写在 content 中、tree 的兄弟:它不进入 role=tree 的拥有关系,方向键也无法到达;在浮层内点击按钮不算点击外部,浮层不会因此收起

文档

级联勾选与回显策略 ​

multiple 加 cascade 内建父子传导:点击分支整枝勾选、子全勾则父勾、部分勾选为半选;对外值按 checked-strategy 收敛,parent 档整组选满只报告组名

权限

对外值(parent 收敛):user:view

浮层内关键词过滤 ​

输入框是树的兄弟节点,树的键盘处理器挂在 tree 上,输入不会被连打检索接管;更换 collection 后可见行与方向键顺序随之重算

投放城市

只选文件不选目录 ​

选中值与展开态双受控:目录的值不写回,紧随其后的收起意图也一并忽略,点击目录只剩展开收起

附件

已选:(无)

只提供数据自动渲染 ​

Vue 未写默认插槽时按 collection 铺开整套部件:带 children 的节点渲染为 branch、其余渲染为 item,文本与禁用都查询数据;label 提供标题,clearable 带上清空按钮(手写部件不使用它),产出的 DOM 与手写全套部件完全一致;Web Components 没有自动铺树,节点部件照常手写、只报告 value

文档

已选:guide

设计指引 ​

何时使用 ​

  • 选项是任意形状的树(组织架构、目录、权限节点)。
  • 需要在浮层内展开、勾选,并把选中项回显在触发器上。

何时不用 ​

  • 层级规整、层数固定时,级联选择的分列展开更快。
  • 树本身是页面主体时,使用树。

特性 ​

  • 选中与展开两套值各自可受控。
  • 原生表单按每个选中值生成一个同名隐藏字段;['a,b', 'c'] 用 FormData.getAll(name) 读取为两个原值,不使用逗号拼接。零选中没有提交项,禁用不提交,只读仍提交。
  • 声明 HiddenInput 部件才参与原生表单。form 可指定外部表单 ID,提交与重置使用同一所有者;显式 ID 不存在时不回退祖先表单。非受控 reset 恢复 defaultValue,受控值由业务响应重置请求。
  • 单选、多选、分支与叶子统一用末端对号表示选中,级联半选使用横线;正文保持正常颜色和字重,中性底只用于悬停和键盘高亮。展开箭头位于行首,与选择标记分开。
  • cascade 与 checkedStrategy 决定勾选是否带子级、回显给哪一层。
  • 节点可逐条声明语气,不向下传导;叶子行与分支行同样表达。
  • 节点可写副文本,第 2 行放一句解释,不进连打检索串。
  • 节点行尾留一格给作者(计数、徽标);行首那一格归勾选框与展开箭头。
  • 支持只选叶子不选分支、浮层内关键词过滤、子节点异步加载:节点用 hasChildren: true 声明懒分支,首次展开由 loadChildren({ node, signal }) 获取直接子项;失败保留 cause,默认 branch-error 与 branch-retry-trigger 直接可用。
  • 整树空(empty)与在途(loading)默认自动渲染;collection 看有效树长度,手写节点由适配器只上报挂载事实、Headless 统一判空。loading 为真时树报 aria-busy,空态让位;作者写同名部件时保留作者结构与文案。
  • 输入框保持实体;浮层使用 M2 磨砂材质、内侧顶光和四向短位移,不缩放树中文字。树、空态与加载态共用一个外壳,底部操作使用同材质分隔线;增强对比度时材质自动实体化。面板宽度受定位后的可用空间约束,触发器更宽时也不撑大面板。
  • 仅 { hasChildren: true, children: undefined } 触发 loadChildren({ node, signal });children: [] 是已知为空目录,永不请求。成功子项、可见行、键盘导航与级联选择由 headless 的同一有效树计算,三端不各自缓存结果。
  • 分支状态不互相降级:api.branchLoadState(value) 公开 idle / loading / loaded / error;loaded 的 empty 明确区分成功空数组,error 保留原始 cause。默认结构提供 branch-loading、branch-error、branch-retry-trigger、branch-empty,也可用同名部件替换文案;错误分支行上的 Enter/Space 是不破坏 tree roving 的正式键盘重试入口。
  • onBranchLoadStart、onBranchLoad、onBranchLoadError(三端事件为 branch-load-start / branch-load / branch-load-error)公开有效请求生命周期。分支或整浮层收起、重试、节点移除/同 value 换代、组件卸载都会中止并作废旧请求;迟到兑现或拒绝不能写回当前树,也不发成功/失败事件。

组合 ​

最佳实践 ​

  • 大树必须开启浮层内过滤,逐级展开查找节点很慢。
  • 无头用法需要按 api.value 遍历,为每个值调用 api.getHiddenInputProps({ value }) 并渲染原生 input;旧的无参调用与 CSV 提交合同已删除。Vue/React 的 HiddenInput 部件自动铺开,Web Components 仍只需声明一个原生 input[data-xh-part="hidden-input"],额外字段由宿主管理。
  • 明确只能选叶子还是分支也可选,并在界面上让分支的可点性可见。
  • 自定义 branch-control 与 item 都应包含 item-indicator,分支标记直接读取所属分支的选择与半选状态,不另写状态判定或自绘复选框。Vue / React 自动结构已提供此部件。

反模式 ​

  • 一次把整棵大树放进浮层,首屏即卡顿。
  • 勾选策略与后端理解不一致。

API 参考 ​

产物 ​

层值
自定义元素<xh-tree-select>
Vue 组件XhTreeSelectBranch XhTreeSelectBranchContent XhTreeSelectBranchControl XhTreeSelectBranchEmpty XhTreeSelectBranchError XhTreeSelectBranchIndicator XhTreeSelectBranchLoading XhTreeSelectBranchRetryTrigger XhTreeSelectBranchText XhTreeSelectBranchTrigger XhTreeSelectClearTrigger XhTreeSelectContent XhTreeSelectControl XhTreeSelectEmpty XhTreeSelectFooter XhTreeSelectHiddenInput XhTreeSelectIndicator XhTreeSelectItem XhTreeSelectItemDescription XhTreeSelectItemIndicator XhTreeSelectItemSuffix XhTreeSelectItemText XhTreeSelectLabel XhTreeSelectLoading XhTreeSelectPositioner XhTreeSelectRoot XhTreeSelectTree XhTreeSelectTrigger XhTreeSelectValueText
组合式函数useTreeSelect
状态机treeSelectMachine
皮肤@xihan-ui/styles/tree-select.css

Props ​

属性类型必填说明
collectionTreeSelectNode[]树数据,层级元信息与显示文本的唯一事实源。hasChildren 且未提供 children 是懒分支;已提供 children 时它优先。默认为空树。
loadChildren(request: TreeSelectLoadChildrenRequest) => Promise<TreeSelectNode[] | undefined | void> | TreeSelectNode[] | undefined | void取回 hasChildren: true 分支的直接子项。首次展开自动调用,失败后用 api.retryBranch 显式重试。旧请求的兑现或拒绝不会覆盖更新的一轮,也不会写回已移除的分支。
valuestring | string[]选中值。提供即受控:cell 直读 prop,写入只发 onValueChange 不落内部值。 单选写为裸串是简写,内部一律归一为数组。
defaultValuestring | string[]
expandedValuestring[]展开集合。提供即受控,语义同上。
defaultExpandedValuestring[]
openboolean展开态。提供即受控:内部不再自行修改,只发 onOpenChange。
defaultOpenboolean
multipleboolean多选:选中为集合,选中后浮层不收起、焦点留在树中以便继续选择。
cascadeboolean多选下父子级联勾选:点击分支整枝传导、子全勾父勾、部分勾选半选, 禁用子树整棵冻结。默认 false(朴素切换);单选下无效。
checkedStrategyCascadeStrategy级联下对外值的收敛策略,默认 child(只收叶);parent = 最高整枝,all = 全部勾选节点。
disabledboolean整个控件禁用:trigger 使用原生 disabled,表单出口不参与提交。
readOnlyboolean只读:浮层照常展开、树照常浏览与展开收起,但选中值不可修改、也不可清空。 disabled 则连键盘入口都没有。
invalidboolean校验失败:trigger 报告 aria-invalid,各角色节点带 data-invalid。
loadingboolean节点加载中:树报告 aria-busy,显示在途占位、隐藏空态占位。
variantControlVariant形态:outline / subtle / ghost,决定触发框的描边与底色使用方式。默认 outline。
toneTone语气:brand / neutral / success / warning / danger / info,决定聚焦与选中使用哪族颜色。
sizeSize尺寸:sm / md / lg,决定触发框与树节点行的几何档位。
placeholderstring无选中时 value-text 显示的占位文字。
translationsPartial<TreeSelectTranslations>读屏文案,默认英文。
placementPlacement
offsetnumber
loopboolean上下键到达首尾是否回绕,默认 false。
dirDirection文字方向,默认 ltr;只对调左右方向键的展开 / 收起语义。
namestring表单字段名。提供后表单出口才带 name,选中值随表单一并提交。
formstring原生表单 ID;显式关联外部表单,提交与 reset 使用同一所有者。
onValueChange(details: TreeSelectValueChangeDetails) => voidvalue 变化意图回调;受控时是唯一出口,非受控时随内部写入一并通知。
onExpandedValueChange(details: TreeSelectExpandedValueChangeDetails) => void展开集合变化意图回调;语义同上。
onOpenChange(details: TreeSelectOpenChangeDetails) => voidopen 变化意图回调;受控时是唯一出口,非受控时随内部转移一并通知。
onBranchLoadStart(details: TreeSelectBranchLoadStartDetails) => void一轮有效分支请求开始;retry 与首次展开由 reason 区分。
onBranchLoad(details: TreeSelectBranchLoadDetails) => void一轮有效分支请求成功;children 为空仍是成功,不转换为错误或全局空态。
onBranchLoadError(details: TreeSelectBranchLoadErrorDetails) => void一轮有效分支请求失败;保留 loader 给出的原始 error。

TreeSelectNode ​

collection 的元素。

字段类型必填说明
childrenTreeSelectNode[]
hasChildrenboolean
valuestring是
labelstring展示名,也是连打检索与分支可及名的取字来源;默认回退为 value。
disabledboolean节点禁用:方向键与连打检索跳过它,但它仍可聚焦、仍是导航起点。不向下传导给子节点。
toneTone该节点自身的性质:已失效的写 danger、需要留意的写 warning。不写即与其余节点同档, 也不向下传导给子节点——每一层各自声明。只换字色与悬停 / 按下的面,不改字重与缩进, 也不表达选中或校验;选中的标记与禁用都压过它。彩字不是唯一通道,要紧的差别仍要配图标。
descriptionstring副文本,写入 item-description 部件;未提供时本条不铺该部件。 它是第 2 行的说明,跟着条目走 muted 档,不跟语气;放不下一行的解释才用它, 一句话能说清的写进 label。
childrenOrientationOrientation该层子节点的排布方式,由作者在数据上标注。提供后以它为准,vertical 也优先于树级的 leafOrientation;未提供时才回退为 leafOrientation 加子节点全是叶子的结构判据。 标注在哪一层,横向排布就只落在哪一层:菜单授权中标注在按钮的父菜单上,其他目录不受影响, 也不随子节点增减漂移。只影响排布,不改变键盘。

事件 ​

自定义元素将载荷放在 detail;Vue 使用同名 emit。

事件载荷说明
value-changeTreeSelectValueChangeDetails选中集合变化;detail 为 { value: string[] }
expanded-value-changeTreeSelectExpandedValueChangeDetails展开集合变化;detail 为 { value: string[] }
open-changeTreeSelectOpenChangeDetailsopen 状态变化;detail 为 { open: boolean }
branch-load-startTreeSelectBranchLoadStartDetails分支请求开始;detail 为 { value, node, reason }
branch-loadTreeSelectBranchLoadDetails分支请求成功;detail 为 { value, node, children }
branch-load-errorTreeSelectBranchLoadErrorDetails分支请求失败;detail 为 { value, node, error }

插槽 ​

仅列出带载荷的插槽。

Vue 组件插槽载荷说明
XhTreeSelectRootdefaultTreeSelectRootSlotProps
XhTreeSelectRootlabel—

React 适配器 props ​

只列各组件自己声明的那些:继承自 ComponentPropsWithRef 的 DOM 属性不在其中,根组件上与上面 Props 表同名的也不重复列。Vue 的对应物是上面的插槽表。

React 组件属性类型必填说明
XhTreeSelectBranchvaluestring是
XhTreeSelectItemvaluestring是
XhTreeSelectPositionercontainer() => Element | null浮层挂载的容器;未提供时按全局配置,再未提供时挂载到 body。
XhTreeSelectRootlabelReactNode标题文字。提供后不必再写 label 部件。
XhTreeSelectRootclearableboolean自动渲染树中是否带清空按钮;手写部件不使用它,写了节点即可清空。
XhTreeSelectRootchildrenSlotChildren<TreeSelectRootSlotProps>

状态 ​

公开状态写入 data-state。

部件取值
root'open' | 'closed'
control'open' | 'closed'
trigger'open' | 'closed'
indicator'open' | 'closed'
positioner'open' | 'closed'
content'open' | 'closed'
tree'open' | 'closed'
branch'open' | 'closed'
branch-control'open' | 'closed'
branch-trigger'open' | 'closed'
branch-indicator'open' | 'closed'
branch-text'open' | 'closed'
branch-content'open' | 'closed'
branch-loading'open' | 'closed'
branch-error'open' | 'closed'
branch-retry-trigger'open' | 'closed'
branch-empty'open' | 'closed'
empty'open' | 'closed'
loading'open' | 'closed'
footer'open' | 'closed'

以下名称仅用于内部状态机。

状态:open · closed

事件:OPEN · TOGGLE · CLOSE · CONTROLLED.OPEN · CONTROLLED.CLOSE · NODE.FOCUS · NODE.LOST · NODE.SELECT · VALUE.SET · VALUE.CLEAR · EXPANDED.SET · BRANCH.EXPAND · BRANCH.COLLAPSE · BRANCH.TOGGLE · BRANCH.RETRY · NODE.MOUNT · NODE.UNMOUNT · NODES.SYNC · FORM.RESET · PRESS.START · PRESS.END

判据:isOpenControlled · isMultiple · canPress

connect API ​

getXxxProps() 返回对应部件的宿主属性。

成员类型说明
openboolean
collectionreadonly TreeSelectNode[]当前有效树:含 headless 已成功取回的懒分支子项。
visibleNodesreadonly TreeVisibleNode[]当前可见行序列(收起分支的子树不在其中)。 方向键、Home/End 与连打检索都在它上面移动,不在原始树上移动。
valuestring[]选中集合;单选下长度 ≤ 1,形状不随模式变化。
expandedValuestring[]
valueTextstring | null选中项的显示文本(多选用逗号加空格连接);无选中时为 null。取自 collection 的 label。
displayTextstringvalue-text 实际显示的文字:有选中时取其文本,否则取 placeholder。
focusedValuestring | null焦点锚点;收起、或它已被收起而不可见时为 null。
emptyboolean整树当前是否没有任何节点;collection 与手写节点统一由 Headless 判定。
loadingboolean外部整树 loading 状态。懒分支 loading 由 branchLoadState 单独表达。
translationsTreeSelectTranslations
multipleboolean
disabledboolean
readOnlyboolean
invalidboolean
canClearboolean清空按钮当前是否可按。
isSelected(value: string) => boolean
isIndeterminate(value: string) => boolean级联模式下该分支是否半选(有效叶后代部分勾选);非级联恒为 false。
isExpanded(value: string) => boolean
branchLoadState(value: string) => TreeSelectBranchLoadSnapshot | null非懒分支返回 null;懒分支即使尚未请求也返回 idle。
setOpen(next: boolean) => void
setValue(next: string[]) => void
setExpandedValue(next: string[]) => void
expand(value: string) => void
collapse(value: string) => void
retryBranch(value: string) => void失败后重新取该分支;非懒分支与未知 value 不产生副作用。
select(value: string) => void单选替换、多选切换,与点击节点同一语义。
clear() => void
getRootProps() => T['element']
getLabelProps() => T['element']
getControlProps() => T['element']
getTriggerProps() => T['button']
getValueTextProps() => T['element']
getIndicatorProps() => T['element']
getClearTriggerProps() => T['button']
getPositionerProps() => T['element']
getContentProps() => T['element']
getTreeProps() => T['element']
getItemProps(props: TreeSelectNodeProps) => T['element']
getItemTextProps(props: TreeSelectNodeProps) => T['element']
getItemDescriptionProps(props: TreeSelectNodeProps) => T['element']
getItemSuffixProps(props: TreeSelectNodeProps) => T['element']
getItemIndicatorProps(props: TreeSelectNodeProps) => T['element']
getBranchProps(props: TreeSelectNodeProps) => T['element']
getBranchControlProps(props: TreeSelectNodeProps) => T['element']
getBranchTriggerProps(props: TreeSelectNodeProps) => T['element']
getBranchIndicatorProps(props: TreeSelectNodeProps) => T['element']
getBranchTextProps(props: TreeSelectNodeProps) => T['element']
getBranchContentProps(props: TreeSelectNodeProps) => T['element']
getBranchLoadingProps(props: TreeSelectNodeProps) => T['element']
getBranchErrorProps(props: TreeSelectNodeProps) => T['element']
getBranchRetryTriggerProps(props: TreeSelectNodeProps) => T['button']
getBranchEmptyProps(props: TreeSelectNodeProps) => T['element']
getEmptyProps() => T['element']空态占位:放在 content 中、tree 的兄弟。 collection 与手写节点都由连接层按 Headless 空态收放;作者可更换内容,不必自行重新计算。
getLoadingProps() => T['element']在途占位:与空态占位同一位置,两者不同时显示:加载期间显示它,空态让位。 collection 与手写节点都由连接层按 Headless 空态收放。
getFooterProps() => T['element']浮层底部的操作区:放在 content 中、tree 的兄弟,不进入树的拥有关系,方向键也无法到达。
getHiddenInputProps(props: { value: string }) => T['input']单值表单出口;按 api.value 逐个调用并生成同名 input,零选中不生成提交项。

无障碍 ​

键盘 ​

规格出处:W3C APG

按键生效条件行为
Enter / Spaceclosed, focus in trigger展开浮层并把焦点落到选中节点(无选中或它藏在收起的分支里则落首个可用行)
ArrowDownclosed, focus in trigger展开浮层并把焦点落到选中节点的下一个可用行
ArrowUpclosed, focus in trigger展开浮层并把焦点落到选中节点的上一个可用行
Deletefocus in trigger, 有值且未禁用/只读清空全部选中值,焦点留在 trigger
Backspacefocus in trigger, 有值且未禁用/只读单选清空;多选去掉最后一个选中值
ArrowDownopen, focus in content焦点移到下一个可见行(禁用行跳过;loop 默认关,末行不回绕)
ArrowUpopen, focus in content焦点移到上一个可见行(禁用行跳过;loop 默认关,首行不回绕)
Homeopen, focus in content焦点移到首个可见行
Endopen, focus in content焦点移到末个可见行(展开着的子树也算行)
ArrowRightopen, focus on branch(dir=rtl 时改由 ArrowLeft 承担)收起的分支就地展开;已展开则把焦点移到首个子节点;叶子上什么都不做且不吞键
ArrowLeftopen, focus in content(dir=rtl 时改由 ArrowRight 承担)展开的分支就地收起;收起的分支与叶子则把焦点移到父节点;根层的行什么都不做
Enter / Spaceopen, 焦点节点未禁用且不是错误分支选中焦点节点:单选替换并收起浮层、焦点归还 trigger;多选切换且浮层不收起
Enter / Spaceheld in item / branch / clear-trigger, 未禁用、未只读、未加载按住期间叶子行、分支行(branch-control)或清空按钮投影 data-pressed,与指针 :active 同一副按压面;抬起或失焦撤下,节点随浮层收起一并撤下;没有值可清时清空按钮不进
Enter / Spaceopen, focus on branch, 分支加载失败重试该分支,焦点留在分支行;不改变选中值与展开集合
*open, focus in content展开与焦点行同一父级的全部分支(已展开与禁用的不动);同级没有可展开的分支时不吞这个键
单个可打印字符open, focus in content连打检索在可见行上按 label 首字母搬焦点,不改选中值,也不展开任何分支
Escapeopen收起浮层并把焦点归还 trigger,选中值与展开集合都不变
Tab / Shift+Tabopen收起浮层,焦点不归还 trigger,按 Tab 序列自然离开

ARIA ​

以下属性由 connect 生成。

部件属性值
triggeraria-controlstree 部件的 id
triggeraria-expanded'true' | 'false'
triggeraria-haspopup'tree'
triggeraria-invalid'true' | 'false'
triggeraria-labelledbylabel 部件的 id value-text 部件的 id
triggeraria-readonly'true' | 'false'
triggerrole'combobox'
indicatoraria-hidden'true'
clear-triggeraria-labeltranslations.clearTrigger
contentaria-hidden!open || undefined
treearia-busy'true' | undefined
treearia-disabled'true' | 'false'
treearia-labeltranslations.tree
treearia-labelledbylabel 部件的 id value-text 部件的 id
treearia-multiselectable'true' | 'false'
treerole'tree'
itemaria-checked'true' | 'mixed' | 'false' | undefined
itemaria-disabled'true' | 'false'
itemaria-levelmeta?.level
itemaria-posinsetmeta?.posInSet
itemaria-selected'true' | 'false'
itemaria-setsizemeta?.setSize
itemrole'treeitem'
item-indicatoraria-hidden'true'
brancharia-busy'true' | undefined
brancharia-checked'true' | 'mixed' | 'false' | undefined
brancharia-disabled'true' | 'false'
brancharia-expanded'true' | 'false'
brancharia-labelmetaOf(node.value)?.label
brancharia-levelmeta?.level
brancharia-posinsetmeta?.posInSet
brancharia-selected'true' | 'false'
brancharia-setsizemeta?.setSize
branchrole'treeitem'
branch-triggeraria-hidden'true'
branch-indicatoraria-hidden'true'
branch-contentrole'group'
branch-loadingrole'status'
branch-errorrole'alert'
branch-retry-triggeraria-labeltranslations.retry
branch-emptyrole'status'
emptyrole'status'
loadingrole'status'

样式参考 ​

皮肤 ​

@xihan-ui/styles/tree-select.css 使用 [data-scope="tree-select"][data-part="root"] 部件选择器,位于 xihan.components 层。覆盖样式使用 xihan.overrides。

数据属性 ​

由 connect 生成;条件不成立时不输出无值属性。

部件属性值
rootdata-disabled''(条件成立时才出现)
rootdata-invalid''(条件成立时才出现)
rootdata-loading''(条件成立时才出现)
rootdata-readonly''(条件成立时才出现)
rootdata-sizeprops.size
rootdata-state'open' | 'closed'
rootdata-toneprops.tone
rootdata-variantprops.variant
labeldata-disabled''(条件成立时才出现)
controldata-disabled''(条件成立时才出现)
controldata-invalid''(条件成立时才出现)
controldata-readonly''(条件成立时才出现)
controldata-state'open' | 'closed'
controldata-variantprops.variant
controldata-xh-field-chrome''
controldata-xh-field-sizeprops.size
triggerdata-disabled''(条件成立时才出现)
triggerdata-invalid''(条件成立时才出现)
triggerdata-placeholder''(条件成立时才出现)
triggerdata-readonly''(条件成立时才出现)
triggerdata-state'open' | 'closed'
value-textdata-disabled''(条件成立时才出现)
value-textdata-placeholder''(条件成立时才出现)
indicatordata-clearable''(条件成立时才出现)
indicatordata-disabled''(条件成立时才出现)
indicatordata-state'open' | 'closed'
clear-triggerdata-pressed''(条件成立时才出现)
clear-triggerdata-xh-action-control''
clear-triggerdata-xh-action-display'has-value'
clear-triggerdata-xh-action-has-value''(条件成立时才出现)
clear-triggerdata-xh-action-profile'field-inset'
clear-triggerdata-xh-action-sizeprops.size
clear-triggerdata-xh-action-variant'ghost'
positionerdata-hidden''(条件成立时才出现)
positionerdata-placement定位引擎算出的实际落位
positionerdata-positioned''(条件成立时才出现)
positionerdata-sizeprops.size
positionerdata-state'open' | 'closed'
positionerdata-toneprops.tone
positionerdata-variantprops.variant
contentdata-placement定位引擎算出的实际落位
contentdata-state'open' | 'closed'
contentdata-xh-material'frosted'
treedata-disabled''(条件成立时才出现)
treedata-empty''(条件成立时才出现)
treedata-state'open' | 'closed'
itemdata-disabled''(条件成立时才出现)
itemdata-highlighted''(条件成立时才出现)
itemdata-indeterminate''(条件成立时才出现)
itemdata-pressed''(条件成立时才出现)
itemdata-selected''(条件成立时才出现)
itemdata-tonemetaOf(v)?.tone
itemdata-xh-collection-context'overlay'
itemdata-xh-collection-item''
itemdata-xh-collection-sizeprops.size
item-textdata-disabled''(条件成立时才出现)
item-textdata-highlighted''(条件成立时才出现)
item-textdata-indeterminate''(条件成立时才出现)
item-textdata-selected''(条件成立时才出现)
item-textdata-xh-collection-slot'text'
item-descriptiondata-disabled''(条件成立时才出现)
item-descriptiondata-highlighted''(条件成立时才出现)
item-descriptiondata-indeterminate''(条件成立时才出现)
item-descriptiondata-selected''(条件成立时才出现)
item-descriptiondata-xh-collection-slot'description'
item-suffixdata-disabled''(条件成立时才出现)
item-suffixdata-highlighted''(条件成立时才出现)
item-suffixdata-indeterminate''(条件成立时才出现)
item-suffixdata-selected''(条件成立时才出现)
item-suffixdata-xh-collection-slot'suffix'
item-indicatordata-disabled''(条件成立时才出现)
item-indicatordata-highlighted''(条件成立时才出现)
item-indicatordata-indeterminate''(条件成立时才出现)
item-indicatordata-selected''(条件成立时才出现)
item-indicatordata-xh-collection-slot'indicator'
branchdata-disabled''(条件成立时才出现)
branchdata-empty''(条件成立时才出现)
branchdata-error''(条件成立时才出现)
branchdata-highlighted''(条件成立时才出现)
branchdata-indeterminate''(条件成立时才出现)
branchdata-load-statebranchLoadState(v)?.status
branchdata-loading''(条件成立时才出现)
branchdata-selected''(条件成立时才出现)
branchdata-state'open' | 'closed'
branch-controldata-disabled''(条件成立时才出现)
branch-controldata-empty''(条件成立时才出现)
branch-controldata-error''(条件成立时才出现)
branch-controldata-highlighted''(条件成立时才出现)
branch-controldata-indeterminate''(条件成立时才出现)
branch-controldata-load-statebranchLoadState(v)?.status
branch-controldata-loading''(条件成立时才出现)
branch-controldata-pressed''(条件成立时才出现)
branch-controldata-selected''(条件成立时才出现)
branch-controldata-state'open' | 'closed'
branch-controldata-tonemetaOf(v)?.tone
branch-controldata-xh-collection-context'overlay'
branch-controldata-xh-collection-item''
branch-controldata-xh-collection-sizeprops.size
branch-triggerdata-disabled''(条件成立时才出现)
branch-triggerdata-empty''(条件成立时才出现)
branch-triggerdata-error''(条件成立时才出现)
branch-triggerdata-highlighted''(条件成立时才出现)
branch-triggerdata-indeterminate''(条件成立时才出现)
branch-triggerdata-load-statebranchLoadState(v)?.status
branch-triggerdata-loading''(条件成立时才出现)
branch-triggerdata-selected''(条件成立时才出现)
branch-triggerdata-state'open' | 'closed'
branch-triggerdata-xh-collection-slot'prefix'
branch-indicatordata-disabled''(条件成立时才出现)
branch-indicatordata-empty''(条件成立时才出现)
branch-indicatordata-error''(条件成立时才出现)
branch-indicatordata-highlighted''(条件成立时才出现)
branch-indicatordata-indeterminate''(条件成立时才出现)
branch-indicatordata-load-statebranchLoadState(v)?.status
branch-indicatordata-loading''(条件成立时才出现)
branch-indicatordata-selected''(条件成立时才出现)
branch-indicatordata-state'open' | 'closed'
branch-indicatordata-xh-collection-slot'prefix'
branch-textdata-disabled''(条件成立时才出现)
branch-textdata-empty''(条件成立时才出现)
branch-textdata-error''(条件成立时才出现)
branch-textdata-highlighted''(条件成立时才出现)
branch-textdata-indeterminate''(条件成立时才出现)
branch-textdata-load-statebranchLoadState(v)?.status
branch-textdata-loading''(条件成立时才出现)
branch-textdata-selected''(条件成立时才出现)
branch-textdata-state'open' | 'closed'
branch-textdata-xh-collection-slot'text'
branch-contentdata-disabled''(条件成立时才出现)
branch-contentdata-empty''(条件成立时才出现)
branch-contentdata-error''(条件成立时才出现)
branch-contentdata-highlighted''(条件成立时才出现)
branch-contentdata-indeterminate''(条件成立时才出现)
branch-contentdata-load-statebranchLoadState(v)?.status
branch-contentdata-loading''(条件成立时才出现)
branch-contentdata-selected''(条件成立时才出现)
branch-contentdata-state'open' | 'closed'
branch-loadingdata-disabled''(条件成立时才出现)
branch-loadingdata-empty''(条件成立时才出现)
branch-loadingdata-error''(条件成立时才出现)
branch-loadingdata-highlighted''(条件成立时才出现)
branch-loadingdata-indeterminate''(条件成立时才出现)
branch-loadingdata-load-statebranchLoadState(v)?.status
branch-loadingdata-loading''(条件成立时才出现)
branch-loadingdata-selected''(条件成立时才出现)
branch-loadingdata-state'open' | 'closed'
branch-errordata-disabled''(条件成立时才出现)
branch-errordata-empty''(条件成立时才出现)
branch-errordata-error''(条件成立时才出现)
branch-errordata-highlighted''(条件成立时才出现)
branch-errordata-indeterminate''(条件成立时才出现)
branch-errordata-load-statebranchLoadState(v)?.status
branch-errordata-loading''(条件成立时才出现)
branch-errordata-selected''(条件成立时才出现)
branch-errordata-state'open' | 'closed'
branch-retry-triggerdata-disabled''(条件成立时才出现)
branch-retry-triggerdata-empty''(条件成立时才出现)
branch-retry-triggerdata-error''(条件成立时才出现)
branch-retry-triggerdata-highlighted''(条件成立时才出现)
branch-retry-triggerdata-indeterminate''(条件成立时才出现)
branch-retry-triggerdata-load-statebranchLoadState(v)?.status
branch-retry-triggerdata-loading''(条件成立时才出现)
branch-retry-triggerdata-selected''(条件成立时才出现)
branch-retry-triggerdata-state'open' | 'closed'
branch-emptydata-disabled''(条件成立时才出现)
branch-emptydata-empty''(条件成立时才出现)
branch-emptydata-error''(条件成立时才出现)
branch-emptydata-highlighted''(条件成立时才出现)
branch-emptydata-indeterminate''(条件成立时才出现)
branch-emptydata-load-statebranchLoadState(v)?.status
branch-emptydata-loading''(条件成立时才出现)
branch-emptydata-selected''(条件成立时才出现)
branch-emptydata-state'open' | 'closed'
emptydata-state'open' | 'closed'
loadingdata-state'open' | 'closed'
footerdata-state'open' | 'closed'

CSS 变量 ​

本组件公开覆盖槽由独立皮肤的实际消费位生成;默认来源、作用部件和状态均与 CSS 同源。

变量部件CSS 属性状态默认来源说明
--xh-tree-select-action-bgclear-trigger--xh-ink-surface
background-color
default
xh-ink-surface
--xh-_action-variant-bg-resttree-select 的 clear-trigger 部件 --xh-ink-surface、background-color 覆盖槽。
--xh-tree-select-action-bg-activeclear-triggerbackground-colordisabled
is(:active, [data-pressed])
loading
not([data-disabled])
not([data-loading])
pressed
--xh-_action-variant-bg-pressedtree-select 的 clear-trigger 部件 background-color 覆盖槽。
--xh-tree-select-action-bg-hoverclear-triggerbackground-colordisabled
hover
loading
not([data-disabled])
not([data-loading])
--xh-_action-variant-bg-hovertree-select 的 clear-trigger 部件 background-color 覆盖槽。
--xh-tree-select-action-fgclear-triggercolordefault--xh-fg-mutedtree-select 的 clear-trigger 部件 color 覆盖槽。
--xh-tree-select-action-fg-hoverclear-triggercolordisabled
hover
loading
not([data-disabled])
not([data-loading])
--xh-fg-defaulttree-select 的 clear-trigger 部件 color 覆盖槽。
--xh-tree-select-action-font-sizeclear-triggerfont-sizedefault--xh-text-secondary-sizetree-select 的 clear-trigger 部件 font-size 覆盖槽。
--xh-tree-select-action-radiusclear-triggerborder-radiusdefault--xh-shape-insettree-select 的 clear-trigger 部件 border-radius 覆盖槽。
--xh-tree-select-action-sizeclear-triggerblock-size
inline-size
min-inline-size
default
xh-action-profile=field-inset
--xh-_action-profile-visual-sizetree-select 的 clear-trigger 部件 block-size、inline-size、min-inline-size 覆盖槽。
--xh-tree-select-branch-content-gapbranch-contentgapdefault--xh-list-option-gaptree-select 的 branch-content 部件 gap 覆盖槽。
--xh-tree-select-branch-gapbranchgapdefault--xh-list-option-gaptree-select 的 branch 部件 gap 覆盖槽。
--xh-tree-select-branch-indicator-fgbranch-indicator
branch-trigger
colordefault--xh-fg-subtletree-select 的 branch-indicator、branch-trigger 部件 color 覆盖槽。
--xh-tree-select-branch-indicator-sizebranch-indicator
branch-trigger
item
--xh-icon-size
inline-size
default--xh-control-indicator-sizetree-select 的 branch-indicator、branch-trigger、item 部件 --xh-icon-size、inline-size 覆盖槽。
--xh-tree-select-content-backdropcontent-webkit-backdrop-filter
backdrop-filter
xh-material=frosted--xh-_material-backdroptree-select 的 content 部件 -webkit-backdrop-filter、backdrop-filter 覆盖槽。
--xh-tree-select-content-bgcontentbackgroundnot([data-xh-action-control])
xh-material=frosted
--xh-_material-bgtree-select 的 content 部件 background 覆盖槽。
--xh-tree-select-content-bordercontentbordernot([data-xh-action-control])
xh-material=frosted
--xh-_material-bordertree-select 的 content 部件 border 覆盖槽。
--xh-tree-select-content-fgcontentcolornot([data-xh-action-control])
xh-material=frosted
--xh-_material-fgtree-select 的 content 部件 color 覆盖槽。
--xh-tree-select-content-highlightcontentbackgroundnot([data-xh-action-control])
xh-material=frosted
--xh-_material-highlighttree-select 的 content 部件 background 覆盖槽。
--xh-tree-select-content-max-hcontentmax-block-sizedefault--xh-overlay-max-htree-select 的 content 部件 max-block-size 覆盖槽。
--xh-tree-select-content-max-wcontentmax-inline-sizedefault--xh-overlay-max-wtree-select 的 content 部件 max-inline-size 覆盖槽。
--xh-tree-select-content-min-wcontentmin-inline-sizedefault--xh-overlay-min-wtree-select 的 content 部件 min-inline-size 覆盖槽。
--xh-tree-select-content-pxcontentpadding-inlinedefault--xh-space-1tree-select 的 content 部件 padding-inline 覆盖槽。
--xh-tree-select-content-pycontentpadding-blockdefault--xh-space-1tree-select 的 content 部件 padding-block 覆盖槽。
--xh-tree-select-content-radiuscontentborder-radiusdefault--xh-shape-overlaytree-select 的 content 部件 border-radius 覆盖槽。
--xh-tree-select-content-shadowcontentbox-shadownot([data-xh-action-control])
xh-material=frosted
--xh-_material-shadowtree-select 的 content 部件 box-shadow 覆盖槽。
--xh-tree-select-control-bgcontrolbackground-colorxh-field-chrome--xh-_field-variant-bg-resttree-select 的 control 部件 background-color 覆盖槽。
--xh-tree-select-control-bg-disabledcontrolbackground-colordisabled
xh-field-chrome
--xh-_field-variant-bg-disabledtree-select 的 control 部件 background-color 覆盖槽。
--xh-tree-select-control-bg-hovercontrolbackground-colordisabled
hover
invalid
loading
not([data-disabled])
not([data-invalid])
not([data-loading])
not([data-readonly])
readonly
xh-field-chrome
--xh-_field-variant-bg-hovertree-select 的 control 部件 background-color 覆盖槽。
--xh-tree-select-control-bg-readonlycontrolbackground-colorreadonly
xh-field-chrome
--xh-_field-variant-bg-read-onlytree-select 的 control 部件 background-color 覆盖槽。
--xh-tree-select-control-bordercontrolborderxh-field-chrome--xh-_field-variant-border-resttree-select 的 control 部件 border 覆盖槽。
--xh-tree-select-control-border-focuscontrolborder-colordisabled
focus-within
not([data-disabled])
xh-field-chrome
--xh-_field-variant-border-focustree-select 的 control 部件 border-color 覆盖槽。
--xh-tree-select-control-border-hovercontrolborder-colordisabled
hover
invalid
loading
not([data-disabled])
not([data-invalid])
not([data-loading])
not([data-readonly])
readonly
xh-field-chrome
--xh-_field-variant-border-hovertree-select 的 control 部件 border-color 覆盖槽。
--xh-tree-select-control-border-invalidcontrolborder-colorinvalid
xh-field-chrome
--xh-_field-variant-border-invalidtree-select 的 control 部件 border-color 覆盖槽。
--xh-tree-select-control-fgcontrolcolorxh-field-chrome--xh-fg-defaulttree-select 的 control 部件 color 覆盖槽。
--xh-tree-select-control-gapcontrolgapxh-field-chrome--xh-_tree-select-gaptree-select 的 control 部件 gap 覆盖槽。
--xh-tree-select-control-hcontrolblock-size
min-block-size
has([data-xh-field-input][data-xh-field-layout='multi-tag'])
has([data-xh-field-input][data-xh-field-layout='single-line'])
has([data-xh-field-input][data-xh-field-layout='textarea'])
xh-field-chrome
xh-field-input
xh-field-layout=multi-tag
xh-field-layout=single-line
xh-field-layout=textarea
--xh-_tree-select-htree-select 的 control 部件 block-size、min-block-size 覆盖槽。
--xh-tree-select-control-min-wcontrol
root
min-inline-sizedefault
xh-field-chrome
--xh-control-min-wtree-select 的 control、root 部件 min-inline-size 覆盖槽。
--xh-tree-select-control-pxcontrolpadding-inlinexh-field-chrome--xh-_tree-select-pxtree-select 的 control 部件 padding-inline 覆盖槽。
--xh-tree-select-control-radiuscontrolborder-radiusxh-field-chrome--xh-shape-controltree-select 的 control 部件 border-radius 覆盖槽。
--xh-tree-select-control-shadowcontrolbox-shadowxh-field-chromenonetree-select 的 control 部件 box-shadow 覆盖槽。
--xh-tree-select-control-wrootinline-size
min-inline-size
default--xh-control-wtree-select 的 root 部件 inline-size、min-inline-size 覆盖槽。
--xh-tree-select-empty-fgemptycolordefault--xh-material-frosted-fg-mutedtree-select 的 empty 部件 color 覆盖槽。
--xh-tree-select-empty-font-sizeemptyfont-sizedefault--xh-_tree-select-font-sizetree-select 的 empty 部件 font-size 覆盖槽。
--xh-tree-select-empty-pxemptypadding-inlinedefault--xh-_tree-select-row-pxtree-select 的 empty 部件 padding-inline 覆盖槽。
--xh-tree-select-empty-pyemptypadding-blockdefault--xh-space-3tree-select 的 empty 部件 padding-block 覆盖槽。
--xh-tree-select-footer-borderfooterborder-block-startdefault--xh-material-frosted-separatortree-select 的 footer 部件 border-block-start 覆盖槽。
--xh-tree-select-footer-fgfootercolordefault--xh-material-frosted-fg-mutedtree-select 的 footer 部件 color 覆盖槽。
--xh-tree-select-footer-font-sizefooterfont-sizedefault--xh-text-secondary-sizetree-select 的 footer 部件 font-size 覆盖槽。
--xh-tree-select-footer-gapfootergapdefault--xh-space-2tree-select 的 footer 部件 gap 覆盖槽。
--xh-tree-select-footer-pxfooterpadding-inlinedefault--xh-space-2tree-select 的 footer 部件 padding-inline 覆盖槽。
--xh-tree-select-footer-pyfooterpadding-blockdefault--xh-space-2tree-select 的 footer 部件 padding-block 覆盖槽。
--xh-tree-select-gaprootgapdefault--xh-space-1tree-select 的 root 部件 gap 覆盖槽。
--xh-tree-select-icon-sizebranch-control
control
item
positioner
root
--xh-icon-sizedefault
is([data-part='root'], [data-part='positioner'])
size=lg
size=sm
xh-field-chrome
--xh-_collection-glyph-size
--xh-_field-size-glyph-size
--xh-glyph-size-lg
--xh-glyph-size-md
--xh-glyph-size-sm
tree-select 的 branch-control、control、item、positioner、root 部件 --xh-icon-size 覆盖槽。
--xh-tree-select-indentbranch-contentpadding-inline-startdefault--xh-space-4tree-select 的 branch-content 部件 padding-inline-start 覆盖槽。
--xh-tree-select-indicator-fgindicatorcolordefault--xh-fg-mutedtree-select 的 indicator 部件 color 覆盖槽。
--xh-tree-select-item-bg-hoverbranch
branch-control
item
background-colordisabled
error
focus-visible
highlighted
hover
is(:focus-visible, [data-highlighted])
is(:hover, [data-highlighted])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
not([data-disabled])
selected
xh-collection-context=overlay
--xh-bg-subtletree-select 的 branch、branch-control、item 部件 background-color 覆盖槽。
--xh-tree-select-item-bg-pressedbranch-control
item
background-colordisabled
error
is(:active, [data-pressed])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
not([data-disabled])
pressed
selected
xh-collection-context=overlay
--xh-bg-subtle-hovertree-select 的 branch-control、item 部件 background-color 覆盖槽。
--xh-tree-select-item-check-fgbranch-control
item
colordisabled
error
highlighted
hover
is(:active, [data-pressed])
is(:focus-visible, [data-highlighted])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
pressed
selected
state=checked
xh-collection-context=overlay
xh-collection-slot=indicator
--xh-tree-select-item-indicator-fgtree-select 的 branch-control、item 部件 color 覆盖槽。
--xh-tree-select-item-fgbranch-control
item
colordefault
disabled
error
highlighted
hover
is(:active, [data-pressed])
is(:focus-visible, [data-highlighted])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
pressed
selected
xh-collection-context=overlay
--xh-material-frosted-fgtree-select 的 branch-control、item 部件 color 覆盖槽。
--xh-tree-select-item-fg-selectedbranch-control
item
colordisabled
error
highlighted
hover
is(:active, [data-pressed])
is(:focus-visible, [data-highlighted])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
pressed
selected
xh-collection-context=overlay
--xh-tree-select-item-fgtree-select 的 branch-control、item 部件 color 覆盖槽。
--xh-tree-select-item-font-sizebranch-control
item
font-sizedefault--xh-_tree-select-font-sizetree-select 的 branch-control、item 部件 font-size 覆盖槽。
--xh-tree-select-item-font-weight-selectedbranch-control
item
font-weightdisabled
error
highlighted
hover
is(:active, [data-pressed])
is(:focus-visible, [data-highlighted])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
pressed
selected
xh-collection-context=overlay
--xh-font-weight-regulartree-select 的 branch-control、item 部件 font-weight 覆盖槽。
--xh-tree-select-item-gapbranch-control
item
margin-inline-end
margin-inline-start
default
xh-collection-slot=indicator
xh-collection-slot=prefix
xh-collection-slot=shortcut
xh-collection-slot=suffix
--xh-_tree-select-gaptree-select 的 branch-control、item 部件 margin-inline-end、margin-inline-start 覆盖槽。
--xh-tree-select-item-indicator-fgbranch-control
item
colordisabled
error
highlighted
hover
is(:active, [data-pressed])
is(:focus-visible, [data-highlighted])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
pressed
selected
state=checked
xh-collection-context=overlay
xh-collection-slot=indicator
--xh-_tree-select-accenttree-select 的 branch-control、item 部件 color 覆盖槽。
--xh-tree-select-item-indicator-sizeitem-indicator--xh-icon-size
block-size
inline-size
default--xh-control-indicator-sizetree-select 的 item-indicator 部件 --xh-icon-size、block-size、inline-size 覆盖槽。
--xh-tree-select-item-leadingbranch-control
item
line-heightdefault--xh-leading-normaltree-select 的 branch-control、item 部件 line-height 覆盖槽。
--xh-tree-select-item-pxbranch-control
item
padding-inlinedefault--xh-_tree-select-row-pxtree-select 的 branch-control、item 部件 padding-inline 覆盖槽。
--xh-tree-select-item-pybranch-control
item
padding-blockdefault--xh-_tree-select-row-pytree-select 的 branch-control、item 部件 padding-block 覆盖槽。
--xh-tree-select-item-radiusbranch-control
item
border-radiusdefault--xh-shape-controltree-select 的 branch-control、item 部件 border-radius 覆盖槽。
--xh-tree-select-label-fglabelcolordefault--xh-fg-defaulttree-select 的 label 部件 color 覆盖槽。
--xh-tree-select-label-font-sizelabelfont-sizedefault--xh-text-label-sizetree-select 的 label 部件 font-size 覆盖槽。
--xh-tree-select-label-font-weightlabelfont-weightdefault--xh-text-label-weighttree-select 的 label 部件 font-weight 覆盖槽。
--xh-tree-select-layerpositionerz-indexdefault--xh-_layertree-select 的 positioner 部件 z-index 覆盖槽。
--xh-tree-select-loading-fgloadingcolordefault--xh-material-frosted-fg-mutedtree-select 的 loading 部件 color 覆盖槽。
--xh-tree-select-loading-font-sizeloadingfont-sizedefault--xh-_tree-select-font-sizetree-select 的 loading 部件 font-size 覆盖槽。
--xh-tree-select-loading-pxloadingpadding-inlinedefault--xh-_tree-select-row-pxtree-select 的 loading 部件 padding-inline 覆盖槽。
--xh-tree-select-loading-pyloadingpadding-blockdefault--xh-space-3tree-select 的 loading 部件 padding-block 覆盖槽。
--xh-tree-select-placeholder-fgvalue-textcolorplaceholder--xh-fg-subtletree-select 的 value-text 部件 color 覆盖槽。
--xh-tree-select-tree-gaptreegapdefault--xh-list-option-gaptree-select 的 tree 部件 gap 覆盖槽。
--xh-tree-select-trigger-fgtriggercolordefault--xh-fg-defaulttree-select 的 trigger 部件 color 覆盖槽。
--xh-tree-select-trigger-font-sizetriggerfont-sizedefault--xh-_tree-select-font-sizetree-select 的 trigger 部件 font-size 覆盖槽。
--xh-tree-select-trigger-gaptriggergapdefault--xh-_tree-select-gaptree-select 的 trigger 部件 gap 覆盖槽。
--xh-tree-select-value-leadingvalue-textline-heightdefault--xh-leading-normaltree-select 的 value-text 部件 line-height 覆盖槽。

动效 ​

动效角色:按压 · 状态 · 切换 · 出现(锚定列表)(见动效规范)。

共享关键帧 xh-overlay-slide-in · xh-overlay-slide-out 由 family/motion.css 提供,皮肤 @import 它,单独引入仍成立;rotate 走 transition 过渡。时长与缓动读动效令牌,改令牌即改全局节奏。

皮肤之外还有一段:退场由适配器的退场闸门把关,动画播完才真收起。

系统开启减弱动效时由令牌层统一收敛,皮肤不另作判断。

RTL ​

皮肤用逻辑属性排布(inline-start 一族),dir="rtl" 下自动镜像;另有按 dir 分支的规则。

Released under The MIT License