vue iview 表格数据合并行/列
iview 使用:span-method="handleSpan"合并行/列,未执行handleSpan方法,求大神指导
已解决 少引用了iviewUI
<Table :columns="columns14" :data="data5" :span-method="handleSpan"></Table>columns14: [
{
title: 'Date',
key: 'date'
},
{
title: 'Name',
key: 'name'
},
{
title: 'Age',
key: 'age'
},
{
title: 'Address',
key: 'address'
}
],
data5: [
{
name: 'John Brown',
age: 18,
address: 'New York No. 1 Lake Park',
date: '2016-10-03'
},
{
name: 'Jim Green',
age: 24,
address: 'London No. 1 Lake Park',
date: '2016-10-01'
},
{
name: 'Joe Black',
age: 30,
address: 'Sydney No. 1 Lake Park',
date: '2016-10-02'
},
{
name: 'Jon Snow',
age: 26,
address: 'Ottawa No. 2 Lake Park',
date: '2016-10-04'
}
]
handleSpan ({ row, column, rowIndex, columnIndex }) {
console.log(9999999999999)
if (rowIndex === 2 && columnIndex === 0) {
return {
rowspan: 2,
colspan: 1
};
} else if (rowIndex === 3 && columnIndex === 0) {
return {
rowspan: 0,
colspan: 0
};
}
},
直接将官方的数据扒过来本地还是不执行,9999都打印不出。求大神指示
版本号如下
"vue": "^2.5.2",
"iview": "^3.5.4",
以上是 vue iview 表格数据合并行/列 的全部内容, 来源链接: utcz.com/p/936524.html