//setting中配置属性
  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);
            }
       }

相关文章:

  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
相关资源
相似解决方案