组织机构选择组件调整

This commit is contained in:
qinjie 2021-09-01 08:58:06 +08:00
parent cb2d422f19
commit 493a39d96c
1 changed files with 10 additions and 1 deletions

View File

@ -16,7 +16,16 @@
<!-- 展开指定的树节点 :expanded-keys="expandedKeys" -->
<!-- 点击树节点触发 :select="selectTree" -->
<!-- 展开/收起节点时触发 @expand="onExpand" -->
<a-tree :tree-data="treeData" :auto-expand-parent="autoExpandParent" :blockNode="true" :defaultSelectedKeys="defaultSelectedKeys" :expanded-keys="expandedKeys" @select="selectTree" @expand="onExpand"></a-tree>
<a-tree :tree-data="treeData" :auto-expand-parent="autoExpandParent" :blockNode="true" :defaultSelectedKeys="defaultSelectedKeys" :expanded-keys="expandedKeys" @select="selectTree" @expand="onExpand">
<template slot="title" slot-scope="{ title }">
<span v-if="title.indexOf(filterText) > -1">
{{ title.substr(0, title.indexOf(filterText)) }}
<span style="color: #f50">{{ filterText }}</span>
{{ title.substr(title.indexOf(filterText) + filterText.length) }}
</span>
<span v-else>{{ title }}</span>
</template>
</a-tree>
<a-empty v-show="treeData.length == 0" description="没有找到组织机构树数据" :image-style="{height: '60px', marginTop: '10px'}" />
</template>
<a-button class="organization-tree-button" type="primary">组织机构树