@lambo-design/pro-layout 1.0.0-beta.137 → 1.0.0-beta.139

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.vue +10 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/pro-layout",
3
- "version": "1.0.0-beta.137",
3
+ "version": "1.0.0-beta.139",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {},
package/src/index.vue CHANGED
@@ -155,9 +155,17 @@ export default {
155
155
  Bus.$off('tag-list')
156
156
  },
157
157
  initEmit(){
158
+ //在这里改this.menuList
158
159
  Bus.$emit('system-info',this.systemInfo)
159
160
  Bus.$emit('user-info',this.userInfo)
160
161
  Bus.$emit('nav-list',this.navList)
162
+ this.menuList = this.menuList.map(item => {
163
+ // 如果 uri 不以 '/' 开头,添加 '/'
164
+ if (!item.uri.startsWith('/')) {
165
+ item.uri = '/' + item.uri;
166
+ }
167
+ return item;
168
+ });
161
169
  Bus.$emit('menu-list',this.menuList)
162
170
  },
163
171
  initTags(){
@@ -170,7 +178,6 @@ export default {
170
178
  if (!activeName) {
171
179
  activeName = tagList[0].name;
172
180
  }
173
- console.log('initTagList:',this.tagList)
174
181
  Bus.$emit('tag-list', this.tagList, activeName)
175
182
  },
176
183
  triggerChange(data){
@@ -187,13 +194,13 @@ export default {
187
194
  this.$emit('user-action',name)
188
195
  },
189
196
  menuClick(name, item){
197
+
190
198
  if (!item) {
191
199
  let res = this.menuList.filter(item => item.name == name);
192
200
  if (res && res.length > 0) {
193
201
  item = res[0];
194
202
  }
195
203
  }
196
- console.log('item:',item)
197
204
  sessionStorage.setItem('activeName',name);
198
205
  this.$emit('menu-click', name, item)
199
206
  },
@@ -225,7 +232,7 @@ export default {
225
232
  tagList = deepCopy(res);
226
233
  }
227
234
  }
228
- console.log('tagList:',tagList)
235
+
229
236
  Bus.$emit('tag-list', tagList, name)
230
237
  }
231
238
  }