mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 03:03:41 +00:00
no message
This commit is contained in:
parent
8acf3b21c7
commit
6b2b072e16
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="chat-input-wrapper" :class="modeClass">
|
<div class="chat-input-wrapper" :class="modeClass">
|
||||||
<div ref="editor" class="no-dark-content"></div>
|
<div ref="editor" class="no-dark-content" :style="editorStyle"></div>
|
||||||
<div class="chat-input-toolbar">
|
<div class="chat-input-toolbar">
|
||||||
<slot name="toolbarBefore"/>
|
<slot name="toolbarBefore"/>
|
||||||
|
|
||||||
@ -106,6 +106,7 @@ export default {
|
|||||||
_options: {},
|
_options: {},
|
||||||
|
|
||||||
modeClass: '',
|
modeClass: '',
|
||||||
|
editorStyle: {},
|
||||||
|
|
||||||
userList: null,
|
userList: null,
|
||||||
taskList: null,
|
taskList: null,
|
||||||
@ -268,10 +269,12 @@ export default {
|
|||||||
this._content = html
|
this._content = html
|
||||||
this.$emit('input', this._content)
|
this.$emit('input', this._content)
|
||||||
this.$emit('on-change', { html, text, quill })
|
this.$emit('on-change', { html, text, quill })
|
||||||
|
this.calcEditStyle();
|
||||||
})
|
})
|
||||||
|
|
||||||
// Emit ready event
|
// Emit ready event
|
||||||
this.$emit('on-ready', this.quill)
|
this.$emit('on-ready', this.quill)
|
||||||
|
this.calcEditStyle();
|
||||||
},
|
},
|
||||||
|
|
||||||
focus() {
|
focus() {
|
||||||
@ -290,6 +293,16 @@ export default {
|
|||||||
this.$emit('on-send')
|
this.$emit('on-send')
|
||||||
},
|
},
|
||||||
|
|
||||||
|
calcEditStyle() {
|
||||||
|
if (this.$refs.editor.clientWidth < 120 || this.$refs.editor.clientHeight > 40) {
|
||||||
|
this.editorStyle = {
|
||||||
|
width: '100%'
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
this.editorStyle = {};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onSelectEmoji(item) {
|
onSelectEmoji(item) {
|
||||||
if (!this.quill) {
|
if (!this.quill) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -307,9 +307,18 @@ export default {
|
|||||||
this.msgNew = 0;
|
this.msgNew = 0;
|
||||||
this.topId = -1;
|
this.topId = -1;
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
if (this.dialogMsgList.length > 0) {
|
||||||
|
setTimeout(_ => {
|
||||||
|
this.onToBottom();
|
||||||
|
this.visible = true;
|
||||||
|
}, 10);
|
||||||
|
}
|
||||||
|
let startTime = new Date().getTime();
|
||||||
this.$store.dispatch("getDialogMsgs", id).then(_ => {
|
this.$store.dispatch("getDialogMsgs", id).then(_ => {
|
||||||
this.onToBottom();
|
setTimeout(_ => {
|
||||||
this.visible = true;
|
this.onToBottom();
|
||||||
|
this.visible = true;
|
||||||
|
}, Math.max(0, 100 - (new Date().getTime() - startTime)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -28,8 +28,9 @@
|
|||||||
.ql-container {
|
.ql-container {
|
||||||
display: block;
|
display: block;
|
||||||
float: left;
|
float: left;
|
||||||
|
width: auto;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
min-width: calc(100% - 175px);
|
min-width: calc(100% - 170px);
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
||||||
|
|
||||||
.ql-editor {
|
.ql-editor {
|
||||||
@ -216,7 +217,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
float: right;
|
float: right;
|
||||||
width: 175px;
|
width: 170px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
padding: 0 2px;
|
padding: 0 2px;
|
||||||
.common-loading {
|
.common-loading {
|
||||||
|
|||||||
@ -601,6 +601,13 @@
|
|||||||
> pre {
|
> pre {
|
||||||
.mention {
|
.mention {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
|
||||||
|
&.me {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: normal;
|
||||||
|
padding: 3px 0;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user