效果图:
实现方法:
data:
columns:[
{
title: '创建时间',
width: '110px',
align: 'center',
dataIndex: 'createDate',
sorter: (a, b) => {
let result = 0
for (let i = 0; i < a.createDate.length; i++) {
if (a.createDate[i] === b.createDate[i]) {
continue
} else {
if (a.createDate[i] > b.createDate[i]) {
result = 1
} else {
result = -1
}
break
}
}
return result
}
}
]