title: 'Num',
key: 'num',
sortable: true,
sortMethod:function(a,b,type){
//可以用Number()或者parseInt(a)转成数字
let aa = Number(a);
let bb = Number(b);
if(type === 'asc'){
//一定要返回1或者-1,否则排序不生效
return aa>bb?1:-1
}else{
return aa<bb?1:-1
}
参考:https://www.cnblogs.com/victory820/p/9358463.html