zTree setting.view.addDiyDom 方法可以实现自定义控件,指定节点显示内容。因此需要自己实现addDiyDom方法。
19) {
spantxt = spantxt.substring(0,29) + "...";
$("#" + treeNode.tId + "_span").html(spantxt);
}
}
var spantxt = $("#" + treeNode.tId + "_span").html();
$("#" + treeNode.tId + "_span").css({"fontSize":13});
$("#" + treeNode.tId + "_span").attr("data-toggle","tooltip");
$("#" + treeNode.tId + "_span").attr("data-placement","top");
if (spantxt.length > 19) {
spantxt = spantxt.substring(0,19) + "...";
$("#" + treeNode.tId + "_span").html(spantxt);
}
$("#" + treeNode.tId + "_span").css({"fontSize":13});
$("#" + treeNode.tId + "_span").attr("data-toggle","tooltip");
$("#" + treeNode.tId + "_span").attr("data-placement","top");
if (spantxt.length > 19) {
spantxt = spantxt.substring(0,19) + "...";
$("#" + treeNode.tId + "_span").html(spantxt);
}
}
zTree view 相关定义如下: