@lambo-design/pro-layout 1.0.0-beta.435 → 1.0.0-beta.437
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lambo-design/pro-layout",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.437",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "lambo",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@lambo-design/core": "^4.7.1-beta.176",
|
|
14
|
-
"@lambo-design/shared": "^1.0.0-beta.
|
|
14
|
+
"@lambo-design/shared": "^1.0.0-beta.356"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"release-pro-layout": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
<div class="nav-box" v-show="!systemInfo || !systemInfo.navType || systemInfo.navType == 'dropdown'">
|
|
14
14
|
<slot name="pro-layout-nav">
|
|
15
15
|
<LamboProNav
|
|
16
|
+
ref="nav"
|
|
16
17
|
:available-width="availableWidth"
|
|
17
18
|
:not-home-index="hideMenuLogo"
|
|
18
19
|
></LamboProNav>
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
</div>
|
|
39
40
|
<div class="nav-slide-container" v-show="systemInfo && systemInfo.navType && systemInfo.navType == 'slide'" ref="slideContainer">
|
|
40
41
|
<LamboProNavSilde
|
|
42
|
+
ref="sildeNav"
|
|
41
43
|
:available-width="availableWidth"
|
|
42
44
|
:not-home-index="hideMenuLogo"
|
|
43
45
|
@width-change="handleSlideWidthChange"
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
getPreviousTagIndex,
|
|
47
47
|
getDelTagIndex,
|
|
48
48
|
setTagNavListInLocalstorage,
|
|
49
|
-
showTitle
|
|
49
|
+
showTitle, getRootPermission
|
|
50
50
|
} from '@lambo-design/shared/utils/platform'
|
|
51
51
|
import beforeClose from '@lambo-design/shared/utils/menu/before-close'
|
|
52
52
|
import Bus from "@lambo-design/shared/utils/bus";
|
|
@@ -81,6 +81,12 @@ export default {
|
|
|
81
81
|
tabsHeight: 46
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
+
props: {
|
|
85
|
+
notSingleApp: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: true
|
|
88
|
+
}
|
|
89
|
+
},
|
|
84
90
|
methods: {
|
|
85
91
|
initListener(){
|
|
86
92
|
Bus.$on('system-info',(data)=>{
|
|
@@ -233,14 +239,29 @@ export default {
|
|
|
233
239
|
this.emitTags(res, value);
|
|
234
240
|
},
|
|
235
241
|
handleClick(item) {
|
|
236
|
-
if (item.meta && item.meta.appId
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
if (item.meta && item.meta.appId && item.meta.appId != config.homeRouter.meta.appId) {
|
|
243
|
+
let appIdInner = item.meta.appId;
|
|
244
|
+
if (!this.notSingleApp) {
|
|
245
|
+
// 如果是单应用模式,根据permissionId找到最上层目录(即导航栏中的应用)的permissionId
|
|
246
|
+
const permissionList = this.$store.getters.getOriginalPermissionList;
|
|
247
|
+
if (permissionList && permissionList.length > 0) {
|
|
248
|
+
const permission = {
|
|
249
|
+
pid: item.pid,
|
|
250
|
+
appId: item.meta ? item.meta.appId : item.appId
|
|
251
|
+
}
|
|
252
|
+
const rootPermission = getRootPermission(permissionList, permission);
|
|
253
|
+
if (rootPermission && rootPermission.permissionId) {
|
|
254
|
+
appIdInner = rootPermission.permissionId
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
if (appIdInner != this.appId) {
|
|
259
|
+
let appInfo = this.navList.filter(app => app.appId === appIdInner);
|
|
260
|
+
if (appInfo && appInfo.length > 0) {
|
|
261
|
+
Bus.$emit('change-app', {appId: appInfo[0].appId, appInfo: appInfo[0]})
|
|
262
|
+
} else {
|
|
263
|
+
Bus.$emit('change-app', {appId: appIdInner, appInfo: null})
|
|
264
|
+
}
|
|
244
265
|
}
|
|
245
266
|
}
|
|
246
267
|
this.value = item.name
|
package/src/index.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<i-layout class="pro-layout" :class="layoutClass">
|
|
3
3
|
<i-header class="pro-layout-header" :style="systemInfo.headBackground ? headBackgroundStyle : ''">
|
|
4
|
-
<LamboProLayoutHeader :hide-menu-logo="isHideLeftMenu">
|
|
4
|
+
<LamboProLayoutHeader :hide-menu-logo="isHideLeftMenu" ref="header">
|
|
5
5
|
<template slot = "pro-layout-trigger">
|
|
6
6
|
<slot name="pro-layout-trigger"></slot>
|
|
7
7
|
</template>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<i-content class="pro-layout-content">
|
|
43
43
|
<i-layout class="pro-layout-content-layout">
|
|
44
44
|
<div class="pro-layout-tabs" v-show="isHideLeftMenu">
|
|
45
|
-
<LamboProLayoutTabs></LamboProLayoutTabs>
|
|
45
|
+
<LamboProLayoutTabs :not-single-app="notSingleApp"></LamboProLayoutTabs>
|
|
46
46
|
</div>
|
|
47
47
|
<i-content class="pro-layout-page">
|
|
48
48
|
<slot>
|
|
@@ -76,6 +76,10 @@ import Locale from '@lambo-design/core/src/mixins/locale';
|
|
|
76
76
|
export default {
|
|
77
77
|
mixins: [Locale],
|
|
78
78
|
props:{
|
|
79
|
+
notSingleApp: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: true
|
|
82
|
+
},
|
|
79
83
|
showLeftMenu: {
|
|
80
84
|
type: Boolean,
|
|
81
85
|
default: null
|