@lambo-design/pro-layout 1.0.0-beta.13 → 1.0.0-beta.14
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-logo.vue +20 -7
- package/src/index.vue +1 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="pro-layout-logo-wrapper">
|
|
3
|
-
<div class="logo"></div>
|
|
3
|
+
<div class="logo" :style="logoStyle"></div>
|
|
4
4
|
<div class="divider"></div>
|
|
5
5
|
<div class="system-name">{{systemName}}</div>
|
|
6
6
|
</div>
|
|
@@ -12,20 +12,34 @@ export default {
|
|
|
12
12
|
name: "pro-layout-logo",
|
|
13
13
|
data(){
|
|
14
14
|
return {
|
|
15
|
+
systemInfo: {},
|
|
15
16
|
systemName: '后台管理系统'
|
|
16
17
|
}
|
|
17
18
|
},
|
|
19
|
+
computed:{
|
|
20
|
+
logoStyle(){
|
|
21
|
+
if (this.systemInfo && this.systemInfo.systemLogo) {
|
|
22
|
+
return 'background: url("' + this.systemInfo.systemLogo + '") no-repeat;background-size: 100%;'
|
|
23
|
+
}
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
},
|
|
18
27
|
methods: {
|
|
19
28
|
initListener(){
|
|
20
|
-
Bus.$on('system-
|
|
21
|
-
this.
|
|
29
|
+
Bus.$on('system-info',(data)=>{
|
|
30
|
+
this.initSystem(data)
|
|
22
31
|
});
|
|
23
32
|
},
|
|
24
33
|
destroyListener(){
|
|
25
|
-
Bus.$off('system-
|
|
34
|
+
Bus.$off('system-info')
|
|
26
35
|
},
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
initSystem(data){
|
|
37
|
+
if (data) {
|
|
38
|
+
this.systemInfo = data;
|
|
39
|
+
if (data.systemName) {
|
|
40
|
+
this.systemName = data.systemName;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
29
43
|
}
|
|
30
44
|
},
|
|
31
45
|
created(){
|
|
@@ -47,7 +61,6 @@ export default {
|
|
|
47
61
|
background-size: 100%;
|
|
48
62
|
float: left;
|
|
49
63
|
margin-top: 8px;
|
|
50
|
-
border-bottom: 1px solid #000000;
|
|
51
64
|
}
|
|
52
65
|
.divider{
|
|
53
66
|
height: 33px;
|
package/src/index.vue
CHANGED
|
@@ -123,9 +123,7 @@ export default {
|
|
|
123
123
|
Bus.$off('tag-list')
|
|
124
124
|
},
|
|
125
125
|
initEmit(){
|
|
126
|
-
|
|
127
|
-
Bus.$emit('system-name-change',this.systemInfo.systemName)
|
|
128
|
-
}
|
|
126
|
+
Bus.$emit('system-info',this.systemInfo)
|
|
129
127
|
Bus.$emit('user-info',this.userInfo)
|
|
130
128
|
Bus.$emit('nav-list',this.navList)
|
|
131
129
|
Bus.$emit('menu-list',this.menuList)
|