BUG:会话框滚动条计算调整

This commit is contained in:
fan 2023-02-14 15:23:10 +08:00
parent b02267b9c7
commit c44983c4a5

View File

@ -128,7 +128,7 @@ export default {
methods: {
scrollTop() {
this.$nextTick(() => {
const scrollTop = this.messageList.length * 65 - 250;
const scrollTop = this.messageList.length * 62;
document.querySelector('.chat-box-content').scrollTop = scrollTop;
});
},
@ -146,13 +146,11 @@ export default {
playAllAudio() {
this.$nextTick(function() {
this.currentMessage = this.currentAudioList.shift();
console.log(this.currentMessage, '************');
if (this.currentMessage.type === 'Text') {
return;
}
document.querySelector('#audioPlay').src = this.currentMessage.audioPath;
document.querySelector('#audioPlay').play();
console.log(document.querySelector('#audioPlay'), '--------------');
this.$set(this.currentMessage, 'activeAuto', true);
this.play = true;
document.querySelector('#audioPlay').onended = () => {