File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 6262
6363 <div class =" image-container" v-else-if =" isImage" >
6464 <chat-loader
65- class = " image-loader "
65+ :style = " { top: `${imageResponsive.loaderTop}px` } "
6666 :show =" isImageLoading"
6767 ></chat-loader >
6868 <div
7373 }"
7474 :style =" {
7575 background: `url(${message.file.url})`,
76- 'max-height': `${imageMaxHeight }px`
76+ 'max-height': `${imageResponsive.maxHeight }px`
7777 }"
7878 >
7979 <transition name =" fade-image" >
@@ -232,7 +232,7 @@ export default {
232232 messageReaction: ' ' ,
233233 newMessage: {},
234234 emojiOpened: false ,
235- imageMaxHeight : ' '
235+ imageResponsive : ' '
236236 }
237237 },
238238
@@ -267,7 +267,10 @@ export default {
267267 index: this .index
268268 })
269269 }
270- this .imageMaxHeight = this .$refs .imageRef .clientWidth - 18
270+ this .imageResponsive = {
271+ maxHeight: this .$refs .imageRef .clientWidth - 18 ,
272+ loaderTop: this .$refs .imageRef .clientWidth / 2
273+ }
271274 },
272275
273276 computed: {
@@ -528,10 +531,6 @@ export default {
528531 width : 70px ;
529532}
530533
531- .image-loader {
532- top : 140px ;
533- }
534-
535534.message-image {
536535 position : relative ;
537536 background-color : var (--chat-message-bg-color-image ) !important ;
You can’t perform that action at this time.
0 commit comments