antd 表格的一键展开 以及 节点的展开收起功能
html
<a-table
style="margin-top: 20px"
:columns="columns"
:data-source="dataSource"
bordered
rowKey="key"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:expandedRowKeys="expandedRowKeys"
@expand="onExpand"
:expanded-keys="expandedKeys"
>
<span slot="action" slot-scope="text, record, index">
<a @click="reloadFn(record)">重置</a>
</span>
</a-table>
columns:[],
dataSource:[],
expandedRowKeys: [],
selectedRowKeys: [],
selectionRows: [],
expandedKeys: []