element-ui 表格树数据显示

1.使用表格树,element-ui比较新的版本开始支持,最新的版本却在报错,不识别树结构的几个属性

在用为2.8.2版本,可实现下面树形数据显示和懒加载:


                           border
                           row-key="id"
                           default-expand-all
                           lazy
                           :load="load"
                           :tree-props="{children: 'children',hasChildren: 'hasChildren'}">

 注意添加属性:

row-key="id"
                           default-expand-all
                           lazy
                           :load="load"
                           :tree-props="{children: 'children',hasChildren: 'hasChildren'}"

其中属性:

lazy
                           :load="load"

 用以实现懒加载,即点击下拉请求获取数据

tableData数据为表格数据,要显示节点数据,需要有hasChildren属性即可。

 

2.8.2不在支持表格流式高度属性:

max-height

需要注意!

 

element-ui 表格树数据显示_第1张图片

你可能感兴趣的:(element-ui,element-ui,表格树)