jQuery 分页插件代码

2018-01-19 11:11:53110666查看评论(4)
jQuery 分页插件代码
jQuery 分页插件代码

js代码

  <script src="js/vue.js"></script>
  <script>
    var newlist = new Vue({
      el: '#app',
      data: {
        current_page: 1, //当前页
        pages: 50, //总页数
        changePage:'',//跳转页
        nowIndex:0
      },
      computed:{
         show:function(){
             return this.pages && this.pages !=1
         },
         pstart: function() {
           return this.current_page == 1;
         },
         pend: function() {
           return this.current_page == this.pages;
         },
         efont: function() {
           if (this.pages <= 7) return false;
           return this.current_page > 5
         },
         ebehind: function() {
           if (this.pages <= 7) return false;
           var nowAy = this.indexs;
           return nowAy[nowAy.length - 1] != this.pages;
         },
         indexs: function() {

           var left = 1,
             right = this.pages,
             ar = [];
           if (this.pages >= 7) {
             if (this.current_page > 5 && this.current_page < this.pages - 4) {
               left = Number(this.current_page) - 3;
               right = Number(this.current_page) + 3;
             } else {
               if (this.current_page <= 5) {
                 left = 1;
                 right = 7;
               } else {
                 right = this.pages;

                 left = this.pages - 6;
               }
             }
           }
           while (left <= right) {
             ar.push(left);
             left++;
           }
           return ar;
         },
       },
      methods: {
        jumpPage: function(id) {
          this.current_page = id;
        },
      },

    })
  </script>
一款带跳转功能的vue.js分页插件代码,功能全齐全的vue分页组件,vue.js使用computed计算属性,数据变动执行对应的函数分页代码。 


申明:本站所有资源都是转载各大下载站,或由网友投稿发布,请自行检测软件的完整性,如有侵权请联系我们删除下架,联系方式:admin@php.cn

相关推荐
jQuery 分页插件代码

jQuery 分页插件代码

/xiazai/js/jQuery 分页插件代码
106061
jQuery的表格数据分页插件代码

jQuery的表格数据分页插件代码

/xiazai/js/jQuery的表格数据分页插件代码
61528
jquery分页插件

jquery分页插件

/xiazai/js/jquery.jqpagination.js分页插件是一款带有左右按钮的分页样式代码。
64165
jQuery Pagination分页插件

jQuery Pagination分页插件

/xiazai/js/jQuery Pagination,分页插件
100459
jquery分页插件bootstrap

jquery分页插件bootstrap

/xiazai/js/jquery分页插件bootstrap是一款优化bootstrap的jquery分页插件,非常方便设置页码总数、前一页、后一页、页码区间、ajax改变页面、页码显示个数、点击页码后回调方法等。
84690
多款jQuery分页插件特效

多款jQuery分页插件特效

/xiazai/js/多款jQuery分页插件特效
60155
jQuery基于Bootstrap分页插件

jQuery基于Bootstrap分页插件

/xiazai/js/jQuery基于Bootstrap分页插件
58334
jQuery红色样式分页插件下载

jQuery红色样式分页插件下载

/xiazai/js/jQuery红色样式分页插件下载,红色的分页样式代码,带搜索的分页样式效果。
2563230
网页评论
最新评论
阿润
  • 阿润
  • 非常好用,感谢分享
  • 2019-05-31 12:54:34发表+0回复
Kuriboh
纪怀明
饶康
  • 饶康
  • 暂无评论暂无评论!
  • 2019-03-25 17:00:37发表+0回复