Happy-Coding-Clans / vue-easytable

A powerful data table based on vuejs. You can use it as data grid、Microsoft Excel or Google sheets. It supports virtual scroll、cell edit etc.
https://happy-coding-clans.github.io/vue-easytable/
MIT License
3.63k stars 725 forks source link

[Feature Request] 有打算提供支持树形table的功能 #377

Open tinycalf918 opened 3 years ago

tinycalf918 commented 3 years ago

选择要提交 issue 的库

vue-easytable

Issue 类型

Feature

Issue 标题

有打算提供支持树形table的功能

这个功能解决了什么问题?

类似antd和element的树形数据展示表格,可以在tabledata中定义children表示的层级数据,从而可以展示树形数据表格,可以根据层级进行展开

你期望的 API 是什么样的?

children数组的结构

huangshuwei commented 3 years ago

可以通过这种方式实现,官方示例:https://happy-coding-clans.github.io/vue-easytable/#/zh/doc/table/row-expand?anchor=zhan-kai-biao-ge

tinycalf918 commented 3 years ago

这种是不是只支持有一层子的情况,如果层级>2,比如children下还有children是不是就不行了?

huangshuwei commented 3 years ago

是的,目前需要自己写个递归组件了

mqhe2007 commented 3 years ago

可以通过这种方式实现,官方示例:https://happy-coding-clans.github.io/vue-easytable/#/zh/doc/table/row-expand?anchor=zhan-kai-biao-ge

这种可以满足基本需求,如果需要配合多选,全选,反选就会比较麻烦。

huangshuwei commented 2 years ago

Add todo: https://github.com/Happy-Coding-Clans/vue-easytable/projects/3#card-74247964