1、數(shù)據(jù)是不定的,渲染數(shù)據(jù)時,點了排序,會影響下一次的數(shù)據(jù)視圖的順序。2、 <el-table
:data="rowTb"
border
ref="sort"
stripe
@row-dblclick="toShowDetails"
v-loading="resLoading"
element-loading-text="拼命加載中. . ."
style="font-size: 12px;">
<el-table-column type="index" fixed width="80"/>
<div v-for="(item,index) in rowTh">
<el-table-column sortable :key="index" :prop="item" :label="item" show-overflow-tooltip min-width="270px"/>
</div>
</el-table>3、嘗試用this.$refs.sort.clearSort();沒解決。
1 回答

有只小跳蛙
TA貢獻1824條經(jīng)驗 獲得超8個贊
clearSort()這個方法可能不在this.$refs.sort下面哦,嘗試著把this.$refs.sort.clearSort()打印出來看看是不是undefined或者打印this.$refs.sort去找找clearSort()方法在哪里
添加回答
舉報
0/150
提交
取消