zoukankan      html  css  js  c++  java
  • layui表格

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Document</title>
      <link rel="stylesheet" href="./layui/css/layui.css">
    
    
    </head>
    
    <body>
      <table id="demoTreeTb"></table>
      <script src="./jquery/dist/jquery.js"></script>
      <script src="./layui/layui.js"></script>
      <script src="./treetable-lay/dist/treeTable.js"></script>
      <script>
        layui.config({
          base: './treetable-lay'
        }).use(['treeTable'], function () {
          var treeTable = layui.treeTable;
    
        });
        layui.use(['treeTable'], function () {
          var $ = layui.jquery;
          var treeTable = layui.treeTable;
    
          // 渲染树形表格
          var insTb = treeTable.render({
            elem: '#demoTreeTb',
            url: './main.json',
            tree: {
              iconIndex: 2,           // 折叠图标显示在第几列
              isPidData: true,        // 是否是id、pid形式数据
              idName: 'authorityId',  // id字段名称
              pidName: 'parentId'     // pid字段名称
            },
            cols: [[
              { type: 'numbers' },
              { type: 'checkbox' },
              { field: 'authorityName', title: '菜单名称' },
              { field: 'menuUrl', title: '菜单地址' },
              { field: 'authority', title: '权限标识' }
            ]]
          });
    
        });
      </script>
    </body>
    
    </html>

     layui地址:     https://www.layui.com/demo/table/operate.html

    from和layui表格:https://blog.csdn.net/qq_26118603/article/details/80064173

    *** from和layui表格*https://www.pianshen.com/article/3879356914/

  • 相关阅读:
    thinkPHP入门之二
    thinkPHP入门
    斐波那契数列,冒泡排序,选择排序,数组去重
    jquery-懒加载插件
    本地存储之cookie
    javascript的快速排序法
    [luogu2165 AHOI2009] 飞行棋 (枚举)
    [luogu2576 SCOI2010] 幸运数字 (容斥原理)
    [luogu2587 ZJOI2008] 泡泡堂 (贪心)
    [luogu2602 ZJOI2010] 数字计数 (数位dp)
  • 原文地址:https://www.cnblogs.com/wsm777/p/14141885.html
Copyright © 2011-2022 走看看