DeviceTree.md 876 Bytes
title: DeviceTree - 设备树
nav:
  title: 基础组件
  path: /components
group:
  path: /

DeviceTree 设备树

基础业务组件

  • 允许单设备选择
  • 允许多设备选择
  • 允许搜索设备树

何时使用

  • 在设备树选择时。

代码演示

API

api 参考 Antd Tree 组件 https://ant.design/components/tree-cn/

参数 说明 类型 默认值
prefix 搜索框的前置图标 ReactNode 搜索 icon
placeholder 搜索框占位符 string 搜索设备名称
treeData treeNodes 数据,如果设置则不需要手动构造 TreeNode 节点(key 在整个树范围内唯一) array<{key, title, children, [disabled, selectable]}> -
onSearch 搜索框输入事件的回调,会返回搜索框输入信息 function(value){ } -