@lambo-design/pro-layout 1.0.0-beta.213 → 1.0.0-beta.215

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.213",
3
+ "version": "1.0.0-beta.215",
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/shared": "^1.0.0-beta.115",
14
- "@lambo-design/core": "^4.7.1-beta.118"
13
+ "@lambo-design/core": "^4.7.1-beta.118",
14
+ "@lambo-design/shared": "^1.0.0-beta.115"
15
15
  },
16
16
  "scripts": {}
17
17
  }
@@ -79,6 +79,7 @@ export default {
79
79
  this.otherList = navList
80
80
  } else {
81
81
  this.topMenList = this.navList
82
+ this.otherList = []
82
83
  }
83
84
  if (this.topMenList.length > 0) {
84
85
  let appId = this.topMenList[0].appId
@@ -113,7 +113,7 @@ export default {
113
113
  },
114
114
  handleClick(item) {
115
115
  this.drawer.model = false
116
- this.$emit('menu-click', item.name)
116
+ this.$emit('select-menu', item.name, item)
117
117
  },
118
118
  handleHistoryDelete(item) {
119
119
  Bus.$emit('delete-history-menu',item)
@@ -89,7 +89,7 @@ export default {
89
89
  });
90
90
  },
91
91
  handleSelect(item){
92
- this.$emit('on-select', item.name,item.uri,item.pid)
92
+ this.$emit('select-menu', item.name,item)
93
93
  this.searchSideModal = false
94
94
  },
95
95
  handleInput() {
@@ -32,12 +32,12 @@
32
32
  </template>
33
33
  </Menu>
34
34
 
35
- <ProLayoutOtherMenu :collapsed="collapsed" @menu-click="handleSelect"></ProLayoutOtherMenu>
35
+ <ProLayoutOtherMenu :collapsed="collapsed" @select-menu="selectMenu"></ProLayoutOtherMenu>
36
36
  <ProLayoutSiderSearch
37
37
  v-show="!collapsed"
38
38
  style="margin-right: 35px; margin-left: 1px; padding-top: 1px"
39
39
  :searchType="0"
40
- @on-select="handleSelect"
40
+ @select-menu="selectMenu"
41
41
  ></ProLayoutSiderSearch>
42
42
  <div v-show="collapsed" :list="menuList" class="menu-collapsed" >
43
43
  <template v-for="item in menuList">
@@ -175,9 +175,6 @@ export default {
175
175
  this.isCollected[menu.name] = true
176
176
  })
177
177
  },
178
- selectHandle(name){
179
- this.$emit('on-select', name)
180
- },
181
178
  changeApp(appId,appInfo){
182
179
  this.appId = appId;
183
180
  this.changeMenu()
@@ -191,6 +188,24 @@ export default {
191
188
  }
192
189
  this.openedNames = this.getOpenedNamesByActiveName();
193
190
  },
191
+ selectMenu(name,menu) {
192
+ console.log("name=",name)
193
+ if (!menu) {
194
+ let res = this.originMenuList.filter(item => item.name == name)
195
+ if (res && res.length > 0) {
196
+ menu = res[0];
197
+ }
198
+ }
199
+ console.log("menu=",menu)
200
+ if (menu.appId && menu.appId != this.appId) {
201
+ let appInfo = this.navList.filter(app => app.appId === menu.appId);
202
+ console.log("appInfo=",appInfo)
203
+ Bus.$emit('change-app', {appId:menu.appId,appInfo:appInfo[0]})
204
+ }
205
+ setTimeout(()=>{
206
+ this.handleSelect(name)
207
+ },100)
208
+ },
194
209
  handleSelect(name,uri,pid){
195
210
  let menu = null;
196
211
  if (name.indexOf("isTurnByHref_") > -1) {