layui数据表格自定义每页条数limit设置

2020-10-27 17:45:37 浏览数 (1)

代码语言:javascript复制
table.render({
  elem: '#table',
  url: 'userCenter/userlist',
  where: {
      access_token: config.getToken().access_token
  },
  page: true,
  limits: [100,1000, 2000, 5000],
  limit: 1000, //每页默认显示的数量
  cols: [[
    {checkbox: true},
    {type: 'numbers', title: '序号'},
    {field: 'id', title: '编号'},
  ]],
//loading: false //请求数据时,是否显示loading
});

0 人点赞