【问题标题】:Bootstrap-table page refresh issue引导表页面刷新问题
【发布时间】:2020-06-01 02:29:31
【问题描述】:

例如,我使用了引导表分页。我现在在第五页。我有一个要删除的操作。他是引导程序的模态框。如果我确认删除,他会发送一个ajax请求。成功后我应该刷新我的页面,当我执行刷新时,页面又回到了第一页,这根本不符合我们的经验,希望能找到一些解决方案,谢谢在这里输入图片描述

【问题讨论】:

    标签: bootstrap-4 bootstrap-table


    【解决方案1】:

    在删除之前,使用$('#table').bootstrapTable('getOptions').pageNumber 获取当前页码。然后ajax调用完成,数据加载成功后,设置页码为$('#table').bootstrapTable('selectPage', {pageNumber})

    相关链接:

    https://bootstrap-table.com/docs/api/methods/#getoptions
    https://examples.bootstrap-table.com/#methods/select-prev-next-page.html

    【讨论】:

      猜你喜欢
      • 2012-08-12
      • 2017-04-13
      • 2021-12-31
      • 2017-12-14
      • 2011-05-13
      • 2017-04-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多