树形结构
This commit is contained in:
parent
3e3ba58448
commit
1153ac131a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue