height.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <title>高度最大适应 - 数据表格</title>
  2. <div class="layui-card layadmin-header">
  3. <div class="layui-breadcrumb" lay-filter="breadcrumb">
  4. <a lay-href="">主页</a>
  5. <a><cite>组件</cite></a>
  6. <a><cite>数据表格</cite></a>
  7. <a><cite>高度最大适应</cite></a>
  8. </div>
  9. </div>
  10. <div class="layui-fluid">
  11. <div class="layui-row layui-col-space15">
  12. <div class="layui-col-md12">
  13. <div class="layui-card">
  14. <div class="layui-card-header">高度最大适应</div>
  15. <div class="layui-card-body">
  16. <table class="layui-hide" id="test-table-height"></table>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. <script>
  23. layui.use(['admin', 'table'], function(){
  24. var admin = layui.admin
  25. ,table = layui.table;
  26. table.render({
  27. elem: '#test-table-height'
  28. ,url: './json/table/user30.js'
  29. ,height: 'full-100'
  30. ,cellMinWidth: 80
  31. ,page: true
  32. ,limit: 30
  33. ,cols: [[
  34. {type:'checkbox'}
  35. ,{field:'id', title: 'ID', width:100, sort: true}
  36. ,{field:'username', title: '用户名', width:100}
  37. ,{field:'sex', title: '性别', width:100, sort: true}
  38. ,{field:'sign', title: '签名', minWidth: 150}
  39. ,{field:'experience', title: '积分', sort: true, align: 'right'}
  40. ,{field:'score', title: '评分', sort: true, minWidth: 100, align: 'right'}
  41. ]]
  42. });
  43. });
  44. </script>