nicecode-v2/packages/biz/src/treePanel/index.md

2.4 KiB
Raw Blame History

category title toc demo group
Components TreePanel 树面板 content
cols
2
title
数据展示

代码演示

基本用法 普通树 标签面板

API

参数 说明 类型 默认值 版本
treeType 树的类型 'directory' 'normal' directory ---
searchInputProps antd-inputProps --- --- ---
showOptions --- boolean --- ---
treeProps --- antd-treeProps --- ---
data --- TreeDataNode[] [] ---
onSearch --- (e: any) => void - ---
onItemCheck --- TreeProps['onCheck'] - ---
onItemSelect --- TreeProps['onSelect'] - ---
customImport 自定义搜索栏边上的过滤图标 ReactNode 、string - ---
extra 数组件上方插槽 ReactNode 、string --- ---
prefixCls class前缀用于覆盖class string --- ---
showSelectBar 显示搜索框 boolean false ---
filterSelectProps 搜索框 antd-SelectProps - ---
showSearchBar 显示搜索框 boolean false ---
noFilter 是否显示搜索拓展 boolean false ---
filterList 过滤插槽列表 IOption[] [] ---
optionList 操作按钮列表 IOption[] [] ---
showTagPanel 显示标签插槽 boolean false ---
tagList 标签列表 ITag[] [] ---
onSelect 搜索选中事件 SelectProps['onChange'] - ---
tagExpandAll 标签展开状态 boolean false ---
onTagCheck 标签点击事件 (value: string, tag: ITag) => void; false ---
checkedTags 标签选中状态 string[] [] ---
onResetTags 重置标签事件 () => void - ---
onTagExpand 标签展开事件 (e: any) => void - ---
tagFootRender 标签展开状态 ReactNode string false ---

IOption

interface IOption {
  label: string
  key: string
  icon?: string | ReactNode
  disabled?: boolean;
  showTooltip?: boolean;
  onClick?: () => void
  className?: string;
  dropdownConfig?: DropDownProps
}

ITag

interface ITag {
  label: string
  value: string
  icon?: ReactNode
  parentNode?: string
  children?: ITag[]
}

组件设计

该组件包含以下功能:

  1. 顶部按钮支持
  2. 输入框单行展示
  3. 选择框和筛选框同一行
  4. 按钮列表