view: {
showLine:false,
dblClickExpand: true,
showIcon: false,
addDiyDom: addDiyDom //自定义
}
//添加自定义样式函数
function addDiyDom(treeId, treeNode) {
var spaceWidth = 5;
var switchObj = $("#" + treeNode.tId + "_switch"),
checkObj = $("#" + treeNode.tId + "_check"),
icoObj = $("#" + treeNode.tId + "_ico");
switchObj.remove();
checkObj.remove();
icoObj.parent().before(switchObj);
icoObj.parent().before(checkObj);
var spantxt = $("#" + treeNode.tId + "_span").html();
if (spantxt.length > 17) {
spantxt = spantxt.substring(0, 15) + "..."; //最多显示15个字
$("#" + treeNode.tId + "_span").html(spantxt);
}
}