美文网首页
el-table翻页保持选中

el-table翻页保持选中

作者: 秀萝卜 | 来源:发表于2020-09-03 17:50 被阅读0次

    参考资料:
    https://www.jianshu.com/p/4888fc9a8108

    <el-table v-loading="loading" :data="tableData" class="table" stripe @selection-change="handleSelectionChange" :row-key="getRowKeys">
                        <el-table-column type="selection" width="60" :reserve-selection="true"></el-table-column>
                        <el-table-column prop="memberId" label="客户ID"></el-table-column>
                        <el-table-column prop="memberName" label="客户名称"></el-table-column>
                        <el-table-column label="操作" width="180" align="center">
                            <template slot-scope="scope">
                                <el-button v-if="getPermission(91)" type="text" icon="el-icon-delete" class="red" @click="del(scope.row)"> 删除
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>
    
    handleSelectionChange(val) {
                this.selectedData = val;
            },
    
    getRowKeys(row){
                return row.memberId;
            },
    
    
    

    相关文章

      网友评论

          本文标题:el-table翻页保持选中

          本文链接:https://www.haomeiwen.com/subject/pzsosktx.html