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

时间:2022-07-28
本文章向大家介绍layui数据表格自定义每页条数limit设置,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
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
});