Skip to content
On this page

dft-model-tree 定制节点内容

model-tree 提供了两个 slot,可以用于自定义 icon 图标及内容显示区域。

定制 icon 图标

vue
<dft-model-tree>
  <template #model-tree-icon="{ item }">
    <div>自定义icon</div>
  </template>
 </dft-model-tree>

定制内容

vue
<dft-model-tree>
  <template #model-tree-content="{ item }">
    <div>自定义内容</div>
  </template>
</dft-model-tree>

插槽介绍

插槽名称插槽说明插槽返回值
model-tree-iconicon 插槽当前行的详细信息
model-tree-content内容插槽当前行的详细信息
pmi-tree-iconicon 插槽当前行的详细信息
pmi-tree-content内容插槽当前行的详细信息

item 参数详情

参数名称参数说明类型
id节点 idString
children子节点数据item[]
hasPMI是否含有 pmiBoolean
isLeaf是否是叶子节点Boolean
level层级Number
name节点名称String
tileID对应模型节点 IdString