Commit 08445621 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化菜单栏消息提示

parent 5787a50e
...@@ -74,8 +74,9 @@ ...@@ -74,8 +74,9 @@
</a-menu> </a-menu>
</a-dropdown> </a-dropdown>
</div> </div>
<div class="line"></div> <div class="line" v-if="hasMessagePage"></div>
<a-popover <a-popover
v-if="hasMessagePage"
arrowPointAtCenter arrowPointAtCenter
trigger="click" trigger="click"
:overlayStyle="{ width: '300px' }" :overlayStyle="{ width: '300px' }"
...@@ -123,7 +124,14 @@ ...@@ -123,7 +124,14 @@
></MessageInfo> ></MessageInfo>
</div> </div>
<div class="message-footer">查看更多 ></div> <div
class="message-footer"
@click="
$router.push('/home/thePlatformIsSet/messageManage/messageList')
"
>
查看更多 >
</div>
</div> </div>
<a-badge :count="10" :overflow-count="999"> <a-badge :count="10" :overflow-count="999">
<i class="iconfont icon-notice cursor-pointer"></i> <i class="iconfont icon-notice cursor-pointer"></i>
...@@ -213,6 +221,22 @@ export default { ...@@ -213,6 +221,22 @@ export default {
let curParent = this.$route.matched[1]?.path; let curParent = this.$route.matched[1]?.path;
return this.homePage.includes(cur) || this.homePage.includes(curParent); return this.homePage.includes(cur) || this.homePage.includes(curParent);
}, },
hasMessagePage() {
let { menuList } = this.userData;
let platform = menuList.find(
(v) =>
v.name === "平台设置" ||
v.url === "/home/thePlatformIsSet/setPlatformes"
);
if (platform && platform.childList.length) {
let bol = platform.childList.some(
(v) => v.url === "/home/thePlatformIsSet/messageManage"
);
return bol;
} else {
return false;
}
},
}, },
created() { created() {
this.setMoment(); this.setMoment();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment