赞
踩
对应实体类
private Integer id;
private String text;
private Integer pid;
private String href;
private Boolean selectable;
private List nodes;
$(“iframe”).contents().find(“html,body”).scrollTop(0);
var setHeight = $(window).height()-64-41;
$.ajax({
url:"/order/querytree",
type:“post”,
data:{},
datatype:‘josn’,
success:function(result) {
$("#mytree").treeview({
color: “#428bca”,
//backColor: “black”,背景色
//borderColor:‘green’,
collapseIcon: “glyphicon glyphicon-minus”,//可收缩的节点图标
//nodeIcon: “glyphicon glyphicon-user”,
emptyIcon: “glyphicon glyphicon-asterisk”,//设置列表树中没有子节点的节点的图标
expandIcon: “glyphicon glyphicon-leaf”, //设置列表上中有子节点的图标
highlightSearchResults: true,//是否高亮搜索结果 默认true
highlightSelected: true, //是否选中高亮显示
onhoverColor: “#f5f5f5”, //鼠标滑过的颜色
levels: 1, //设置初始化展开几级菜单 默认为2
selectedIcon: ‘glyphicon glyphicon-tint’,
//selectedBackColor: ‘black’, //设置被选中的节点背景颜色
//selectedColor : ‘red’, //设置被选择节点的字体、图标颜色
showBorder: true, //是否显示边框
showCheckbox: false, //是否显示多选框
uncheckedIcon:’’, //设置未选择节点的图标
//showTags:true,//显示徽章
data: result, // 数据源
onNodeChecked: function (event, data) {
}, onNodeSelected: function (event, data) { $.addtabs({iframeHeight: setHeight + 'px'}); $.addtabs.add({ id: data.id, title: data.text, url: data.href, }); }, onNodeEnabled: function (event, data) { alert(data.id); } }) }
})
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。