work in progress

This commit is contained in:
AndzejsP 2023-06-03 17:22:55 +03:00
parent 175ddd2e0e
commit a21af84f74
2 changed files with 11 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<template>
<div class="absolute bottom-0 w-96 justify-center text-center p-4">
<div class="absolute bottom-0 w-96 justify-center text-center p-4 ">
<div v-if="loading" class="flex items-center justify-center w-full">
<div class="flex flex-row p-2 rounded-t-lg ">

View File

@ -173,7 +173,7 @@
<Message v-for="(msg, index) in discussionArr" :key="msg.id" :message="msg" :id="'msg-' + msg.id"
ref="messages" @copy="copyToClipBoard" @delete="deleteMessage" @rankUp="rankUpMessage"
@rankDown="rankDownMessage" @updateMessage="updateMessage" @resendMessage="resendMessage"
:avatar="getAvatar(msg.sender)" />
:avatar="getAvatar(msg.sender)" @click="scrollToElementInContainer($event.target, 'messages-list')" />
</TransitionGroup>
@ -507,6 +507,13 @@ export default {
console.log("Error: scrollToElement")
}
},
scrollToElementInContainer(el, containerId) {
// console.log(el)
// const topPos = el.offsetTop + el.clientHeight;
// const container = document.getElementById(containerId)
// container.scrollTop = topPos;
},
scrollBottom(el) {
if (el) {
@ -1064,9 +1071,9 @@ export default {
},
setFileListChat(files) {
//this.fileList = files
this.$refs.chatBox.fileList =files
this.$refs.chatBox.fileList = files
this.isDragOverChat = false
},