@lambo-design/pro-layout 1.0.0-beta.485 → 1.0.0-beta.486
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.486",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "lambo",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"registry": "https://registry.npmjs.org/"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@lambo-design/shared": "^1.0.0-beta.
|
|
13
|
+
"@lambo-design/shared": "^1.0.0-beta.395",
|
|
14
14
|
"@lambo-design/core": "^4.7.1-beta.184"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
@@ -1,119 +1,120 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="app-fast-con" :class="tabsHeight != 46 ? 'custom-tabs' : ''">
|
|
3
|
-
<div class="app-fast-con-side" >
|
|
4
|
-
<div class="sideApp">
|
|
5
|
-
<div class="app-name">
|
|
6
|
-
<Icon :type="appInfo.icon || 'ios-apps-outline'" size="16"/>
|
|
7
|
-
<span style="margin-left: 5px">
|
|
8
|
-
{{ appInfo.name}}
|
|
9
|
-
</span>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
<script>
|
|
16
|
-
import Bus from "@lambo-design/shared/utils/bus";
|
|
17
|
-
import {deepCopy} from "@lambo-design/shared/utils/assist";
|
|
18
|
-
import {getThemeVarByKey} from "@lambo-design/shared/utils/theme";
|
|
19
|
-
import {getAllElements} from "@lambo-design/shared/utils/platform"
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
name: "AppName",
|
|
23
|
-
data () {
|
|
24
|
-
return {
|
|
25
|
-
tabsHeight: 46,
|
|
26
|
-
appInfo:{}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
methods:{
|
|
30
|
-
initListener(){
|
|
31
|
-
Bus.$on('system-info',(data)=>{
|
|
32
|
-
this.initSystemInfo(data)
|
|
33
|
-
})
|
|
34
|
-
Bus.$on('change-app',(data)=>{
|
|
35
|
-
this.initApp(data.appInfo.appInfo)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Bus.$off('
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
let
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
this.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-fast-con" :class="tabsHeight != 46 ? 'custom-tabs' : ''">
|
|
3
|
+
<div class="app-fast-con-side" >
|
|
4
|
+
<div class="sideApp">
|
|
5
|
+
<div class="app-name">
|
|
6
|
+
<Icon :type="appInfo.icon && appInfo.icon !== 'icon' || 'ios-apps-outline'" size="16"/>
|
|
7
|
+
<span style="margin-left: 5px">
|
|
8
|
+
{{ appInfo.name}}
|
|
9
|
+
</span>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<script>
|
|
16
|
+
import Bus from "@lambo-design/shared/utils/bus";
|
|
17
|
+
import {deepCopy} from "@lambo-design/shared/utils/assist";
|
|
18
|
+
import {getThemeVarByKey} from "@lambo-design/shared/utils/theme";
|
|
19
|
+
import {getAllElements} from "@lambo-design/shared/utils/platform"
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: "AppName",
|
|
23
|
+
data () {
|
|
24
|
+
return {
|
|
25
|
+
tabsHeight: 46,
|
|
26
|
+
appInfo:{}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
methods:{
|
|
30
|
+
initListener(){
|
|
31
|
+
Bus.$on('system-info',(data)=>{
|
|
32
|
+
this.initSystemInfo(data)
|
|
33
|
+
})
|
|
34
|
+
Bus.$on('change-app',(data)=>{
|
|
35
|
+
//this.initApp(data.appInfo.appInfo)
|
|
36
|
+
this.initApp(data.appInfo)
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
destroyListener(){
|
|
40
|
+
Bus.$off('system-info')
|
|
41
|
+
Bus.$off('change-app')
|
|
42
|
+
},
|
|
43
|
+
initSystemInfo(data){
|
|
44
|
+
this.systemInfo = deepCopy(data)
|
|
45
|
+
},
|
|
46
|
+
initApp(data){
|
|
47
|
+
this.appInfo = data
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
loadingCustomStyle(){
|
|
51
|
+
let themeKey = localStorage.getItem("theme") ? localStorage.getItem("theme") : "default"
|
|
52
|
+
let tabsHeight = getThemeVarByKey(themeKey,'--layout-tabs-height');
|
|
53
|
+
if (tabsHeight) {
|
|
54
|
+
this.tabsHeight = tabsHeight;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
created(){
|
|
59
|
+
this.initListener();
|
|
60
|
+
this.loadingCustomStyle();
|
|
61
|
+
},
|
|
62
|
+
beforeDestroy(){
|
|
63
|
+
this.destroyListener();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style lang="less" scoped>
|
|
69
|
+
@import "@lambo-design/core/src/styles/default.less";
|
|
70
|
+
.app-fast-con{
|
|
71
|
+
width: 100%;
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 0px;
|
|
74
|
+
z-index: 1000;
|
|
75
|
+
background: var(--body-background,@_body-background);
|
|
76
|
+
border-bottom: 1px solid var(--border-color-split,@_border-color-split);
|
|
77
|
+
.app-fast-con-side{
|
|
78
|
+
width: 100%;
|
|
79
|
+
.sideApp{
|
|
80
|
+
width: 100%;
|
|
81
|
+
padding: 3px 0 4px 0;
|
|
82
|
+
transform: translateX(-14px);
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
/deep/.ivu-icon{
|
|
86
|
+
height: 40px;
|
|
87
|
+
line-height: 40px;
|
|
88
|
+
font-weight: 400;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
.app-name{
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
//font-size: 14px;
|
|
95
|
+
//width: 100%;
|
|
96
|
+
//height: 40px;
|
|
97
|
+
//font-weight: 400;
|
|
98
|
+
//border: none;
|
|
99
|
+
font-weight: bold; /* 关键字,等于 700 */
|
|
100
|
+
padding-left: 37px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
}
|
|
104
|
+
&.custom-tabs{
|
|
105
|
+
.app-fast-con-side{
|
|
106
|
+
.sideApp {
|
|
107
|
+
height: 30px;
|
|
108
|
+
/deep/.ivu-icon{
|
|
109
|
+
height: 36px;
|
|
110
|
+
line-height: 36px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/deep/.app-name{
|
|
114
|
+
height: 36px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
</style>
|
package/src/index.vue
CHANGED
|
@@ -322,7 +322,7 @@ export default {
|
|
|
322
322
|
},
|
|
323
323
|
initTags(){
|
|
324
324
|
// let tagList = getTagNavListFromLocalstorage(config.routerBase + '-tagNavList');
|
|
325
|
-
let tagList = getTagNavListFromSessionstorage(getTagNavListKey());
|
|
325
|
+
let tagList = getTagNavListFromSessionstorage(getTagNavListKey());
|
|
326
326
|
if (tagList.length == 0) {
|
|
327
327
|
tagList.push(this.homeRouter);
|
|
328
328
|
}
|
|
@@ -395,7 +395,7 @@ export default {
|
|
|
395
395
|
name = menu.name;
|
|
396
396
|
menuItem = deepCopy(menu);
|
|
397
397
|
// let tagList = getTagNavListFromLocalstorage(config.routerBase + '-tagNavList');
|
|
398
|
-
let tagList = getTagNavListFromSessionstorage(getTagNavListKey());
|
|
398
|
+
let tagList = getTagNavListFromSessionstorage(getTagNavListKey());
|
|
399
399
|
if (!tagExists(tagList,name)) {
|
|
400
400
|
tagList.push(menuItem);
|
|
401
401
|
} else {
|