其他分享
首页 > 其他分享> > 使用el-table对排序进行回显

使用el-table对排序进行回显

作者:互联网

<el-table
        ref="multipleTable"
        :data="tableData"
        @select-all="handleSelectionChanges"
        :header-cell-style="{ background: '#FAFAFA', color: '#333333' }"
        @sort-change="sortChange"
      >
      // 设置prop值
       <el-table-column
          prop="endTime" 
          show-overflow-tooltip
          label="截止时间"
          sortable="custom"
          align="center"
          min-width="115"
        >
this.$nextTick(() => {
     if (endTimeSort === 2) {
       return;
     }
     endTimeSort
       ? this.$refs.multipleTable.sort('endTime', 'ascending')
       : this.$refs.multipleTable.sort('endTime', 'descending');
 });

标签:sort,el,回显,refs,endTimeSort,multipleTable,nextTick,table,endTime
来源: https://blog.csdn.net/AzeShinja/article/details/120198767