Skip to content

FaTree 树形控件 专业版 v5.7.0

Props

属性名说明类型默认值
data数据TreeNode[]-
checkable是否可复选booleanfalse
filterable是否可搜索booleanfalse
filterPlaceholder搜索输入框占位提示文案string'搜索...'
filterMethod自定义搜索函数,默认查询节点 label 属性(query: string, node: TreeNode) => boolean-
class自定义类名string-
ts
interface TreeNode extends Record<string, any> {
  id: string
  name: string
  children?: TreeNode[]
  checked?: boolean
  disabled?: boolean
}

Expose

属性名说明类型
expand展开指定或全部节点(nodeIds?: string[]) => void
collapse收起指定或全部节点(nodeIds?: string[]) => void
checkAll全选/取消全选(checked: boolean) => void
setSelection设置选中(id: string) => void
clearSelection清除选择() => void

Slots

插槽名说明类型
default自定义默认内容{ node: TreeNode, expanded: boolean }