1、先上一张图:
2、官方文档:Vxe Table v4.6
主要是二个属性:
type: expand
slots: {
content: 'expandContent'
}
3、具体代码片段:
export const xzColumns: VxeGridPropTypes.Columns = [
// {
// title: '',
// type: 'checkbox',
// fixed: 'left',
// width: '50',
// align: 'center',
// },
{
title: '序号',
type: 'seq',
// fixed: 'left',
width: '50',
align: 'center',
sortable: true,
},
{
type: 'expand',
width: '50',
align: 'center',
slots: {
content: 'expandContent',
},
},
...
}
<template #expandContent="{ row, rowIndex }">
<div class="expand-wrapper">
这里是具体的内容
</div>
</template>
4、通过上面的设置,就可以轻松实现主细表格。