|
@@ -234,19 +234,23 @@
|
|
url: '/account/store/tree/?id=' + 43
|
|
url: '/account/store/tree/?id=' + 43
|
|
, done: function (res) {
|
|
, done: function (res) {
|
|
tree.render({
|
|
tree.render({
|
|
- elem: '#id_tree' //绑定元素
|
|
|
|
- ,onlyIconControl: true
|
|
|
|
|
|
+ elem: '#id_tree' //绑定元素
|
|
|
|
+ ,onlyIconControl: true
|
|
,data: res.data
|
|
,data: res.data
|
|
//点击菜单时触发
|
|
//点击菜单时触发
|
|
,click: function(obj) {
|
|
,click: function(obj) {
|
|
//节点高亮
|
|
//节点高亮
|
|
var nodes = document.getElementsByClassName("layui-tree-txt");
|
|
var nodes = document.getElementsByClassName("layui-tree-txt");
|
|
for(var i=0;i<nodes.length;i++){
|
|
for(var i=0;i<nodes.length;i++){
|
|
- if(nodes[i].innerHTML === obj.data.title)
|
|
|
|
|
|
+ if(nodes[i].innerHTML === obj.data.title){
|
|
nodes[i].style.color = "#009688";
|
|
nodes[i].style.color = "#009688";
|
|
- else
|
|
|
|
|
|
+ nodes[i].style.fontWeight= "bold";
|
|
|
|
+ }else{
|
|
nodes[i].style.color= "#555";
|
|
nodes[i].style.color= "#555";
|
|
|
|
+ nodes[i].style.fontWeight= "normal";
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ console.log(obj.data, "oppppp")
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|