@lambo-design/pro-layout 1.0.0-beta.461 → 1.0.0-beta.462
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 +1 -1
- package/src/components/pro-layout-header/index.vue +9 -5
- package/src/components/pro-layout-header/pro-layout-logo/index.vue +2 -2
- package/src/components/pro-layout-header/pro-layout-nav/components/pro-layout-nav-slide-menu.vue +4 -4
- package/src/components/pro-layout-header/pro-layout-nav/index-slide.vue +2 -2
- package/src/components/pro-layout-header/pro-layout-nav/index.vue +4 -4
- package/src/components/pro-layout-header/pro-layout-trigger/index.vue +2 -2
- package/src/index.vue +10 -20
package/package.json
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
<div class="pro-layout-header-wrapper">
|
|
3
3
|
<div class="trigger-box" :style="menuScalingStyle">
|
|
4
4
|
<slot name="pro-layout-trigger">
|
|
5
|
-
<LamboProTrigger v-if="systemInfo.menuScaling === '1'" :menu-scaling-status="systemInfo.menuScalingStatus" :
|
|
5
|
+
<LamboProTrigger v-if="systemInfo.menuScaling === '1'" :menu-scaling-status="systemInfo.menuScalingStatus" :is-show="!isHome && isShowLeftMenu"></LamboProTrigger>
|
|
6
6
|
</slot>
|
|
7
7
|
</div>
|
|
8
8
|
<div class="logo-box">
|
|
9
9
|
<slot name="pro-layout-logo">
|
|
10
|
-
<LamboProLogo :
|
|
10
|
+
<LamboProLogo :is-home="isHome"></LamboProLogo>
|
|
11
11
|
</slot>
|
|
12
12
|
</div>
|
|
13
13
|
<div class="nav-box" v-show="!systemInfo || !systemInfo.navType || systemInfo.navType == 'dropdown'">
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<LamboProNav
|
|
16
16
|
ref="nav"
|
|
17
17
|
:available-width="availableWidth"
|
|
18
|
-
:
|
|
18
|
+
:is-home="isHome"
|
|
19
19
|
></LamboProNav>
|
|
20
20
|
</slot>
|
|
21
21
|
</div>
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<LamboProNavSilde
|
|
42
42
|
ref="sildeNav"
|
|
43
43
|
:available-width="availableWidth"
|
|
44
|
-
:
|
|
44
|
+
:is-home="isHome"
|
|
45
45
|
@width-change="handleSlideWidthChange"
|
|
46
46
|
></LamboProNavSilde>
|
|
47
47
|
</div>
|
|
@@ -64,7 +64,11 @@ export default {
|
|
|
64
64
|
type: String,
|
|
65
65
|
default:''
|
|
66
66
|
},
|
|
67
|
-
|
|
67
|
+
isHome: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default:true
|
|
70
|
+
},
|
|
71
|
+
isShowLeftMenu: {
|
|
68
72
|
type: Boolean,
|
|
69
73
|
default:true
|
|
70
74
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<Col>
|
|
11
11
|
<div class="system-name" :style="nameStyle">{{systemName}}</div>
|
|
12
12
|
</Col>
|
|
13
|
-
<Col v-if="'1' === systemInfo.backToHome && 'button' === systemInfo.backToHomeStyle &&
|
|
13
|
+
<Col v-if="'1' === systemInfo.backToHome && 'button' === systemInfo.backToHomeStyle && !isHome">
|
|
14
14
|
<Button class="home-btn" shape="circle" icon="ios-home">{{ systemInfo.backToHomeText || '返回工作台' }}</Button>
|
|
15
15
|
</Col>
|
|
16
16
|
</Row>
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
type: String,
|
|
30
30
|
default: ''
|
|
31
31
|
},
|
|
32
|
-
|
|
32
|
+
isHome: {
|
|
33
33
|
type: Boolean,
|
|
34
34
|
default: true
|
|
35
35
|
}
|
package/src/components/pro-layout-header/pro-layout-nav/components/pro-layout-nav-slide-menu.vue
CHANGED
|
@@ -36,7 +36,7 @@ export default {
|
|
|
36
36
|
type: Number,
|
|
37
37
|
default: 800
|
|
38
38
|
},
|
|
39
|
-
|
|
39
|
+
isHome: {
|
|
40
40
|
type: Boolean,
|
|
41
41
|
default: true
|
|
42
42
|
}
|
|
@@ -84,7 +84,7 @@ export default {
|
|
|
84
84
|
this.layoutSize = data.layoutSize ? data.layoutSize : 'default';
|
|
85
85
|
this.topMenuNum = Number.isInteger(data.topMenu) ? data.topMenu : 4;
|
|
86
86
|
this.acceptAppId = data.acceptAppId ? data.acceptAppId : '';
|
|
87
|
-
if (!this.activeName && this.
|
|
87
|
+
if (!this.activeName && !this.isHome) {
|
|
88
88
|
this.activeName = this.acceptAppId
|
|
89
89
|
}
|
|
90
90
|
this.initNav(this.navList)
|
|
@@ -130,7 +130,7 @@ export default {
|
|
|
130
130
|
if (this.activeName) {
|
|
131
131
|
appId = this.activeName
|
|
132
132
|
}
|
|
133
|
-
if (this.
|
|
133
|
+
if (!this.isHome) {
|
|
134
134
|
this.selectApp(appId)
|
|
135
135
|
} else if (this.systemInfo.backToHome === "1" && this.systemInfo.backToHomeStyle === "app") {
|
|
136
136
|
this.activeName = 'backHome'
|
|
@@ -270,7 +270,7 @@ export default {
|
|
|
270
270
|
},
|
|
271
271
|
getIsActive(item) {
|
|
272
272
|
// 如果不是首页模式,直接比较 appId
|
|
273
|
-
if (this.
|
|
273
|
+
if (!this.isHome) {
|
|
274
274
|
return this.activeName === item.appId;
|
|
275
275
|
}
|
|
276
276
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="pro-layout-nav-slide-wrapper" ref="slideWrapper">
|
|
3
3
|
<div class="nav-box-slide" ref="navBox" :style="{ width: availableWidth + 'px' }">
|
|
4
4
|
<LamboProNavSlideMenu
|
|
5
|
-
:
|
|
5
|
+
:is-home="isHome"
|
|
6
6
|
:accept-int="pointer"
|
|
7
7
|
:available-width="availableWidth"
|
|
8
8
|
@topMen-list="handleCustomEvent"
|
|
@@ -48,7 +48,7 @@ export default {
|
|
|
48
48
|
type: Boolean,
|
|
49
49
|
default: true
|
|
50
50
|
},
|
|
51
|
-
|
|
51
|
+
isHome: {
|
|
52
52
|
type: Boolean,
|
|
53
53
|
default: true
|
|
54
54
|
}
|
|
@@ -72,7 +72,7 @@ export default {
|
|
|
72
72
|
type: Number,
|
|
73
73
|
default: 800
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
isHome: {
|
|
76
76
|
type: Boolean,
|
|
77
77
|
default: true
|
|
78
78
|
}
|
|
@@ -129,7 +129,7 @@ export default {
|
|
|
129
129
|
this.systemInfo = data;
|
|
130
130
|
this.topMenuNum = Number.isInteger(data.topMenu) ? data.topMenu : 4;
|
|
131
131
|
this.acceptAppId = data.acceptAppId ? data.acceptAppId : "";
|
|
132
|
-
if (!this.activeName && this.
|
|
132
|
+
if (!this.activeName && !this.isHome) {
|
|
133
133
|
this.activeName = this.acceptAppId;
|
|
134
134
|
}
|
|
135
135
|
this.initNav(this.navList);
|
|
@@ -220,7 +220,7 @@ export default {
|
|
|
220
220
|
if (this.activeName) {
|
|
221
221
|
appId = this.activeName;
|
|
222
222
|
}
|
|
223
|
-
if (this.
|
|
223
|
+
if (!this.isHome) {
|
|
224
224
|
this.selectApp(appId);
|
|
225
225
|
} else if (this.systemInfo.backToHome === "1" && this.systemInfo.backToHomeStyle === "app") {
|
|
226
226
|
this.activeName = 'backHome'
|
|
@@ -438,7 +438,7 @@ export default {
|
|
|
438
438
|
},
|
|
439
439
|
getActiveName() {
|
|
440
440
|
// 如果不是首页模式,直接返回 activeName
|
|
441
|
-
if (this.
|
|
441
|
+
if (!this.isHome) {
|
|
442
442
|
return this.activeName;
|
|
443
443
|
}
|
|
444
444
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<a @click="handleChange" type="text" :class="['sider-trigger-a', collapsed ? 'collapsed' : '']">
|
|
3
|
-
<Icon type="md-menu" size="26" v-show="
|
|
3
|
+
<Icon type="md-menu" size="26" v-show="isShow" />
|
|
4
4
|
</a>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ import Bus from '@lambo-design/shared/utils/bus'
|
|
|
9
9
|
export default {
|
|
10
10
|
name: "pro-layout-trigger",
|
|
11
11
|
props:{
|
|
12
|
-
|
|
12
|
+
isShow: {
|
|
13
13
|
type: Boolean,
|
|
14
14
|
default:true
|
|
15
15
|
},
|
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 :
|
|
4
|
+
<LamboProLayoutHeader :is-home="isHome" :is-show-left-menu="isShowLeftMenu" ref="header">
|
|
5
5
|
<template slot = "pro-layout-trigger">
|
|
6
6
|
<slot name="pro-layout-trigger"></slot>
|
|
7
7
|
</template>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</i-header>
|
|
25
25
|
<i-layout>
|
|
26
26
|
<i-sider
|
|
27
|
-
v-show="
|
|
27
|
+
v-show="isShowLeftMenu"
|
|
28
28
|
class="pro-layout-sider"
|
|
29
29
|
hide-trigger
|
|
30
30
|
collapsible
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
<LamboProLayoutSider ref="sider"></LamboProLayoutSider>
|
|
35
35
|
<!-- 拖拽条 -->
|
|
36
36
|
<div
|
|
37
|
-
v-show="
|
|
37
|
+
v-show="isShowLeftMenu"
|
|
38
38
|
class="sider-resize-bar"
|
|
39
39
|
@mousedown.stop.prevent="startResize"
|
|
40
40
|
></div>
|
|
41
41
|
</i-sider>
|
|
42
42
|
<i-content class="pro-layout-content">
|
|
43
43
|
<i-layout class="pro-layout-content-layout">
|
|
44
|
-
<div class="pro-layout-tabs" v-show="
|
|
44
|
+
<div class="pro-layout-tabs" v-show="isShowLeftMenu">
|
|
45
45
|
<LamboProLayoutTabs ref="tabs" :not-single-app="notSingleApp"></LamboProLayoutTabs>
|
|
46
46
|
</div>
|
|
47
47
|
<i-content class="pro-layout-page">
|
|
@@ -80,7 +80,7 @@ export default {
|
|
|
80
80
|
type: Boolean,
|
|
81
81
|
default: true
|
|
82
82
|
},
|
|
83
|
-
|
|
83
|
+
isHome: {
|
|
84
84
|
type: Boolean,
|
|
85
85
|
default: false
|
|
86
86
|
},
|
|
@@ -143,7 +143,7 @@ export default {
|
|
|
143
143
|
appId: '',
|
|
144
144
|
activeName: '',
|
|
145
145
|
tagList: [],
|
|
146
|
-
|
|
146
|
+
isShowLeftMenu: true,
|
|
147
147
|
siderWidth: 220,
|
|
148
148
|
isResizing: false,
|
|
149
149
|
minWidth: 180,
|
|
@@ -196,14 +196,6 @@ export default {
|
|
|
196
196
|
immediate: true,
|
|
197
197
|
deep: true
|
|
198
198
|
},
|
|
199
|
-
showLeftMenu: {
|
|
200
|
-
handler(val) {
|
|
201
|
-
if (val === false) {
|
|
202
|
-
this.isHideLeftMenu = val;
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
immediate: true
|
|
206
|
-
},
|
|
207
199
|
collapsed(val) {
|
|
208
200
|
if (val) {
|
|
209
201
|
this.siderWidth = 64
|
|
@@ -347,13 +339,11 @@ export default {
|
|
|
347
339
|
appConfig=JSON.parse(appInfo.setting)
|
|
348
340
|
}
|
|
349
341
|
|
|
350
|
-
// 优先使用 appConfig
|
|
342
|
+
// 优先使用 appConfig最后使用默认值
|
|
351
343
|
if (appConfig && appConfig.hasOwnProperty("is_hide_left_menu")){
|
|
352
|
-
this.
|
|
353
|
-
} else
|
|
354
|
-
this.
|
|
355
|
-
} else{
|
|
356
|
-
this.isHideLeftMenu = true
|
|
344
|
+
this.isShowLeftMenu = appConfig.is_hide_left_menu != '1'
|
|
345
|
+
} else {
|
|
346
|
+
this.isShowLeftMenu = true
|
|
357
347
|
}
|
|
358
348
|
|
|
359
349
|
this.appId = appId;
|