表格组件的设置是否展示行展开列不支持根据record来计算true和false
Closed this issue · 1 comments
ty-lq commented
version
4.2.6
environment
Chrome/140.0.0.0 vue/3.5.13
Steps to reproduce
<a-table
:columns="columns"
:data-source="data"
:expanded-row-keys="expandedRowKeys"
@expand="handleExpand"
:row-key="(record) => record.id"
:showExpandColumn="(record) => record.children && record.children.length > 0"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-button type="link" size="small" @click="handleAdd(record)">新增</a-button>
<a-button type="link" size="small" @click="handleEdit(record)">编辑</a-button>
<a-button type="link" size="small" @click="handleDelete(record)">删除</a-button>
</template>
</template>
</a-table>
这样写控制台报错Invalid prop: type check failed for prop "showExpandColumn". Expected Boolean, got Function
github-actions commented
Hello @ty-lq, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue, thank you!
你好 @ty-lq,为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 issue 助手 来创建 issue 以方便我们定位错误。谢谢配合!