Javascript 在剑道树视图中将箭头符号设为加号(+)和减号(-)
我是剑道UI新手,下面是我在剑道树视图中显示数据的示例代码。结果很好,但在展开和折叠菜单时,它会显示箭头符号,而不是我想将其设置为加号+减号-:Javascript 在剑道树视图中将箭头符号设为加号(+)和减号(-),javascript,jquery,css,kendo-ui,kendo-treeview,Javascript,Jquery,Css,Kendo Ui,Kendo Treeview,我是剑道UI新手,下面是我在剑道树视图中显示数据的示例代码。结果很好,但在展开和折叠菜单时,它会显示箭头符号,而不是我想将其设置为加号+减号-: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Kendo UI Snippet</title> <link rel="stylesheet" href="http://cdn.
<!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>
您应该能够通过css自定义treeview图标: .k-treeview.k-minus{ 背景:url'../Images/your_-minus_img.png'center; } .k-treeview.k-plus{ 背景:url'../Images/your_plus_img.png'center; }
请参阅现场样本谢谢you@Andrea,但无法加载给定的url,因为它是从而不是从我的path@majji添加了到dojo上的实时示例的链接