vue-vben-admin
vue-vben-admin copied to clipboard
Tabel合计行错位:当合计行之前有ifShow:false
`{ title: 'A', dataIndex: 'a', sorter: 'true', width: 160, },
{
title: 'B',
dataIndex: 'b',
key:'b',
sorter: 'true',
},
{
title: 'D',
dataIndex: 'd',
width: 100,
sorter: 'true',
},
{
title: 'C',
dataIndex: 'c',
width: 100,
sorter: 'true',
ifShow: false,
},
{
title: 'e',
dataIndex: 'e',
width: 100,
sorter: 'true',
},**开启合计列:d 显示会错位;当把d移到c列后(c列有ifShow:false),合计显示正常不错误;如果把c列的ifShow去掉,显示也正常**function handleSummary(tableData: Recordable[]) {
const totalNo = tableData.reduce((prev, next) => {
prev += parseFloat(next.d);
return prev;
}, 0);
return [
{
_row: '合计',
_index: '合计',
d:totalNo
},
];
}`
请问解决了吗
我调整了列的显示顺序,临时解决了。
------------------ 原始邮件 ------------------ 发件人: "anncwb/vue-vben-admin" @.>; 发送时间: 2021年10月15日(星期五) 上午10:22 @.>; 抄送: " @.@.>; 主题: Re: [anncwb/vue-vben-admin] Tabel合计行错位:当合计行之前有ifShow:false (#755)
请问解决了吗
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
你之前问题是这样 import Icon from '/@/components/Icon';

而且当有rowselect和index属性时,建议配置对应的宽度,table的每一列也得设置具体宽度,summary的columns是拷贝的table的columns属性才能拿到具体宽度,才能避免显示错位,PS:summary的rowselect列的宽度是在TableFooter.vue里面写死的60,所以表格的rowselect宽度也建议配60,最后就是合计的列前面不能有隐藏列
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days