1个回答

test
2024-06-28
这里使用开源图表组件VTable来实现这个功能。基本表格的配置项columns可以配置子项columns
。代码参考 Code Example
{
field: 'full name',
caption: 'Full name',
columns: [
{
field: 'name',
caption: 'First Name',
width: 120
},
{
field: 'lastName',
caption: 'Last Name',
width: 100
}
]
},
在线效果参考:https://codesandbox.io/s/vtable-columns-nested-structure-4zwk43
相关文档
基本表格demo:https://visactor.io/vtable/demo/table-type/list-table基本表格教程:https://visactor.io/vtable/guide/table_type/List_table/list_table_define_and_generate相关api:https://visactor.io/vtable/option/ListTable-columns-text#columnsgithub:https://github.com/VisActor/VTable
回复

适合作为回答的
- 经过验证的有效解决办法
- 自己的经验指引,对解决问题有帮助
- 遵循 Markdown 语法排版,代码语义正确
不该作为回答的
- 询问内容细节或回复楼层
- 与题目无关的内容
- “赞”“顶”“同问”“看手册”“解决了没”等毫无意义的内容