easyui 异步加载子节点(节点有复选框),节点选中而子节点未加载且未被选中
答案:2 悬赏:0 手机版
解决时间 2021-12-03 02:21
- 提问者网友:不爱我么
- 2021-12-02 07:51
easyui 异步加载子节点(节点有复选框),节点选中而子节点未加载且未被选中
最佳答案
- 五星知识达人网友:迟山
- 2021-12-02 09:28
$("#Tree").tree({
checkbox: true,
url: "XXX/XXXX/XXXXX", //加载全部节点
onBeforeExpand:function(node){
$("#Tree").tree("options").url = "XXX/XXXX/XXXXX?node=" + node.id;//加载父节点下的子节点
},
onCheck : function(node, checked) {
$("#Tree").tree('expand',node.target);
}
});
checkbox: true,
url: "XXX/XXXX/XXXXX", //加载全部节点
onBeforeExpand:function(node){
$("#Tree").tree("options").url = "XXX/XXXX/XXXXX?node=" + node.id;//加载父节点下的子节点
},
onCheck : function(node, checked) {
$("#Tree").tree('expand',node.target);
}
});
全部回答
- 1楼网友:愁杀梦里人
- 2021-12-02 10:02
var width = $(window).width()-80;
var height = $(window).height()-120;
stView_layout = $('#stView_layout').layout({
width: width,
height: height
});
station_view = $('#stationView').window({
title: '测站导航',
left:50,
top:80,
width: width,
modal: false,
shadow: false,
closed: true,
height: height,
onResize:function(w,h){
if(stView_treegrid){
stView_treegrid.treegrid({
width:w-20,
height:h-260
});
}
}
});
var height = $(window).height()-120;
stView_layout = $('#stView_layout').layout({
width: width,
height: height
});
station_view = $('#stationView').window({
title: '测站导航',
left:50,
top:80,
width: width,
modal: false,
shadow: false,
closed: true,
height: height,
onResize:function(w,h){
if(stView_treegrid){
stView_treegrid.treegrid({
width:w-20,
height:h-260
});
}
}
});
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