实现分页功能但是跳转页面不能展示分割好的数据?

<el-table :data="tables.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border stripe>
        <el-table-column type="index" label="#"></el-table-column>
        <el-table-column v-for="(item, index) in columnList" :key="index" :prop="item.prop" :label="item.label">
          <template slot-scope="scope">
            <el-button type="text" @click="showDialogTableVisibleEmbed(scope.row)">{{
              scope.row[item.prop] }}</el-button>
          </template>
        </el-table-column>
</el-table>
  <el-pagination layout="total,sizes,prev,pager,next,jumper" @size-change="handleSizeChange"
        @current-change="handleCurrentChange" :current-page="currentPage" :page-size="pageSize"
        :page-sizes="[10, 20, 25, 30]" :total="totalLen">
  </el-pagination>
handleSizeChange (val) {
      this.pageSize = val
      this.updateData()
    },
    handleCurrentChange (val) {
      this.currentPage = val
      this.updateData()
    },
阅读 1.7k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题