给easyui tree树加图标

来源:互联网 发布:服务器php环境配置 编辑:程序博客网 时间:2024/05/21 18:35

在给界面传JSON值多加个图标属性就OK了,

其中IconClass为数据库中存放的图标字段

 TreeNode treeNode = new TreeNode            {                id =  this.MenuCode ,                text = this.MenuName,                //  state = this.state == true ?"open" :"closed"  ,//添用方法自动处理了                iconCls =this.IconClass,//添加图标                Checked = false,                attributes = new { Url = this.URL },                children = new List<TreeNode>()            };


0 0
原创粉丝点击