Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_hjm_a
杨树明 5 years ago
commit c1a57c1d85

@ -21,8 +21,11 @@ function getNewTreeData(treeData, curKey, child, level) {
data.forEach((item) => {
// 这里不能用indexOf 同一级可能出现test目录和test.py文件
if (item.key == curKey) {
child = addPrePath(child, curKey);
item.children = child;
if (child && child.length) { // 可能没有子节点
child = addPrePath(child, curKey);
item.children = child;
}
item.isLeaf = false;
} else {
if (item.children) {
loop(item.children);
@ -153,6 +156,10 @@ class CodeRepositoryViewContainer extends Component {
});
}
map2OldData = (treeData) => {
if (!treeData || treeData.length == 0) {
return []
}
if (!treeData || treeData.length === 0) return treeData;
treeData = treeData.map(item => {
return {

Loading…
Cancel
Save