我正在使用以下代码来渲染 dijit.Tree,从图片中可以看出我有这些问题:
- 该文件夹标有“加号图标”,但任何节点都不存在子级。
- 如果我点击一个文件夹,“加号图标”就会消失(首先不应该在那里)。
你能告诉我我在这里做错了什么吗?
this._tree = new Tree({
model: this._model,
showRoot: false,
autoExpand: false,
persist: false,
getLabel: function (item) {
return item.name;
}
});
this._tree.placeAt(this.node);
this._tree.startup();