56
56
'image-loading': isImageLoading && message.sender_id === 'me'
57
57
}"
58
58
:style =" { background: `url(${message.file.url})` }"
59
- ></div >
60
- <transition name =" fade" >
61
- <div class =" image-buttons" v-if =" imageHover" >
62
- <div
63
- class =" svg-button button-view"
64
- @click.stop =" openFile(message.file)"
65
- >
66
- <svg-icon name =" eye" />
67
- </div >
68
- <div
69
- class =" svg-button button-download"
70
- @click.stop =" openFile(message.file)"
71
- >
72
- <svg-icon name =" document" />
59
+ >
60
+ <transition name =" fade" >
61
+ <div class =" image-buttons" v-if =" imageHover" >
62
+ <div
63
+ class =" svg-button button-view"
64
+ @click.stop =" openFile(message.file)"
65
+ >
66
+ <svg-icon name =" eye" />
67
+ </div >
68
+ <div
69
+ class =" svg-button button-download"
70
+ @click.stop =" openFile(message.file)"
71
+ >
72
+ <svg-icon name =" document" />
73
+ </div >
73
74
</div >
74
- </div >
75
- </transition >
75
+ </transition >
76
+ </div >
76
77
<span >{{ message.content }}</span >
77
78
</div >
78
79
@@ -314,6 +315,7 @@ export default {
314
315
}
315
316
316
317
.message-image {
318
+ position : relative ;
317
319
background-color : #ddd !important ;
318
320
background-size : cover !important ;
319
321
background-position : center center !important ;
@@ -414,30 +416,43 @@ export default {
414
416
}
415
417
416
418
.image-buttons {
419
+ position : absolute ;
420
+ width : 100% ;
421
+ height : 100% ;
422
+ border-radius : 4px ;
423
+ background : linear-gradient (
424
+ to bottom ,
425
+ rgba (0 , 0 , 0 , 0 ) 55% ,
426
+ rgba (0 , 0 , 0 , 0.02 ) 60% ,
427
+ rgba (0 , 0 , 0 , 0.05 ) 65% ,
428
+ rgba (0 , 0 , 0 , 0.1 ) 70% ,
429
+ rgba (0 , 0 , 0 , 0.2 ) 75% ,
430
+ rgba (0 , 0 , 0 , 0.3 ) 80% ,
431
+ rgba (0 , 0 , 0 , 0.5 ) 85% ,
432
+ rgba (0 , 0 , 0 , 0.6 ) 90% ,
433
+ rgba (0 , 0 , 0 , 0.7 ) 95% ,
434
+ rgba (0 , 0 , 0 , 0.8 ) 100%
435
+ );
436
+
417
437
svg {
418
- height : 20 px ;
419
- width : 20 px ;
438
+ height : 26 px ;
439
+ width : 26 px ;
420
440
}
421
441
422
442
.button-view ,
423
443
.button-download {
424
444
position : absolute ;
425
- bottom : 2 px ;
426
- left : 5 px ;
445
+ bottom : 6 px ;
446
+ left : 7 px ;
427
447
}
428
448
429
449
:first-child {
430
- left : 30 px ;
450
+ left : 40 px ;
431
451
}
432
452
433
453
.button-view {
434
454
max-width : 18px ;
435
- bottom : 4px ;
436
-
437
- svg {
438
- height : 18px ;
439
- width : 18px ;
440
- }
455
+ bottom : 8px ;
441
456
}
442
457
}
443
458
@@ -446,7 +461,7 @@ export default {
446
461
}
447
462
448
463
.fade-enter-active {
449
- transition : opacity 1.5 s ;
464
+ transition : opacity 1 s ;
450
465
}
451
466
452
467
.fade-leave-active {
0 commit comments