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 62
62
63
63
<div class =" image-container" v-else-if =" isImage" >
64
64
<chat-loader
65
- class = " image-loader "
65
+ :style = " { top: `${imageResponsive.loaderTop}px` } "
66
66
:show =" isImageLoading"
67
67
></chat-loader >
68
68
<div
73
73
}"
74
74
:style =" {
75
75
background: `url(${message.file.url})`,
76
- 'max-height': `${imageMaxHeight }px`
76
+ 'max-height': `${imageResponsive.maxHeight }px`
77
77
}"
78
78
>
79
79
<transition name =" fade-image" >
@@ -232,7 +232,7 @@ export default {
232
232
messageReaction: ' ' ,
233
233
newMessage: {},
234
234
emojiOpened: false ,
235
- imageMaxHeight : ' '
235
+ imageResponsive : ' '
236
236
}
237
237
},
238
238
@@ -267,7 +267,10 @@ export default {
267
267
index: this .index
268
268
})
269
269
}
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
+ }
271
274
},
272
275
273
276
computed: {
@@ -528,10 +531,6 @@ export default {
528
531
width : 70px ;
529
532
}
530
533
531
- .image-loader {
532
- top : 140px ;
533
- }
534
-
535
534
.message-image {
536
535
position : relative ;
537
536
background-color : var (--chat-message-bg-color-image ) !important ;
You can’t perform that action at this time.
0 commit comments