diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index eee37869..8f675670 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -260,7 +260,7 @@
--> @@ -487,7 +487,7 @@ export default { }, }, changCollectStatus() { - return + return }, }, created() { @@ -522,7 +522,7 @@ export default { this.zhinengList = [] } console.log(res) - } catch (error) { + } catch (error) { console.error(error) } }, @@ -662,28 +662,28 @@ export default { async handleCollection(route) { console.log("route2",route) if(route.isCollect==0){ - try { + try { let param = { menuId:route.id } const res = await addMenuCollect(param) if (res.code === 200) { - this.$message.success('菜单收藏成功') + this.$message.success('菜单收藏成功') this.$nextTick(()=>{ this.changCollection(this.menuList,route.id,1) - }) + }) this.$forceUpdate() this.showMenuBox = false } else { - this.$message.error(res.msg || '菜单收藏失败') + this.$message.error(res.msg || '菜单收藏失败') this.changCollection(this.menuList,route.id,0) - } + } } catch (error) { this.$message.error('菜单收藏失败:' + (error.message || '未知错误')) console.error(error) } }else if(route.isCollect==1){ - try { + try { let param = { menuId:route.id } @@ -699,7 +699,7 @@ export default { } else { this.$message.error(res.msg || '取消收藏失败') this.changCollection(this.menuList,route.id,1) - } + } } catch (error) { this.$message.error('取消收藏失败:' + (error.message || '未知错误')) console.error(error) @@ -708,7 +708,7 @@ export default { }, changCollection(array,targetId,status){ for (let obj of array) { - if (obj.id === targetId) { + if (obj.id === targetId) { this.$set(obj,"isCollect",status) obj.isCollect=status; } @@ -744,7 +744,7 @@ export default { ::v-deep.el-drawer.rtl{ border-top-left-radius: 10px; border-bottom-left-radius: 10px; - } + } } .myCollect-box{ width: 100%;height: 100%;background: #FAFAFA;overflow-y: auto; @@ -755,7 +755,7 @@ export default { .myCollect-box-zhineng{ padding: 16px; margin-bottom: 10px; - background-color: #fff; + background-color: #fff; } .myCollect-box-zhineng-title{ font-size: 18px; @@ -888,7 +888,7 @@ export default { .right-menu-item { display: inline-block; - padding: 0 13px; + padding: 0 16px; height: 100%; font-size: 18px; color: #bfbfbf; /* 纯黑色,比#262626更黑 */ @@ -986,6 +986,8 @@ export default { display: flex; align-items: center; cursor: pointer; + margin: 5px 0; + height: 27px; // 移入效果 &:hover { diff --git a/src/views/EquipmentLedger/index.vue b/src/views/EquipmentLedger/index.vue index fceab3cf..e6fe9ccf 100644 --- a/src/views/EquipmentLedger/index.vue +++ b/src/views/EquipmentLedger/index.vue @@ -361,15 +361,15 @@