@lambo-design/pro-layout 1.0.0-beta.286 → 1.0.0-beta.287

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.286",
3
+ "version": "1.0.0-beta.287",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -98,15 +98,20 @@ export default {
98
98
  this.originMenuList = deepCopy(data)
99
99
  },
100
100
  selectApp(appId) {
101
- this.activeName = appId
102
- let res = this.navList.filter(app => app.appId == appId)
103
- Bus.$emit('change-app', { appId, appInfo: res[0] })
101
+ if (appId) {
102
+ let res = this.navList.filter(app => app.appId == appId)
103
+ if (res && res.length > 0) {
104
+ Bus.$emit('change-app', { appId, appInfo: res[0] })
105
+ }
106
+ }
104
107
  },
105
108
  changeApp(appId, appInfo) {
106
- this.activeName = appId
107
- this.$nextTick(() => {
108
- this.$refs.topNav.updateActiveName()
109
- })
109
+ if (appId) {
110
+ this.activeName = appId
111
+ this.$nextTick(() => {
112
+ this.$refs.topNav.updateActiveName()
113
+ })
114
+ }
110
115
  }
111
116
  },
112
117
  watch: {
@@ -204,8 +204,6 @@ export default {
204
204
  this.emitTags(res, value);
205
205
  },
206
206
  handleClick(item) {
207
- this.value = item.name
208
- Bus.$emit('menu-click', item.name , item)
209
207
  if (item.meta && item.meta.appId
210
208
  && item.meta.appId != this.appId
211
209
  && item.meta.appId != config.homeRouter.meta.appId) {
@@ -216,6 +214,8 @@ export default {
216
214
  Bus.$emit('change-app', {appId:item.meta.appId,appInfo:null})
217
215
  }
218
216
  }
217
+ this.value = item.name
218
+ Bus.$emit('menu-click', item.name , item);
219
219
  },
220
220
  showTitleInside(item) {
221
221
  return showTitle(item, this)