|
@@ -167,6 +167,9 @@ export function handleTree(data, id, parentId, children) {
|
|
for (let d of data) {
|
|
for (let d of data) {
|
|
let id = d[config.id];
|
|
let id = d[config.id];
|
|
childrenListMap[id] = d;
|
|
childrenListMap[id] = d;
|
|
|
|
+ if (!d[config.childrenList]) {
|
|
|
|
+ d[config.childrenList] = [];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
for (let d of data) {
|
|
for (let d of data) {
|
|
@@ -216,7 +219,7 @@ export function getNormalPath(p) {
|
|
if (res[res.length - 1] === '/') {
|
|
if (res[res.length - 1] === '/') {
|
|
return res.slice(0, res.length - 1)
|
|
return res.slice(0, res.length - 1)
|
|
}
|
|
}
|
|
- return res;
|
|
|
|
|
|
+ return res
|
|
}
|
|
}
|
|
|
|
|
|
// 验证是否为blob格式
|
|
// 验证是否为blob格式
|