-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
请查看 官方组件介绍-表格table,嵌套子表格部分
<template>
<a-table :columns="columns" :dataSource="data" class="components-table-demo-nested">
<a slot="operation" slot-scope="text" href="javascript:;">Publish</a>
<a-table
slot="expandedRowRender"
slot-scope="text"
:columns="innerColumns"
:dataSource="innerData" // 这里的数据,要为data中某一个数据的一项值,应该如何设置
:pagination="false"
>
<span slot="status" slot-scope="text"> <a-badge status="success" />Finished </span>
<span slot="operation" slot-scope="text" class="table-operation">
<a href="javascript:;">Pause</a>
<a href="javascript:;">Stop</a>
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item>
Action 1
</a-menu-item>
<a-menu-item>
Action 2
</a-menu-item>
</a-menu>
<a href="javascript:;"> More <a-icon type="down" /> </a>
</a-dropdown>
</span>
</a-table>
</a-table>
</template>
以上为官方demo,假设data数据中有innerColumns
data = [
{
innerColumns: [
{},
{},
]
}
]
请问如何让子table的值: :dataSource="innerData" ,设置为以上数据中的innerColumns,感谢
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested