mirror of
https://github.com/kuaifan/dootask.git
synced 2026-06-08 00:18:45 +00:00
perf: 角标最大显示999
This commit is contained in:
parent
1d5cf81d9e
commit
daa88a2cc2
@ -22,12 +22,12 @@
|
||||
<i class="taskfont" v-html="item.icon"></i>
|
||||
<div class="tabbar-title">{{$L(item.label)}}</div>
|
||||
<template v-if="item.name === 'dashboard'">
|
||||
<Badge v-if="dashboardTask.overdue_count > 0" class="tabbar-badge" type="error" :count="dashboardTask.overdue_count"/>
|
||||
<Badge v-else-if="dashboardTask.today_count > 0" class="tabbar-badge" type="info" :count="dashboardTask.today_count"/>
|
||||
<Badge v-else-if="dashboardTask.all_count > 0" class="tabbar-badge" type="primary" :count="dashboardTask.all_count"/>
|
||||
<Badge v-if="dashboardTask.overdue_count > 0" class="tabbar-badge" type="error" :overflow-count="999" :count="dashboardTask.overdue_count"/>
|
||||
<Badge v-else-if="dashboardTask.today_count > 0" class="tabbar-badge" type="info" :overflow-count="999" :count="dashboardTask.today_count"/>
|
||||
<Badge v-else-if="dashboardTask.all_count > 0" class="tabbar-badge" type="primary" :overflow-count="999" :count="dashboardTask.all_count"/>
|
||||
</template>
|
||||
<template v-else-if="item.name === 'dialog'">
|
||||
<Badge class="tabbar-badge" :text="msgUnreadMention"/>
|
||||
<Badge class="tabbar-badge" :overflow-count="999" :text="msgUnreadMention"/>
|
||||
</template>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<UserAvatar :userid="userId" :size="36" tooltipDisabled/>
|
||||
</div>
|
||||
<span>{{userInfo.nickname}}</span>
|
||||
<Badge v-if="reportUnreadNumber > 0" class="manage-box-top-report" :count="reportUnreadNumber"/>
|
||||
<Badge v-if="reportUnreadNumber > 0" class="manage-box-top-report" :overflow-count="999" :count="reportUnreadNumber"/>
|
||||
<Badge v-else-if="!!clientNewVersion" class="manage-box-top-report" dot/>
|
||||
<div class="manage-box-arrow">
|
||||
<Icon type="ios-arrow-up" />
|
||||
@ -57,7 +57,7 @@
|
||||
<DropdownItem :divided="!!item.divided">
|
||||
<div class="manage-menu-flex">
|
||||
{{$L(item.name)}}
|
||||
<Badge v-if="reportUnreadNumber > 0" class="manage-menu-report-badge" :count="reportUnreadNumber"/>
|
||||
<Badge v-if="reportUnreadNumber > 0" class="manage-menu-report-badge" :overflow-count="999" :count="reportUnreadNumber"/>
|
||||
<Icon v-else type="ios-arrow-forward"></Icon>
|
||||
</div>
|
||||
</DropdownItem>
|
||||
@ -66,7 +66,7 @@
|
||||
<DropdownItem name="workReport">
|
||||
<div class="manage-menu-flex">
|
||||
{{$L('工作报告')}}
|
||||
<Badge v-if="reportUnreadNumber > 0" class="manage-menu-report-badge" :count="reportUnreadNumber"/>
|
||||
<Badge v-if="reportUnreadNumber > 0" class="manage-menu-report-badge" :overflow-count="999" :count="reportUnreadNumber"/>
|
||||
</div>
|
||||
</DropdownItem>
|
||||
<DropdownItem name="exportTask">{{$L('导出任务统计')}}</DropdownItem>
|
||||
@ -98,9 +98,9 @@
|
||||
<li @click="toggleRoute('dashboard')" :class="classNameRoute('dashboard')">
|
||||
<i class="taskfont"></i>
|
||||
<div class="menu-title">{{$L('仪表盘')}}</div>
|
||||
<Badge v-if="dashboardTask.overdue_count > 0" class="menu-badge" type="error" :count="dashboardTask.overdue_count"/>
|
||||
<Badge v-else-if="dashboardTask.today_count > 0" class="menu-badge" type="info" :count="dashboardTask.today_count"/>
|
||||
<Badge v-else-if="dashboardTask.all_count > 0" class="menu-badge" type="primary" :count="dashboardTask.all_count"/>
|
||||
<Badge v-if="dashboardTask.overdue_count > 0" class="menu-badge" type="error" :overflow-count="999" :count="dashboardTask.overdue_count"/>
|
||||
<Badge v-else-if="dashboardTask.today_count > 0" class="menu-badge" type="info" :overflow-count="999" :count="dashboardTask.today_count"/>
|
||||
<Badge v-else-if="dashboardTask.all_count > 0" class="menu-badge" type="primary" :overflow-count="999" :count="dashboardTask.all_count"/>
|
||||
</li>
|
||||
<li @click="toggleRoute('calendar')" :class="classNameRoute('calendar')">
|
||||
<i class="taskfont"></i>
|
||||
@ -109,7 +109,7 @@
|
||||
<li @click="toggleRoute('messenger')" :class="classNameRoute('messenger')">
|
||||
<i class="taskfont"></i>
|
||||
<div class="menu-title">{{$L('消息')}}</div>
|
||||
<Badge class="menu-badge" :text="msgUnreadMention"/>
|
||||
<Badge class="menu-badge" :overflow-count="999" :text="msgUnreadMention"/>
|
||||
</li>
|
||||
<li @click="toggleRoute('file')" :class="classNameRoute('file')">
|
||||
<i class="taskfont"></i>
|
||||
@ -451,11 +451,11 @@ export default {
|
||||
num += $A.getDialogUnread(dialog, false);
|
||||
mention += $A.getDialogMention(dialog);
|
||||
})
|
||||
if (num > 99) {
|
||||
num = "99+"
|
||||
if (num > 999) {
|
||||
num = "999+"
|
||||
}
|
||||
if (mention > 99) {
|
||||
mention = "99+"
|
||||
if (mention > 999) {
|
||||
mention = "999+"
|
||||
}
|
||||
const todoNum = this.msgTodoTotal // 待办
|
||||
if (todoNum) {
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<UserAvatar :userid="projectData.owner_userid" :size="36" :borderWitdh="2" :openDelay="0">
|
||||
<p>{{$L('项目负责人')}}</p>
|
||||
</UserAvatar>
|
||||
<Badge v-if="(windowWidth <= 980 || projectData.cacheParameter.chat) && projectUser.length > 0" type="normal" :count="projectData.project_user.length"/>
|
||||
<Badge v-if="(windowWidth <= 980 || projectData.cacheParameter.chat) && projectUser.length > 0" type="normal" :overflow-count="999" :count="projectData.project_user.length"/>
|
||||
</li>
|
||||
<template v-if="!(windowWidth <= 980 || projectData.cacheParameter.chat) && projectUser.length > 0" v-for="item in projectUser">
|
||||
<li v-if="item.userid === -1" class="more">
|
||||
@ -45,7 +45,7 @@
|
||||
</li>
|
||||
<li :class="['project-icon', windowLarge && projectData.cacheParameter.chat ? 'active' : '']" @click="toggleParameter('chat')">
|
||||
<Icon class="menu-icon" type="ios-chatbubbles" />
|
||||
<Badge class="menu-badge" :count="msgUnread"></Badge>
|
||||
<Badge class="menu-badge" :overflow-count="999" :count="msgUnread"></Badge>
|
||||
</li>
|
||||
<li class="project-icon">
|
||||
<EDropdown @command="projectDropdown" trigger="click" transfer>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
:key="key"
|
||||
:class="{active:dialogActive==item.type}"
|
||||
@click="onActive(item.type)">
|
||||
<Badge class="nav-num" :count="msgUnread(item.type)"/>
|
||||
<Badge class="nav-num" :overflow-count="999" :count="msgUnread(item.type)"/>
|
||||
{{$L(item.name)}}
|
||||
</p>
|
||||
</div>
|
||||
@ -86,7 +86,7 @@
|
||||
<div v-if="dialog.silence" class="taskfont last-silence"></div>
|
||||
</div>
|
||||
</div>
|
||||
<Badge class="dialog-num" :type="dialog.silence ? 'normal' : 'error'" :count="$A.getDialogUnread(dialog, true)"/>
|
||||
<Badge class="dialog-num" :type="dialog.silence ? 'normal' : 'error'" :overflow-count="999" :count="$A.getDialogUnread(dialog, true)"/>
|
||||
<div class="dialog-line"></div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -136,7 +136,7 @@
|
||||
<div class="messenger-menu">
|
||||
<div class="menu-icon">
|
||||
<Icon @click="tabActive='dialog'" :class="{active:tabActive==='dialog'}" type="ios-chatbubbles" />
|
||||
<Badge class="menu-num" :count="msgUnread('all')"/>
|
||||
<Badge class="menu-num" :overflow-count="999" :count="msgUnread('all')"/>
|
||||
</div>
|
||||
<div class="menu-icon">
|
||||
<Icon @click="tabActive='contacts'" :class="{active:tabActive==='contacts'}" type="md-person" />
|
||||
|
||||
@ -260,8 +260,8 @@
|
||||
.dialog-num {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 42px;
|
||||
transform: scale(0.8);
|
||||
left: 58px;
|
||||
transform: scale(0.8) translateX(-100%);
|
||||
}
|
||||
.dialog-line {
|
||||
display: none;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user