合并单元格
Siona
合并单元格
1.
<template>
<div>
<a-table :columns="columns"
:data-source="systemData"
:bordered="true"
>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'system'">
{{ console.log(11, record) }}
</template>
</template>
</a-table>
</div>
</template>
<script setup>
const columns = [
{
title: '系统',
dataIndex: 'system',
key: 'system',
customCell: (_, index) => ({
rowSpan: index === 0 ? 10 : 0
})
},
{
title: '菜单',
dataIndex: 'menu',
key: 'menu'
},
{
title: '接口',
key: 'interface',
dataIndex: 'interface'
}
]
</script>