perf: 移动端任务打开聊天按钮优化

This commit is contained in:
kuaifan 2022-07-12 12:30:54 +08:00
parent 0bf98ec9f8
commit 1ef33700ee
2 changed files with 22 additions and 19 deletions

View File

@ -417,6 +417,13 @@
<Icon v-else type="ios-refresh" @click="getLogLists"></Icon>
</div>
</div>
<div class="menu">
<div v-if="navActive=='dialog' && taskDetail.msg_num > 0" class="menu-item" @click.stop="onSend">
{{$L('任务聊天')}}
<em>({{taskDetail.msg_num > 99 ? '99+' : taskDetail.msg_num}})</em>
<i class="taskfont">&#xe703;</i>
</div>
</div>
</div>
<ProjectLog v-if="navActive=='log' && taskId > 0" ref="log" :task-id="taskDetail.id" :show-load="false" @on-load-change="logLoadChange"/>
<div v-else class="no-dialog"
@ -436,7 +443,6 @@
@on-file="onSelectFile"
@on-record="onRecord"
@on-send="onSend"/>
<div v-if="sendLoad === 0 && taskDetail.msg_num" class="input-badge" @click.stop="onSend">{{taskDetail.msg_num > 99 ? '99+' : taskDetail.msg_num}}</div>
</div>
<div v-if="dialogDrag" class="drag-over" @click="dialogDrag=false">
<div class="drag-text">{{$L('拖动到这里发送')}}</div>

View File

@ -556,6 +556,21 @@
}
}
}
.menu {
.menu-item {
display: flex;
align-items: center;
line-height: 24px;
> em {
font-style: normal;
padding-left: 1px;
}
> i {
padding-left: 4px;
font-size: 14px;
}
}
}
}
.no-dialog {
flex: 1;
@ -586,24 +601,6 @@
}
}
}
.input-badge {
position: absolute;
transform: scale(0.8) translateX(100%);
transform-origin: right center;
bottom: 28px;
right: 22px;
z-index: 2;
height: 20px;
border-radius: 10px;
min-width: 20px;
background: #ed4014;
color: #fff;
line-height: 20px;
text-align: center;
padding: 0 6px;
font-size: 12px;
white-space: nowrap;
}
}
.drag-over {
position: absolute;