问题:在iview的table组件中,前端在多选时如果点击下一页则丢失了上一页table的多选数据(由于采用的后端分页,每次翻页会直接刷新为新数据)
定义data
@Provide() selectedIds: any = new Set();
<Table border ref="selection" :columns="orderColums" :data="orderData" :loading="loadings.table" @on-select="handleSelectRow" @on-select-cancel="handleCancelRow" @on-select-all="handleSelectAll" @on-select-all-cancel="handleSelectAll">
<template slot="loading"><Spin fix><Icon type="ios-loading" size=22 class="demo-spin-icon-load"></Icon></Spin></template>
</Table>
// 处理table翻页选中的回显回来
// cy 全选和取消全选时触发
handleSel