mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +00:00
improve tree loading for Wiki mode (#2842)
This commit is contained in:
@@ -171,7 +171,21 @@ export const Utils = {
|
||||
return filePath.slice(lastIndex+1);
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* input: '/abc/bc/cb'
|
||||
* output: ['/abc', '/abc/bc', '/abc/bc/cb'];
|
||||
*/
|
||||
getPaths: function(path) {
|
||||
let paths = path.split('/').slice(1);
|
||||
let result = [];
|
||||
while(paths.length) {
|
||||
result.push('/' + paths.join('/'));
|
||||
paths.pop();
|
||||
}
|
||||
return result.reverse();
|
||||
},
|
||||
|
||||
/**
|
||||
* input:
|
||||
* eg: /
|
||||
* ../abc/abc/
|
||||
|
Reference in New Issue
Block a user