@lambo-design/pro-layout 1.0.0-beta.480 → 1.0.0-beta.482

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.480",
3
+ "version": "1.0.0-beta.482",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -10,8 +10,8 @@
10
10
  "registry": "https://registry.npmjs.org/"
11
11
  },
12
12
  "devDependencies": {
13
- "@lambo-design/core": "^4.7.1-beta.184",
14
- "@lambo-design/shared": "^1.0.0-beta.391"
13
+ "@lambo-design/shared": "^1.0.0-beta.394",
14
+ "@lambo-design/core": "^4.7.1-beta.184"
15
15
  },
16
16
  "scripts": {
17
17
  "release-pro-layout": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
@@ -0,0 +1,123 @@
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>
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
+ border-bottom: 1px solid var(--border-color-split,@_border-color-split);
80
+ .app-fast-con-side{
81
+ width: 100%;
82
+ .sideApp{
83
+ width: 100%;
84
+ padding: 3px 0 4px 0;
85
+ transform: translateX(-14px);
86
+ display: flex;
87
+ align-items: center;
88
+ /deep/.ivu-icon{
89
+ height: 40px;
90
+ line-height: 40px;
91
+ font-weight: 400;
92
+ }
93
+ }
94
+ .app-name{
95
+ display: flex;
96
+ align-items: center;
97
+ //font-size: 14px;
98
+ //width: 100%;
99
+ //height: 40px;
100
+ //font-weight: 400;
101
+ //border: none;
102
+ font-weight: bold; /* 关键字,等于 700 */
103
+ padding-left: 37px;
104
+ }
105
+
106
+ }
107
+ &.custom-tabs{
108
+ .app-fast-con-side{
109
+ .sideApp {
110
+ height: 30px;
111
+ /deep/.ivu-icon{
112
+ height: 36px;
113
+ line-height: 36px;
114
+ }
115
+ }
116
+ /deep/.app-name{
117
+ height: 36px;
118
+ }
119
+ }
120
+ }
121
+ }
122
+
123
+ </style>
@@ -67,10 +67,15 @@
67
67
  <ProLayoutSiderOtherMenu v-show="systemInfo.showHistoryAndCollect !== '0'" :style="systemInfo.menuScaling === '0' ? { width: otherWidth } : {}" :collapsed="collapsed" @select-menu="selectMenu"></ProLayoutSiderOtherMenu>
68
68
  <ProLayoutSiderSearch
69
69
  :style="systemInfo.menuScaling === '0' ? { width: otherWidth } : {}"
70
- v-show="!collapsed && (systemInfo.showSearchMenu !== '0')"
70
+ v-show="!collapsed && (systemInfo.showSearchMenu !== '0') && mainType !== 'singleAppDrop'"
71
71
  :searchType="0"
72
72
  @select-menu="selectMenu"
73
73
  ></ProLayoutSiderSearch>
74
+ <ProLayoutSiderAppName
75
+ :style="systemInfo.menuScaling === '0' ? { width: otherWidth } : {}"
76
+ v-show="!collapsed && mainType === 'singleAppDrop'"
77
+ >
78
+ </ProLayoutSiderAppName>
74
79
  <div v-show="collapsed" :list="menuList" class="menu-collapsed" >
75
80
  <template v-for="item in menuList">
76
81
  <ProLayoutSiderCollapsedMenu v-if="item.children && item.children.length > 0" :key="`drop-menu-${item.name}`"
@@ -104,6 +109,8 @@ import ProLayoutSiderOtherMenu from "./components/pro-layout-sider-other-menu";
104
109
  import ProLayoutSiderSearch from "./components/pro-layout-sider-search";
105
110
  import ProLayoutSiderMenuItem from './components/pro-layout-sider-menu-item'
106
111
  import ProLayoutSiderCollapsedMenu from './components/pro-layout-sider-collapsed-menu'
112
+ import ProLayoutSiderAppName from './components/pro-layout-sider-app-name'
113
+
107
114
  import {
108
115
  filterMenuName, filterMenuUri, tagExists,
109
116
  isOpenBlank, buildSinglePermission, arraysEqual, addOttCode
@@ -117,7 +124,8 @@ export default {
117
124
  ProLayoutSiderMenuItem,
118
125
  ProLayoutSiderCollapsedMenu,
119
126
  ProLayoutSiderOtherMenu,
120
- ProLayoutSiderSearch
127
+ ProLayoutSiderSearch,
128
+ ProLayoutSiderAppName
121
129
  },
122
130
  props:{
123
131
  serverContext: {
@@ -127,6 +135,7 @@ export default {
127
135
  },
128
136
  data(){
129
137
  return {
138
+ mainType:config.mainType,
130
139
  show: false,
131
140
  otherWidth:'',
132
141
  originalAllMenuList: [],
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 {