2 u012746051 u012746051 于 2016.09.22 10:11 提问

ace_tree 树形菜单第一次调用方法能加载成功,第二次就加载失败

function selectPath(obj,callback){
function remoteDateSource (options,callback) {
var path;
if(options.extendsMap == null){
path = "";
}else {
path = options.extendsMap.path;
}
$.ajax({
url : "${ctx}/queryHostDir",
data : {"serverIP" : serviceIp, "path" : path},
type : 'POST',
dataType : 'json',
success : function(response) {
callback({
data : response.obj
});
},
error : function(response) {
console.log("error");
}
});
}

 flow_tree = $('#tree1').ace_tree({
        dataSource : remoteDateSource,
        loadingHTML:'<div class="tree-loading"><i class="ace-icon fa fa-refresh fa-spin blue"></i></div>',
        'folder-open-icon' : 'ace-icon tree-plus',
        'folder-close-icon' : 'ace-icon tree-minus' ,
        'cacheItems' : true,
        'selectable' : true, 
        'itemSelect' : false,
        'folderSelect': true,
        'multiSelect': false
    });

}

1个回答

devmiao
devmiao   Ds   Rxr 2016.09.24 23:58
Csdn user default icon
上传中...
上传图片
插入图片