From 21d72c4a80fe2937d0c4ddd20624b27adbcd989b Mon Sep 17 00:00:00 2001 From: lizi00164331
个性化文字样式,只针对 zTree 在节点上显示的<A>对象。
+默认值:{}
+JSON 格式为 JQuery css方法中的 JSON 对象格式,例如:{color:"#ff0011", background:"blue"}
+对应 zTree 的 treeId,便于用户操控
+需要设置自定义样式的节点 JSON 数据对象
+返回值同 JSON 格式的数据,例如:{color:"#ff0011", background:"blue"}
+var setting = {
+ view: {
+ fontCss : {color:"red"}
+ }
+};
+ function setFontCss(treeId, treeNode) {
+ return treeNode.level == 0 ? {color:"red"} : {};
+};
+var setting = {
+ view: {
+ fontCss: setFontCss
+ }
+};
+