Layui-Tree动态加载数据

  • A+
所属分类:Layui

Layui-Tree动态加载数据

Html

  1. <ul id="demo"></ul>  

JavaScript

  1. $.ajax({  
  2.     type: "GET",  
  3.     url: setter.InterfaceUrl + 'Menu/MenuTreeList',  
  4.     dataType: 'json',  
  5.     success: function (d) {  
  6.         layui.tree({  
  7.             elem: '#demo',  
  8.             nodes: d,  
  9.             click: function (node, a) {  
  10.                 console.log(node);  
  11.             },  
  12.             success: function () {  
  13.             }  
  14.         });  
  15.     }  
  16. })  
钰玺

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: