树形结构

This commit is contained in:
18571350067 2022-03-18 18:01:36 +08:00
parent 3e3ba58448
commit 1153ac131a
1 changed files with 1 additions and 1 deletions

View File

@ -262,7 +262,7 @@ export default {
const list2tree1 = (list, parentId) => {
return list.filter((item) => {
//
if (this.treeDataOne) this.treeDataOne.push(item.value)
if (!this.treeDataOne) this.treeDataOne.push(item.value)
if (item.parentId === parentId) {
item.children = list2tree1(list, item.id)
return true