let treeList = []; /*新建数组*/
treeList = response.rows.filter((item) => item.roleKey === 'gridman'|| item.roleKey ==='svrsc'|| item.roleKey ==='svrsup'); /*将符合条件的值放到新数组中*/
treeList.forEach((item) => { /*循环新数组*/
this.allList(item.roleKey)
})
将json数组中符合判断条件的值,存到新数组中
最新推荐文章于 2024-11-15 17:52:45 发布