mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-02 15:07:11 +00:00
no msg
This commit is contained in:
parent
793f6152ff
commit
073b1937f0
@ -209,6 +209,7 @@ export default {
|
||||
|
||||
observer: null,
|
||||
wrapperWidth: 0,
|
||||
wrapperHeight: 0,
|
||||
editorHeight: 0,
|
||||
|
||||
recordReady: false,
|
||||
@ -233,6 +234,7 @@ export default {
|
||||
entries.some(({target, contentRect}) => {
|
||||
if (target === this.$el) {
|
||||
this.wrapperWidth = contentRect.width;
|
||||
this.wrapperHeight = contentRect.height;
|
||||
} else if (target === this.$refs.editor) {
|
||||
this.editorHeight = contentRect.height;
|
||||
}
|
||||
@ -443,6 +445,10 @@ export default {
|
||||
|
||||
dialogInputCache() {
|
||||
this.$emit('input', this.getInputCache())
|
||||
},
|
||||
|
||||
wrapperHeight(newVal, oldVal) {
|
||||
this.$emit('on-height-change', {newVal, oldVal})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@ -122,6 +122,7 @@
|
||||
@on-record="sendRecord"
|
||||
@on-record-state="onRecordState"
|
||||
@on-emoji-visible-change="onEventEmojiVisibleChange"
|
||||
@on-height-change="onHeightChange"
|
||||
@on-cancel-reply="onCancelReply"
|
||||
:placeholder="$L('输入消息...')"/>
|
||||
</div>
|
||||
@ -436,7 +437,7 @@ export default {
|
||||
if (this.msgNew > 0 && this.allMsgs.length > 0) {
|
||||
return 'newmsg'
|
||||
}
|
||||
if (this.scrollTail > 50) {
|
||||
if (this.scrollTail > 500) {
|
||||
return 'goto'
|
||||
}
|
||||
return null
|
||||
@ -808,6 +809,16 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
onHeightChange({newVal, oldVal}) {
|
||||
const diff = newVal - oldVal;
|
||||
if (diff !== 0) {
|
||||
const {offset, tail} = this.scrollInfo()
|
||||
if (tail > 0) {
|
||||
this.onToOffset(offset + diff)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onActive() {
|
||||
this.$emit("on-active");
|
||||
},
|
||||
|
||||
@ -823,10 +823,14 @@
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
color: $primary-text-color;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #eeeeee;
|
||||
box-shadow: 0 4px 8px 0 rgba($primary-text-color, 0.2);
|
||||
top: -48px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
line-height: 38px;
|
||||
border-radius: 50%;
|
||||
|
||||
.taskfont {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user