1.0.1 • Published 3 years ago
安装
# npm方式安装
npm i tableselectrow
属性说明
属性名称 | 类型 | 是否必填 | 说明 |
---|
v-model | Boolean | 必填 | 控制显示隐藏 |
fileds | Array[] | 必填 | 过滤字段(后面详解) |
data | Array[] | 必填 | 数据源 |
search | Boolean | -- | 是否需要搜索树结构 |
searchKey | String | -- | 搜索树结构的 key(search 必须为 true 的情况下) |
type | String | -- | 表格类型,默认 tables,可选(tables/tree/radio) |
defaultProps | Object{} | 必填 | 默认{children: 'children',label: 'label'} 后面详解 |
layerDisabled | Number | -- | 默认 0,从外向内多少层禁用 |
onlyKey | String | -- | 默认 'id',唯一的 key 值 |
showValue | String | -- | 要展示的值(radio) |
height | String | -- | 高度,默认为 400px |
defaultExpandAll | Boolean | -- | 是否树结构全部展开 |
title | String | 必填 | 标题 |
defaultProps
属性名称 | 类型 | 是否必填 | 说明 |
---|
children | String | 必填 | 指定子树为节点对象的某个属性值 |
label | String | 必填 | 指定节点标签为节点对象的某个属性值 |
fileds
属性名称 | 类型 | 是否必填 | 说明 |
---|
label | String | 必填 | 展示的文本 |
prop | String | 必填 | 数据 |
事件
事件名称 | 说明 | 返回值 |
---|
selectRow | 选完数据确定事件 | 返回选中的数据对象 select |
checkChange | 树结构的选择框改变时触发 | 返回值 data, checked, node |