Browse Source

菜单数据去掉收尾空格

mayday 2 years ago
parent
commit
17aeed7a29
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/tabbar/Home.vue

+ 2 - 2
src/views/tabbar/Home.vue

@@ -80,7 +80,7 @@ async function getMenuList(){
             menuConfig.forEach(item=>{
                 if(item.level===1){
                     arr.forEach(f=>{
-                        if(f.name===item.key){
+                        if(f.name.trim()===item.key){
                             item.show=true
                         }
                     })
@@ -88,7 +88,7 @@ async function getMenuList(){
                 if(item.level===2){
                     arr.forEach(f=>{
                         f.children.forEach(s=>{
-                            if(s.name===item.key){
+                            if(s.name.trim()===item.key){
                                 item.show=true
                             }
                         })