表格点击排序箭头,需要排序,element组建的是前端当前页面排序,满足不了业务要求
通常,我们都需要所有数据进行排序。
小编给大家写了一种排序方法;官网的另外一种排序下一篇文章见。
<template>
<div>
<el-table :data="tableData" style="width: 100%">
<el-table-column
v-for="item in tableHeader"
:key="item.index"
:label="item.label"
:prop="item.prop"
>
<template slot="header" slot-scope="scope">
<div class="name-sort">
<span>{
{ scope.column.label }}</span>
<span class="sort" v-if="item.sort">
<i
class="increase"
@click="