Showing
1 changed file
with
2 additions
and
9 deletions
@@ -140,18 +140,11 @@ layui.extend({ | @@ -140,18 +140,11 @@ layui.extend({ | ||
140 | if(setter.pageTabs && pathURL !== '/'){ | 140 | if(setter.pageTabs && pathURL !== '/'){ |
141 | if(!matchTo){ | 141 | if(!matchTo){ |
142 | var tabName='' // tab标签名 | 142 | var tabName='' // tab标签名 |
143 | - var href = pathURL; | ||
144 | tabList.forEach((e) =>{ | 143 | tabList.forEach((e) =>{ |
145 | var url = e.path; | 144 | var url = e.path; |
146 | - if(url && !url.startsWith('/')){ | ||
147 | - url = '/'+url; | 145 | + if(url && url.indexOf(pathURL) != -1){ |
146 | + tabName = e.name | ||
148 | } | 147 | } |
149 | - if(href && !href.startsWith('/')){ | ||
150 | - href = '/'+href; | ||
151 | - } | ||
152 | - if(url === href){ | ||
153 | - tabName = e.name | ||
154 | - } | ||
155 | }); | 148 | }); |
156 | if(!tabName){ | 149 | if(!tabName){ |
157 | tabName= res.title | 150 | tabName= res.title |
-
Please register or login to post a comment