我正在使用此代码创建 YUI TreeView。是否可以在没有扩展图标或文件图标的情况下拥有孩子?我只想为他们提供检查图标。
<div id="treeView"></div>
YUI().use(
'aui-tree-view',
function(Y) {
new Y.TreeViewDD(
{
boundingBox: '#treeView',
children: [
{
children: [
{label: 'Child 1', leaf: true, type: 'check'},
{label: 'Child 2', leaf: true, type: 'check'},
{label: 'Child 3', leaf: true, type: 'check'},
{label: 'Child 4', leaf: true, type: 'check'},
{label: 'Child 5', leaf: true, type: 'check'}
],
expanded: true,
label: 'Checkboxes'
}
]
}
).render();
}
);