Skip to content

Commit b895bba

Browse files
author
张晨曦
committed
fixbugs 菜单栏钉一钉功能
1 parent 1840b7a commit b895bba

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

web/package-lock.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"svgo": "1.3.0",
6161
"vue": "2.6.12",
6262
"vue-i18n": "8.22.1",
63-
"vue-luban-menu": "file:vue-luban-menu-1.3.2.tgz",
63+
"vue-luban-menu": "^1.4.0",
6464
"vue-router": "3.4.8",
6565
"vuedraggable": "2.24.3",
6666
"vuescroll": "4.16.1",

web/src/dss/module/header/index.vue

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,18 +347,26 @@ export default {
347347
getWorkspaceFavorites() {
348348
if (this.$route.query.workspaceId) {
349349
GetFavorites(this.$route.query.workspaceId).then((data) => {
350-
this.favorites = data.favorites || [];
350+
this.favorites = (data.favorites || []).map(item => {
351+
return {
352+
...item,
353+
id: item.menuApplicationId
354+
}
355+
});
351356
});
352357
}
353358
},
354359
getWorkspaceCollections() {
355360
if (this.$route.query.workspaceId) {
356361
GetCollections(this.$route.query.workspaceId).then(data => {
357362
let collections = data.favorites || [];
358-
collections.forEach(item => {
359-
item['collectedId'] = item.menuApplicationId
363+
this.collections = collections.map(item => {
364+
return {
365+
...item,
366+
id: item.menuApplicationId,
367+
collectedId: item.menuApplicationId
368+
}
360369
})
361-
this.collections = collections || [];
362370
})
363371
}
364372
},
@@ -369,7 +377,7 @@ export default {
369377
}).then((data) => {
370378
this.favorites = this.favorites.concat({
371379
...app,
372-
id: data.favoriteId,
380+
id: app.id,
373381
menuApplicationId: app.id,
374382
});
375383
});

0 commit comments

Comments
 (0)