no message

This commit is contained in:
kuaifan 2022-05-29 07:52:50 +08:00
parent 834bb28100
commit 82d6f0b533
8 changed files with 50 additions and 20 deletions

View File

@ -45,6 +45,12 @@ export default {
},
},
watch: {
show(s) {
this.$store.state.touchBackInProgress = s;
}
},
methods: {
getXY(event) {
let touch = event.touches[0]

View File

@ -1,5 +1,5 @@
<template>
<div class="chat-input-box" :class="boxClass">
<div class="chat-input-box" :class="boxClass" v-clickoutside="hidePopover">
<div class="chat-input-wrapper" @click.stop="focus">
<!-- 输入框 -->
<div
@ -110,11 +110,12 @@ import "quill-mention-hi";
import ChatEmoji from "./emoji";
import touchmouse from "../../../../directives/touchmouse";
import TransferDom from "../../../../directives/transfer-dom";
import clickoutside from "../../../../directives/clickoutside";
export default {
name: 'ChatInput',
components: {ChatEmoji},
directives: {touchmouse, TransferDom},
directives: {touchmouse, TransferDom, clickoutside},
props: {
dialogId: {
type: Number,
@ -429,6 +430,9 @@ export default {
// Mark model as touched if editor lost focus
this.quill.on('selection-change', range => {
if (this.timerScroll) {
clearInterval(this.timerScroll);
}
if (!range) {
this.$emit('on-blur', this.quill)
} else {
@ -438,11 +442,13 @@ export default {
// ios11.0-11.3 scrollTopscrolIntoViewbug
//
} else {
for (let i = 1; i <= 5; i++) {
setTimeout(() => {
this.timerScroll = setInterval(() => {
if (this.quill.hasFocus()) {
$A.scrollToView(this.$refs.editor, true)
}, 200 * i);
}
} else {
clearInterval(this.timerScroll);
}
}, 200);
}
}
})

View File

@ -221,19 +221,19 @@ export default {
dialogDrag: false,
groupInfoShow: false,
windowScrollY: 0
wrapperStyle: {},
}
},
mounted() {
if ($A.isIos()) {
window.addEventListener('scroll', this.onScrollEvent);
window.addEventListener('scroll', this.onWindowScroll);
}
},
beforeDestroy() {
if ($A.isIos()) {
window.removeEventListener('scroll', this.onScrollEvent);
window.removeEventListener('scroll', this.onWindowScroll);
}
},
@ -321,13 +321,6 @@ export default {
isMyDialog() {
const {dialogData, userId} = this;
return dialogData.dialog_user && dialogData.dialog_user.userid == userId
},
wrapperStyle() {
const {windowScrollY} = this;
return {
top: windowScrollY + 'px'
}
}
},
@ -695,8 +688,16 @@ export default {
}, 100)
},
onScrollEvent() {
this.windowScrollY = window.scrollY
onWindowScroll() {
const {scrollE} = this.scrollInfo();
this.wrapperStyle = {
top: window.scrollY + 'px'
}
if (scrollE <= 10) {
this.$nextTick(_ => {
this.onToBottom();
})
}
}
}
}

View File

@ -92,7 +92,7 @@
</div>
</div>
</div>
<div v-if="tabTypeActive === 'column'" class="project-column">
<div v-if="tabTypeActive === 'column'" class="project-column" :style="columnStyle">
<Draggable
:list="columnList"
:animation="150"
@ -538,6 +538,7 @@ export default {
computed: {
...mapState([
'windowWidth',
'touchBackInProgress',
'userId',
'cacheDialogs',
@ -557,7 +558,7 @@ export default {
},
tabTypeStyle() {
let style = {}
const style = {}
switch (this.tabTypeActive) {
case 'column':
style.left = '0'
@ -574,6 +575,14 @@ export default {
return style
},
columnStyle() {
const style = {}
if (this.touchBackInProgress) {
style.overflow = 'hidden';
}
return style
},
userWaitRemove() {
const {userids, useridbak} = this.userData;
if (!userids) {

View File

@ -11,6 +11,7 @@ const stateData = {
loadUserBasic: false,
loadProjects: 0,
loadDialogs: 0,
touchBackInProgress: false,
// User
cacheUserActive: {},

View File

@ -232,6 +232,9 @@
.mobile-dialog-leave-active {
transition: all 0.3s ease;
.dialog-wrapper {
bottom: -60px;
}
}
.mobile-dialog-enter,

View File

@ -979,6 +979,7 @@
.dialog-scroller {
padding-right: 14px;
padding-left: 14px;
overscroll-behavior: none;
}
.dialog-footer {
background-color: #f8f8f8;

View File

@ -478,6 +478,9 @@
.messenger-msg {
z-index: 49;
background-color: #f8f8f8;
.msg-dialog-bg {
display: none;
}
}
}
}