fix: Fix widget thumbnail not rendering background colors (#5791)
This commit is contained in:
parent
c121b44df4
commit
8bd5ba187a
3 changed files with 24 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="user-thumbnail-box" :style="{ height: size, width: size }">
|
||||
<div :class="thumbnailBoxClass" :style="{ height: size, width: size }">
|
||||
<img
|
||||
v-if="!imgError && src"
|
||||
:src="src"
|
||||
|
@ -120,6 +120,10 @@ export default {
|
|||
this.variant === 'circle' ? 'thumbnail-rounded' : 'thumbnail-square';
|
||||
return `user-thumbnail ${classname} ${variant}`;
|
||||
},
|
||||
thumbnailBoxClass() {
|
||||
const boxClass = this.variant === 'circle' ? 'is-rounded' : '';
|
||||
return `user-thumbnail-box ${boxClass}`;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
src(value, oldValue) {
|
||||
|
@ -142,6 +146,10 @@ export default {
|
|||
max-width: 100%;
|
||||
position: relative;
|
||||
|
||||
&.is-rounded {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.user-thumbnail {
|
||||
border-radius: 50%;
|
||||
&.thumbnail-square {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue