明树Git Lab

Commit f2d30b6f authored by zengfanpei's avatar zengfanpei

update

parent 5360ed38
const crypto = require('crypto');
const _ = require('lodash');
function genRandomString(length) {
......@@ -39,6 +40,7 @@ function buildTree(nodes) {
if (nodeMap.has(parentId)) {
// 将当前节点添加到父节点的children数组中
nodeMap.get(parentId).children.push(nodeMap.get(String(node._id)));
nodeMap.get(parentId).children = _.orderBy(nodeMap.get(parentId).children, 'order')
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment