删除页面最后一条数据时,currentPage没有减一,页面列表为空
发布日期:2021-05-08 00:22:16 浏览次数:26 分类:精选文章

本文共 1145 字,大约阅读时间需要 3 分钟。

???????????

?Vue.js????????????????????????????????????????????????????

????

????????????????????????????HTML???????JavaScript?????????????????????????????????????????????????????????

?????????????????computed?????methods????????????????????????

  • ?????????????????????????
  • ???????????????????????????????
  • ???????????????????????????
  • ?????????????????????????????????????????????????????????????????????????????????watch??????????

    ???

    ????Watcher??Vue.js????????????????????????????????????????????????????????????????????????

    ???????????

  • ???????API????????
  • ????????????????
  • ?????????????????
  • ??????????????????????????????????????????????????????????????????????????

    ????

    ?????????????????

    <el-pagination layout="prev, pager, next" @current-change="changePageNum" :current-page="currentPage" :page-size="pageSize" :total="total">

    watch: { total() { if (this.total === (this.currentPage - 1) * this.pageSize && this.total !== 0) { this.currentPage -= 1; getDiscountList(this); // ?????? } } }

    ????

    ?????????????????????????????????????

  • ??el-pagination?????????
  • ??total?????
  • ????????????????????????????????????
  • ????????????????????????????????????

    上一篇:vue计算属性和监听器区别
    下一篇:vue每次点击弹框重新加载子组件

    发表评论

    最新留言

    做的很好,不错不错
    [***.243.131.199]2025年05月01日 16时21分10秒