关于element表格自带sortable属性排序错乱问题

在需要排序的列加上:sort-method="(a,b)=>{return a.quantity - b.quantity}",就可以解决问题了。

<el-table-column property="quantity" show-overflow-tooltip label="报警数量" sortable
              :sort-method="(a,b)=>{return a.quantity - b.quantity}">

猜你喜欢

转载自blog.csdn.net/qq_40004867/article/details/129835446