@lambo-design/pro-layout 1.0.0-beta.485 → 1.0.0-beta.487

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