constrouter=[{path:'/hello',icon:'hammer',name:'hello',title:'你好',children:[{path:'index',title:'你好',name:'hello_index'},{path:'index1',title:'你好1',name:'hello_index1'}]},{path:'/hello1',icon:'hammer',name:'hello1',title:'你好',children:[{path:'index2',title:'你好2',name:'hello_index2'},{path:'index3',title:'你好3',name:'hello_index3'},{path:'index4',title:'你好3',name:'hello_index4'}]},{path:'/hello2',icon:'hammer',name:'hello2',title:'你好',children:[{path:'index4',title:'你好4',name:'hello_index4'},{path:'index5',title:'你好5',name:'hello_index5'}]}]letrouternone=[{path:'/hello2',children:[]},{path:'/hello1',children:['index2','index3']}];請問如何在router以routernone為規則篩選出新數組,routernone中表明,不取path為'/hello2'的,不取path為'/hello1'的children中path為index2的和path為index3的,
數組中如何按照規則篩選對象?
楊__羊羊
2019-05-21 15:52:03