zoukankan      html  css  js  c++  java
  • layui分页失效问题

    真的崩溃,怎么都实现不了分页效果。获取数据11条,设置显示8条,它显示11条。

    后来看一个大佬的文章:https://blog.csdn.net/qq_38642674/article/details/105487465

    自己做一个备忘。

    layui.use('table', function(){
                var table = layui.table;
                $.ajax({
                    type: "POST",
                    url: "/adminInfoReal/getListAdminInfoReal",
                    dataType: "json"
                    ,success:function (datal) {
                        if (datal){
                            var option={
                                elem: '#adminRealTable'//table的id
                                ,height: 480
                                ,page:true
                                ,limit:8
                                ,title: '用户数据表'
                                ,cols: [[ //表头
                                    {type: 'checkbox', fixed: 'left'}//开启复选框
                                    ,{field: 'adminRealUserId', title: '身份证号', 100, sort: true, fixed: 'left'}
                                    ,{field: 'adminRealName', title: '姓名', 100}
                                    ,{field: 'adminRealPhone', title: '手机号', 100, sort: true}
                                    ,{field: 'adminRealEmail', title: '邮箱', 100}
                                    ,{field: 'adminRealAddress', title: '城市',  6000}
                                    ,{ title:'操作', toolbar: '#barDemo',150, sort: true,fixed: 'right'}
                                ]]
                            };
                            option.data=datal.data;
                            table.render(option);
                        }else{
                            layer.msg("数据获取失败");
                        }
                    }
                    ,error:function (datal) {
                        layer.msg("数据获取失败");
                    }
                });
     });
    

      

  • 相关阅读:
    73. Set Matrix Zeroes
    289. Game of Live
    212. Word Search II
    79. Word Search
    142. Linked List Cycle II
    141. Linked List Cycle
    287. Find the Duplicate Number
    260. Single Number III
    137. Single Number II
    Oracle EBS中有关Form的触发器的执行顺序
  • 原文地址:https://www.cnblogs.com/hahayixiao/p/15302427.html
Copyright © 2011-2022 走看看