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