@lambo-design/pro-layout 1.0.0-beta.428 → 1.0.0-beta.429

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.428",
3
+ "version": "1.0.0-beta.429",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -7,18 +7,19 @@
7
7
  </div>
8
8
  <div class="logo-box">
9
9
  <slot name="pro-layout-logo">
10
- <LamboProLogo></LamboProLogo>
10
+ <LamboProLogo :show-back-to-home="hideMenuLogo"></LamboProLogo>
11
11
  </slot>
12
12
  </div>
13
13
  <div class="nav-box" v-show="!systemInfo || !systemInfo.navType || systemInfo.navType == 'dropdown'">
14
14
  <slot name="pro-layout-nav">
15
15
  <LamboProNav
16
16
  :available-width="availableWidth"
17
+ :not-home-index="hideMenuLogo"
17
18
  ></LamboProNav>
18
19
  </slot>
19
20
  </div>
20
21
  <div class="tools-box">
21
- <LamboProTools>
22
+ <LamboProTools :show-tools-quick-icons="hideMenuLogo">
22
23
  <template slot = "pro-layout-icons">
23
24
  <slot name="pro-layout-icons"></slot>
24
25
  </template>
@@ -38,6 +39,7 @@
38
39
  <div class="nav-slide-container" v-show="systemInfo && systemInfo.navType && systemInfo.navType == 'slide'" ref="slideContainer">
39
40
  <LamboProNavSilde
40
41
  :available-width="availableWidth"
42
+ :not-home-index="hideMenuLogo"
41
43
  @width-change="handleSlideWidthChange"
42
44
  ></LamboProNavSilde>
43
45
  </div>
@@ -10,7 +10,7 @@
10
10
  <Col>
11
11
  <div class="system-name" :style="nameStyle">{{systemName}}</div>
12
12
  </Col>
13
- <Col v-if="'1' === systemInfo.backToHome && 'button' === systemInfo.backToHomeStyle">
13
+ <Col v-if="'1' === systemInfo.backToHome && 'button' === systemInfo.backToHomeStyle && showBackToHome">
14
14
  <Button class="home-btn" shape="circle" icon="ios-home">{{ systemInfo.backToHomeText || '返回工作台' }}</Button>
15
15
  </Col>
16
16
  </Row>
