Open daodaolee opened 5 years ago
table排序有时候不会按照从大到小排列,或者从小到大排,看了源码,有一段:
table.vue (line410) sort (data, type, index) { const key = this.columnsData[index].key data.sort((a, b) => { if (this.columnsData[index].sortMethod) { return this.columnsData[index].sortMethod(a[key], b[key], type) } else if (type === 'asc') { return a[key] > b[key] ? 1 : -1 } return a[key] < b[key] ? 1 : -1 }) return data }
有个sortMethod,也没找到他的说明,请修复
你看下最后提交时间,项目死了,fork过去自己改吧
table排序有时候不会按照从大到小排列,或者从小到大排,看了源码,有一段:
有个sortMethod,也没找到他的说明,请修复