mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 03:03:41 +00:00
perf: 移动端聊天窗口返回按钮显示未读信息数
This commit is contained in:
parent
a6425c2859
commit
edd8988961
@ -9,6 +9,7 @@
|
|||||||
<div class="dialog-nav" :class="{completed:$A.dialogCompleted(dialogData)}">
|
<div class="dialog-nav" :class="{completed:$A.dialogCompleted(dialogData)}">
|
||||||
<div class="dialog-back" @click="goBack">
|
<div class="dialog-back" @click="goBack">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
|
<div v-if="msgUnreadOnly" class="back-num">{{msgUnreadOnly}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dialog-block">
|
<div class="dialog-block">
|
||||||
@ -289,7 +290,21 @@ export default {
|
|||||||
return ['multiple'];
|
return ['multiple'];
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
|
},
|
||||||
|
|
||||||
|
msgUnreadOnly() {
|
||||||
|
let num = 0;
|
||||||
|
this.cacheDialogs.some(dialog => {
|
||||||
|
num += $A.getDialogUnread(dialog);
|
||||||
|
})
|
||||||
|
if (num <= 0) {
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
if (num > 99) {
|
||||||
|
num = "99+"
|
||||||
|
}
|
||||||
|
return String(num);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@ -857,14 +857,32 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.dialog-back {
|
.dialog-back {
|
||||||
|
padding-right: 6px;
|
||||||
right: auto;
|
right: auto;
|
||||||
left: 0;
|
left: 0;
|
||||||
> i {
|
> i {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
}
|
}
|
||||||
|
.back-num {
|
||||||
|
font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 32px;
|
||||||
|
background: #e6ebf1;
|
||||||
|
color: $primary-title-color;
|
||||||
|
transform: translate(0, -50%);
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 12px;
|
||||||
|
min-width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
line-height: 24px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 6px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.dialog-block {
|
.dialog-block {
|
||||||
margin: 0 52px;
|
margin: 0 80px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
.dialog-avatar {
|
.dialog-avatar {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user