@lambo-design/pro-layout 1.0.0-beta.484 → 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.484",
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.394",
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,124 +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)
36
- })
37
- },
38
- destroyListener(){
39
- Bus.$off('system-info')
40
- Bus.$off('change-app')
41
- },
42
- initSystemInfo(data){
43
- this.systemInfo = deepCopy(data)
44
- },
45
- initApp(data){
46
- if (data.isGroup){
47
- this.appInfo = data
48
- }else {
49
- let appInfo = sessionStorage.getItem("appInfo")
50
- this.appInfo = JSON.parse(appInfo)
51
- }
52
- },
53
-
54
- loadingCustomStyle(){
55
- let themeKey = localStorage.getItem("theme") ? localStorage.getItem("theme") : "default"
56
- let tabsHeight = getThemeVarByKey(themeKey,'--layout-tabs-height');
57
- if (tabsHeight) {
58
- this.tabsHeight = tabsHeight;
59
- }
60
- }
61
- },
62
- created(){
63
- this.initListener();
64
- this.loadingCustomStyle();
65
- },
66
- beforeDestroy(){
67
- this.destroyListener();
68
- }
69
- }
70
- </script>
71
-
72
- <style lang="less" scoped>
73
- @import "@lambo-design/core/src/styles/default.less";
74
- .app-fast-con{
75
- width: 100%;
76
- position: absolute;
77
- top: 0px;
78
- z-index: 1000;
79
- background: var(--body-background,@_body-background);
80
- border-bottom: 1px solid var(--border-color-split,@_border-color-split);
81
- .app-fast-con-side{
82
- width: 100%;
83
- .sideApp{
84
- width: 100%;
85
- padding: 3px 0 4px 0;
86
- transform: translateX(-14px);
87
- display: flex;
88
- align-items: center;
89
- /deep/.ivu-icon{
90
- height: 40px;
91
- line-height: 40px;
92
- font-weight: 400;
93
- }
94
- }
95
- .app-name{
96
- display: flex;
97
- align-items: center;
98
- //font-size: 14px;
99
- //width: 100%;
100
- //height: 40px;
101
- //font-weight: 400;
102
- //border: none;
103
- font-weight: bold; /* 关键字,等于 700 */
104
- padding-left: 37px;
105
- }
106
-
107
- }
108
- &.custom-tabs{
109
- .app-fast-con-side{
110
- .sideApp {
111
- height: 30px;
112
- /deep/.ivu-icon{
113
- height: 36px;
114
- line-height: 36px;
115
- }
116
- }
117
- /deep/.app-name{
118
- height: 36px;
119
- }
120
- }
121
- }
122
- }
123
-
124
- </style>
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 {