Angularjs kendo 树视图未在 Kendo 弹出窗口中显示复选框
Angularjs kendo treeview not showing checboxes in Kendo popup
我正在使用 Kendo Window,其中显示 Kendo 带有复选框的 TreeView。问题是 treeview 呈现正确但复选框不显示。如果我在 Kendo Window 之外呈现树视图(即直接在我的页面中),那么它会正确显示复选框。
请帮助我,因为我卡住了。下面是我使用的代码:
<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>
我正在使用 Kendo Window,其中显示 Kendo 带有复选框的 TreeView。问题是 treeview 呈现正确但复选框不显示。如果我在 Kendo Window 之外呈现树视图(即直接在我的页面中),那么它会正确显示复选框。
请帮助我,因为我卡住了。下面是我使用的代码:
<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>