修改PCTree的bug

This commit is contained in:
zhenggengtong 2022-02-17 22:30:44 +08:00
parent 99d8db171c
commit 23c5eb13b9

View File

@ -2,10 +2,14 @@
SV.registerLayout('PCTree', { SV.registerLayout('PCTree', {
sourcesPreprocess(sources) { sourcesPreprocess(sources) {
sources[0].rootLabel = ['data', 'parent', 'firstChild']; for(let i = 0; i < sources.length; i++){
if(sources[i].root){
sources[i].rootLabel = ['data', 'parent', 'firstChild'];
}
}
return sources; return sources;
}, },