refactor(接口测试): 优化断言文档中长json导入展开的方法
This commit is contained in:
parent
c81bbf5754
commit
96fac03f5e
|
@ -217,9 +217,12 @@ export default {
|
||||||
if (tree.children.length === 0) {
|
if (tree.children.length === 0) {
|
||||||
resolveArr = this.originalData;
|
resolveArr = this.originalData;
|
||||||
//找到最后一层children
|
//找到最后一层children
|
||||||
const tarItem = resolveArr.find(item => item.id === tree.idList.shift())
|
let id;
|
||||||
tarItem.loadedChildren = true
|
while ((id = tree.idList.shift())) {
|
||||||
resolveArr = tarItem.children
|
const tarItem = resolveArr.find(item => item.id === id)
|
||||||
|
tarItem.loadedChildren = true
|
||||||
|
resolveArr = tarItem.children
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
resolveArr = tree;
|
resolveArr = tree;
|
||||||
resolveArr = tree.children;
|
resolveArr = tree.children;
|
||||||
|
|
Loading…
Reference in New Issue