Remove spinner after image has been loaded
This fixes transparent images that still show the spinner beneath them after they've been loaded successfully.
This commit is contained in:
parent
73a0f8bec1
commit
0837765bca
|
@ -4,6 +4,8 @@
|
||||||
:title="title"
|
:title="title"
|
||||||
:alt="alt"
|
:alt="alt"
|
||||||
v-on:error="failover"
|
v-on:error="failover"
|
||||||
|
v-on:load="loading = false"
|
||||||
|
:class="loading ? 'loading' : ''"
|
||||||
@click="$emit('click')" />
|
@click="$emit('click')" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -46,11 +48,14 @@ export default {
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
img {
|
img {
|
||||||
min-width: 20px;
|
min-width: 1em;
|
||||||
min-height: 20px;
|
min-height: 1em;
|
||||||
background-image: url("../../assets/images/loading-spinner.svg");
|
|
||||||
|
&.loading {
|
||||||
|
background-image: url("../../images/loading-spinner.svg");
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue