$("#jstree").on("loaded.jstree", function (event, data) {
var n = 0;
var root = data.instance.get_node(event.target.firstChild.firstChild.lastChild);
var nodes = root.children_d;
for (var i in nodes) {
var node = data.instance.get_node(nodes[i]);
if (node.state.mType == "user") {
data.instance.set_icon(node, 'fa fa-user');//需要下载Font Awesome图标库
n ++;
}
}
if (n == 0){
layer.msg("没有找到节点");
}
data.instance.open_node(root.id);// 展开根节点
});

相关文章:

  • 2021-05-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2021-08-06
  • 2022-12-23
  • 2021-10-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
相关资源
相似解决方案