add batch script
This commit is contained in:
1 parent
0f050a068b
commit
7994e9c515
6 files changed
+106
-9
No files matched your search
@@ -0,0 +1,16 @@
|
||||
/* 批处理脚本 */
|
||||
/*
|
||||
如果有processTree,则先运行prcessTree,如果有返回,则进行后面的针对每个节点运行processNode
|
||||
如果没有定义processTree,则直接针对每个节点运行processNode
|
||||
*/
|
||||
({
|
||||
processTree: (tree) => {
|
||||
console.log("processTree", tree.name);
|
||||
if (tree.name == "hero") {
|
||||
return tree;
|
||||
}
|
||||
},
|
||||
processNode: (node) => {
|
||||
console.log("processNode", node.id)
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user