mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 11:13:26 +00:00
perf: 消息快捷发送菜单
This commit is contained in:
parent
c27a15fce2
commit
4c76b3e60c
@ -84,6 +84,7 @@ class WebSocketDialog extends AbstractModel
|
|||||||
$this->top_at = $this->top_at ?? $dialogUserFun('top_at');
|
$this->top_at = $this->top_at ?? $dialogUserFun('top_at');
|
||||||
$this->user_at = $this->user_at ?? $dialogUserFun('updated_at');
|
$this->user_at = $this->user_at ?? $dialogUserFun('updated_at');
|
||||||
$this->user_ms = WebSocketDialogUser::userMs($this->user_at);
|
$this->user_ms = WebSocketDialogUser::userMs($this->user_at);
|
||||||
|
$this->quick_msg = [];
|
||||||
//
|
//
|
||||||
if (isset($this->search_msg_id)) {
|
if (isset($this->search_msg_id)) {
|
||||||
// 最后消息 (搜索预览消息)
|
// 最后消息 (搜索预览消息)
|
||||||
|
|||||||
@ -164,11 +164,18 @@
|
|||||||
@on-progress="chatFile('progress', $event)"
|
@on-progress="chatFile('progress', $event)"
|
||||||
@on-success="chatFile('success', $event)"
|
@on-success="chatFile('success', $event)"
|
||||||
@on-error="chatFile('error', $event)"/>
|
@on-error="chatFile('error', $event)"/>
|
||||||
<div v-if="todoShow" class="chat-todo">
|
<div v-if="todoShow" class="chat-bottom-menu">
|
||||||
<div class="todo-label">{{$L('待办')}}:</div>
|
<div class="bottom-menu-label">{{$L('待办')}}:</div>
|
||||||
<ul class="scrollbar-hidden">
|
<ul class="scrollbar-hidden">
|
||||||
<li v-for="item in todoList" @click.stop="onViewTodo(item)">
|
<li v-for="item in todoList" @click.stop="onViewTodo(item)">
|
||||||
<div class="todo-desc no-dark-content">{{$A.getMsgSimpleDesc(item.msg_data)}}</div>
|
<div class="bottom-menu-desc no-dark-content">{{$A.getMsgSimpleDesc(item.msg_data)}}</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="quickShow" class="chat-bottom-menu">
|
||||||
|
<ul class="scrollbar-hidden">
|
||||||
|
<li v-for="text in quickMsg" @click.stop="sendMsg(text)">
|
||||||
|
<div class="bottom-menu-desc no-dark-content">{{text}}</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -723,6 +730,14 @@ export default {
|
|||||||
return array
|
return array
|
||||||
},
|
},
|
||||||
|
|
||||||
|
quickMsg() {
|
||||||
|
return this.dialogData.quick_msg || []
|
||||||
|
},
|
||||||
|
|
||||||
|
quickShow() {
|
||||||
|
return this.quickMsg.length > 0 && this.windowScrollY === 0 && this.replyId === 0
|
||||||
|
},
|
||||||
|
|
||||||
todoList() {
|
todoList() {
|
||||||
if (!this.dialogData.todo_num) {
|
if (!this.dialogData.todo_num) {
|
||||||
return []
|
return []
|
||||||
@ -2355,7 +2370,7 @@ export default {
|
|||||||
userids: [],
|
userids: [],
|
||||||
msg_id: this.operateItem.id,
|
msg_id: this.operateItem.id,
|
||||||
my_id: this.userId,
|
my_id: this.userId,
|
||||||
you_id: youId != this.userId ? youId : 0,
|
you_id: youId != this.userId && !this.dialogData.bot ? youId : 0,
|
||||||
}
|
}
|
||||||
if (this.operateItem.todo) {
|
if (this.operateItem.todo) {
|
||||||
$A.modalConfirm({
|
$A.modalConfirm({
|
||||||
|
|||||||
@ -1187,12 +1187,12 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-todo {
|
.chat-bottom-menu {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
|
|
||||||
.todo-label {
|
.bottom-menu-label {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
@ -1216,7 +1216,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.todo-desc {
|
.bottom-menu-desc {
|
||||||
max-width: 150px;
|
max-width: 150px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user