# 树型选择控件
变更点
- 默认显示清除按钮
- 默认在下拉中显示搜索框,并输入项过滤对应的
treeNode属性变更为title - 下拉菜单样式
dropdownStyle默认添加最大高度{maxHeight: '400px'}
# 组件注册
import { TreeSelect } from '@yemu419/fms-components';
Vue.use(TreeSelect);
# 代码演示
# 基本用法
Please select
# 从数据直接生成
Please select
# API
差异
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|---|---|---|---|---|
| allowClear | 显示清除按钮 | boolean | true | |
| dropdownStyle | 下拉菜单的样式 | object | { maxHeight: '400px', overflow: 'auto' } | |
| searchPlaceholder | 搜索框默认文字 | string|slot | '请输入' | |
| showSearch | 在下拉中显示搜索框(仅在单选模式下生效) | boolean | true | |
| treeNodeFilterProp | 输入项过滤对应的 treeNode 属性 | string | 'title' |
更多属性请参考 ant-design-vue/TreeSelect。