selection-change:當選擇項發(fā)生變化時會觸發(fā)該事件(當分頁切換時,選中的數(shù)據(jù)都會自動清空)文章來源地址http://www.zghlxwxcb.cn/news/detail-702040.html
一、在el-table中添加 :row-key=“id”
<el-table :data="tableData" border style="width: 95%"
@selection-change="handleSelectionChange"
row-key="id">
二、在el-table-column中設(shè)置 type=“selection” 并且設(shè)置 :reserve-selection=“true”
<el-table-column type="selection" align="center" width="55"
:reserve-selection="true">
</el-table-column>
總結(jié) 以上步驟 缺一不可
文章來源:http://www.zghlxwxcb.cn/news/detail-702040.html
到了這里,關(guān)于element ui el-table分頁多選功能的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!