mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-12 17:08:11 +00:00
no message
This commit is contained in:
parent
844cdd734e
commit
c5a0e04242
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -64,9 +64,11 @@
|
||||
@onScroll="onScroll"
|
||||
class="dialog-scroller overlay-y">
|
||||
<template #before>
|
||||
<div v-if="dialogData.hasMorePages" class="dialog-item history" @click="loadNextPage">{{$L('加载历史消息')}}</div>
|
||||
<div v-else-if="dialogData.loading > 0 && dialogMsgList.length === 0" class="dialog-item loading"><Loading/></div>
|
||||
<div v-else-if="dialogMsgList.length === 0" class="dialog-item nothing">{{$L('暂无消息')}}</div>
|
||||
<template v-if="allMsgs.length === 0">
|
||||
<div v-if="dialogData.loading > 0" class="dialog-item loading"><Loading/></div>
|
||||
<div v-else class="dialog-item nothing">{{$L('暂无消息')}}</div>
|
||||
</template>
|
||||
<div v-else-if="dialogData.hasMorePages" class="dialog-item history" @click="loadNextPage">{{$L('加载历史消息')}}</div>
|
||||
</template>
|
||||
<template v-slot="{ item, index, active }">
|
||||
<DynamicScrollerItem
|
||||
@ -89,7 +91,7 @@
|
||||
</DynamicScrollerItem>
|
||||
</template>
|
||||
</DynamicScroller>
|
||||
<div :class="['dialog-footer', msgNew > 0 && dialogMsgList.length > 0 ? 'newmsg' : '']" @click="onActive">
|
||||
<div :class="['dialog-footer', msgNew > 0 && allMsgs.length > 0 ? 'newmsg' : '']" @click="onActive">
|
||||
<div class="dialog-newmsg" @click="onToBottom">{{$L('有' + msgNew + '条新消息')}}</div>
|
||||
<div class="dialog-input">
|
||||
<slot name="inputBefore"/>
|
||||
@ -335,11 +337,16 @@ export default {
|
||||
if (id) {
|
||||
this.msgNew = 0;
|
||||
this.topId = -1;
|
||||
if (this.dialogMsgList.length > 0) {
|
||||
setTimeout(this.onToBottom, 10);
|
||||
let cacheTimer = null;
|
||||
if (this.allMsgList.length > 0) {
|
||||
cacheTimer = setTimeout(_ => {
|
||||
this.allMsgs = this.allMsgList;
|
||||
this.onToBottom();
|
||||
}, 1);
|
||||
}
|
||||
const startTime = new Date().getTime();
|
||||
this.$store.dispatch("getDialogMsgs", id).then(_ => {
|
||||
cacheTimer && clearTimeout(cacheTimer);
|
||||
setTimeout(this.onToBottom, Math.max(0, 100 - (new Date().getTime() - startTime)));
|
||||
}).catch(_ => {});
|
||||
}
|
||||
|
||||
@ -27,7 +27,10 @@
|
||||
<div class="percent-info" @click.stop="modalPercent(item)">{{item.task_my_complete}}<em>/{{item.task_my_num}}</em></div>
|
||||
</div>
|
||||
<div class="project-footer">
|
||||
<div class="footer-percent" @click.stop="modalPercent(item)">{{item.task_complete}}<em>/{{item.task_num}}</em></div>
|
||||
<div class="footer-percent" @click.stop="modalPercent(item)">
|
||||
<i class="taskfont"></i>
|
||||
{{item.task_complete}}<em>/{{item.task_num}}</em>
|
||||
</div>
|
||||
<div class="footer-user">
|
||||
<UserAvatar v-for="(uid, ukey) in item.user_simple" :key="ukey" :userid="uid" :size="26" :borderWitdh="2"/>
|
||||
<div v-if="item.user_count > 3" class="footer-user-more">{{item.user_count > 99 ? '99+' : `${item.user_count}+`}}</div>
|
||||
|
||||
@ -105,6 +105,12 @@
|
||||
margin-right: 12px;
|
||||
min-width: 28px;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.taskfont {
|
||||
font-size: 14px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
> em {
|
||||
opacity: 0.7;
|
||||
font-style: normal;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user