我是Kendo-UI的新手,下面是我在示例代码中显示剑道树视图中的数据。结果很好,但是在展开和折叠菜单时显示箭头符号,而不是我希望将其设为加号(+)和减号( - ):
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Kendo UI Snippet</title>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.rtl.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.dataviz.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.dataviz.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.mobile.all.min.css">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://cdn.kendostatic.com/2014.2.716/js/kendo.all.min.js"></script>
</head>
<body>
<div id="treeview"></div>
<script>
$("#treeview").kendoTreeView({
animation: false,
dataSource: [
{ text: "foo", items: [
{ text: "bar", items: [{text:"car"}] }
] }
]
});
</script>
</body>
</html>
答案 0 :(得分:0)
您应该可以通过css自定义树视图图标:
.k-treeview .k-minus {
background: url('../Images/your_minus_img.png')center center;
}
.k-treeview .k-plus{
background: url('../Images/your_plus_img.png')center center;
}
查看实时样本here on Dojo