@@ -25,8 +25,14 @@ export default {
25
25
  name: "pro-layout-logo",
26
26
  mixins: [Locale],
27
27
  props:{
28
- routeName:String,
29
- default:''
28
+ routeName: {
29
+ type: String,
30
+ default: ''
31
+ },
32
+ showBackToHome: {
33
+ type: Boolean,
34
+ default: true
35
+ }
30
36
  },
31
37
  data(){
32
38
  return {
@@ -33,6 +33,10 @@ export default {
33
33
  availableWidth: {
34
34
  type: Number,
35
35
  default: 800
36
+ },
37
+ notHomeIndex: {
38
+ type: Boolean,
39
+ default: true
36
40
  }
37
41
  },
38
42
  data() {
@@ -107,7 +111,9 @@ export default {
107
111
  if (this.activeName) {
108
112
  appId = this.activeName
109
113
  }
110
- this.selectApp(appId)
114
+ if (this.notHomeIndex) {
115
+ this.selectApp(appId)
116
+ }
111
117
  }
112
118
  },
113
119
  // 计算可以显示的菜单数量
@@ -2,6 +2,7 @@
2
2
  <div class="pro-layout-nav-slide-wrapper" ref="slideWrapper">
3
3
  <div class="nav-box-slide" ref="navBox" :style="{ width: availableWidth + 'px' }">
4
4
  <LamboProNavSlideMenu
5
+ :not-home-index="notHomeIndex"
5
6
  :accept-int="pointer"
6
7
  :available-width="availableWidth"
7
8
  @topMen-list="handleCustomEvent"
@@ -45,6 +46,10 @@ export default {
45
46
  autoCalculateWidth: {
46
47
  type: Boolean,
47
48
  default: true
49
+ },
50
+ notHomeIndex: {
51
+ type: Boolean,
52
+ default: true
48
53
  }
49
54
  },
50
55
  data(){
@@ -4,7 +4,7 @@
4
4
  ref="topNav"
5
5
  mode="horizontal"
6
6
  theme="dark"
7
- :active-name="activeName"
7
+ :active-name="notHomeIndex ? activeName : 'backHome'"
8
8
  @on-select="selectApp"
9
9
  >
10
10
  <template v-for="item in topMenList">
@@ -70,6 +70,10 @@ export default {
70
70
  availableWidth: {
71
71
  type: Number,
72
72
  default: 800
73
+ },
74
+ notHomeIndex: {
75
+ type: Boolean,
76
+ default: true
73
77
  }
74
78
  },
75
79
  data() {
@@ -124,7 +128,7 @@ export default {
124
128
  this.systemInfo = data;
125
129
  this.topMenuNum = Number.isInteger(data.topMenu) ? data.topMenu : 4;
126
130
  this.acceptAppId = data.acceptAppId ? data.acceptAppId : "";
127
- if (!this.activeName) {
131
+ if (!this.activeName && this.notHomeIndex) {
128
132
  this.activeName = this.acceptAppId;
129
133
  }
130
134
  this.initNav(this.navList);
@@ -215,7 +219,11 @@ export default {
215
219
  if (this.activeName) {
216
220
  appId = this.activeName;
217
221
  }
218
- this.selectApp(appId);
222
+ if (this.notHomeIndex) {
223
+ this.selectApp(appId);
224
+ } else if (this.systemInfo.backToHome === "1" && this.systemInfo.backToHomeStyle === "app") {
225
+ this.activeName = 'backHome'
226
+ }
219
227
  }
220
228
  setTimeout(() => {
221
229
  this.calcTopMenus();
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="pro-layout-tools-wrapper">
3
3
  <slot name="pro-layout-icons">
4
- <LamboProLayoutToolsQuickIcons>
4
+ <LamboProLayoutToolsQuickIcons v-show="showToolsQuickIcons">
5
5
  <template slot="pro-layout-custom-icons">
6
6
  <slot name="pro-layout-custom-icons"></slot>
7
7
  </template>
@@ -21,7 +21,13 @@ export default {
21
21
  components: {
22
22
  LamboProLayoutToolsQuickIcons,
23
23
  LamboProLayoutToolsUser
24
- }
24
+ },
25
+ props: {
26
+ showToolsQuickIcons: {
27
+ type: Boolean,
28
+ default: true
29
+ }
30
+ },
25
31
  }
26
32
  </script>
27
33
 
package/src/index.vue CHANGED
@@ -76,6 +76,10 @@ import Locale from '@lambo-design/core/src/mixins/locale';
76
76
  export default {
77
77
  mixins: [Locale],
78
78
  props:{
79
+ showLeftMenu: {
80
+ type: Boolean,
81
+ default: null
82
+ },
79
83
  systemInfo: {
80
84
  type: Object,
81
85
  default: () => {
@@ -188,6 +192,14 @@ export default {
188
192
  immediate: true,
189
193
  deep: true
190
194
  },
195
+ showLeftMenu: {
196
+ handler(val) {
197
+ if (val !== null) {
198
+ this.isHideLeftMenu = val;
199
+ }
200
+ },
201
+ immediate: true
202
+ },
191
203
  collapsed(val) {
192
204
  if (val) {
193
205
  this.siderWidth = 64
@@ -329,7 +341,10 @@ export default {
329
341
  if(appInfo && appInfo.setting){
330
342
  appConfig=JSON.parse(appInfo.setting)
331
343
  }
332
- if(appConfig && appConfig.is_hide_left_menu){
344
+ // 优先使用传入的 showLeftMenu prop,其次使用 appConfig,最后使用默认值
345
+ if (this.showLeftMenu !== null) {
346
+ this.isHideLeftMenu = this.showLeftMenu;
347
+ } else if (appConfig && appConfig.is_hide_left_menu){
333
348
  this.isHideLeftMenu=appConfig.is_hide_left_menu!='1'
334
349
  }else{
335
350
  this.isHideLeftMenu=true
@@ -411,6 +426,7 @@ export default {
411
426
  if (savedWidth) {
412
427
  this.siderWidth = parseInt(savedWidth)
413
428
  }
429
+ this.initEmit();
414
430
  },
415
431
  created(){
416
432
  this.initListener();