问问题
2015 次
1 回答
0
您可以将 expand 作为节点项的属性包括在内,如下所示:
{
"data":{
"name":"Home",
"size":"20kb",
"type":"Folder"
},
"children":[
{
"data":{
"name":"Invoices",
"size":"20kb",
"type":"Text"
},
expanded: true
}
],
expanded: true
}
树表使用以下节点接口:
export interface TreeNode {
data?: any;
children?: TreeNode[];
leaf?: boolean;
expanded?: boolean;
}
于 2019-03-08T01:05:16.560 回答