n20-common-lib 2.6.53 → 2.6.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/components/Layout/indexN.vue +14 -3
- package/style/index.css +1 -1
- package/theme/blue.css +1 -1
- package/theme/cctcRed.css +1 -1
- package/theme/green.css +1 -1
- package/theme/lightBlue.css +1 -1
- package/theme/orange.css +1 -1
- package/theme/purple.css +1 -1
- package/theme/red.css +1 -1
- package/theme/yellow.css +1 -1
package/package.json
CHANGED
|
@@ -207,7 +207,8 @@ export default {
|
|
|
207
207
|
m.route = base + m.route.replace(/\/$/, '')
|
|
208
208
|
m.route || (m.route = '/')
|
|
209
209
|
m.uuid = m.route
|
|
210
|
-
|
|
210
|
+
// 新增一个字段用于接收初始化的url携带参数的处理之后的url
|
|
211
|
+
m.originPath = getBeforeQuestionMark(m.route)
|
|
211
212
|
menuList.push(m)
|
|
212
213
|
}
|
|
213
214
|
})
|
|
@@ -226,6 +227,7 @@ export default {
|
|
|
226
227
|
this.menusC = menus
|
|
227
228
|
this.menuList = menuList
|
|
228
229
|
},
|
|
230
|
+
|
|
229
231
|
getTabList() {
|
|
230
232
|
let tabList = JSON.parse(window.sessionStorage.getItem('tab-list')) || []
|
|
231
233
|
this.tabList = tabList
|
|
@@ -274,7 +276,6 @@ export default {
|
|
|
274
276
|
},
|
|
275
277
|
tabClick(tab) {
|
|
276
278
|
this.activeNav = tab.uuid
|
|
277
|
-
|
|
278
279
|
this.routerPush({
|
|
279
280
|
path: tab.route,
|
|
280
281
|
query: tab.query
|
|
@@ -473,8 +474,18 @@ export default {
|
|
|
473
474
|
}
|
|
474
475
|
}
|
|
475
476
|
|
|
477
|
+
// 处理携带参数的url,只取参数之前的路径
|
|
478
|
+
function getBeforeQuestionMark(url) {
|
|
479
|
+
const questionMarkIndex = url.indexOf('?')
|
|
480
|
+
if (questionMarkIndex !== -1) {
|
|
481
|
+
return url.slice(0, questionMarkIndex)
|
|
482
|
+
}
|
|
483
|
+
return url
|
|
484
|
+
}
|
|
485
|
+
|
|
476
486
|
function getShowUuid(uuid, list) {
|
|
477
|
-
|
|
487
|
+
// 拿uuid去菜单中找对应的uuid或者originPath,originPath主要用与匹配初始化的菜单上携带参数的问题
|
|
488
|
+
let menu = list.find((m) => m.uuid === uuid || m.originPath === uuid)
|
|
478
489
|
if (menu) {
|
|
479
490
|
return menu.hide ? menu.pid : menu.uuid
|
|
480
491
|
}
|