我正在使用 Kendo Window,在其中显示带有复选框的 Kendo TreeView。问题是 Treeview 正确呈现,但复选框未显示。如果我在 Kendo Window 之外(即直接在我的页面中)呈现 Treeview ,那么它会正确显示复选框。
请帮忙,因为我被卡住了。下面是我使用的代码:
<div kendo-tree-view k-options="treeOptions" k-data-source="treeDataSource"></div>
$scope.treeOptions = {
checkboxes: {
checkChildren: true
}
};
最佳答案
这段代码似乎工作正常:
<div kendo-window>
<div kendo-tree-view k-options="treeOptions" k-data-source="treeDataSource"></div>
</div>
<script>
angular.module("app", ["kendo.directives"]).controller("controller", function($scope) {
$scope.treeOptions = {
checkboxes: {
checkChildren: true
}
};
$scope.treeDataSource = [
{ text: "Furniture", expanded: true, items: [
{ text: "Tables & Chairs" },
{ text: "Sofas" },
{ text: "Occasional Furniture" }
] },
{ text: "Decor", items: [
{ text: "Bed Linen" },
{ text: "Curtains & Blinds" },
{ text: "Carpets" }
] }
];
});
</script>
现场演示:http://dojo.telerik.com/@korchev/INezO/2
关于Angularjs Kendo Treeview 未在 Kendo 弹出窗口中显示复选框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32349991/