mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-27 13:08:13 +00:00
perf: 优化消息未读数
This commit is contained in:
parent
2aa687a40b
commit
5afed4b85e
@ -152,7 +152,9 @@ export default {
|
||||
},
|
||||
}).then(({data}) => {
|
||||
this.read_list = data;
|
||||
this.$refs.percent.updatePopper();
|
||||
this.$nextTick(() => {
|
||||
this.$refs.percent.updatePopper();
|
||||
})
|
||||
}).catch(() => {
|
||||
this.read_list = [];
|
||||
});
|
||||
|
||||
@ -90,8 +90,13 @@
|
||||
</div>
|
||||
</ScrollerY>
|
||||
<div class="messenger-menu">
|
||||
<Icon @click="tabActive='dialog'" :class="{active:tabActive==='dialog'}" type="ios-chatbubbles" />
|
||||
<Icon @click="tabActive='contacts'" :class="{active:tabActive==='contacts'}" type="md-person" />
|
||||
<div class="menu-icon">
|
||||
<Icon @click="tabActive='dialog'" :class="{active:tabActive==='dialog'}" type="ios-chatbubbles" />
|
||||
<Badge class="menu-num" :count="msgUnread('all')"/>
|
||||
</div>
|
||||
<div class="menu-icon">
|
||||
<Icon @click="tabActive='contacts'" :class="{active:tabActive==='contacts'}" type="md-person" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
35
resources/assets/sass/pages/page-messenger.scss
vendored
35
resources/assets/sass/pages/page-messenger.scss
vendored
@ -281,18 +281,31 @@
|
||||
height: 52px;
|
||||
flex-shrink: 0;
|
||||
border-top: 1px solid #f4f5f5;
|
||||
> i {
|
||||
cursor: pointer;
|
||||
font-size: 24px;
|
||||
margin: 0 24px;
|
||||
color: #aaaaaa;
|
||||
opacity: 0.9;
|
||||
&.active {
|
||||
opacity: 1;
|
||||
color: $primary-color;
|
||||
.menu-icon {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
.menu-num {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 50%;
|
||||
margin-left: 3px;
|
||||
transform: scale(0.8);
|
||||
}
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
> i {
|
||||
cursor: pointer;
|
||||
font-size: 24px;
|
||||
margin: 0 24px;
|
||||
color: #aaaaaa;
|
||||
opacity: 0.9;
|
||||
&.active {
|
||||
opacity: 1;
|
||||
color: $primary-color;
|
||||
}
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user