Merge pull request #738 from amyspark/remove-img-spinner-after-load

Remove spinner after image has been loaded
This commit is contained in:
AkiraFukushima 2018-11-23 17:57:51 +09:00 committed by GitHub
commit 8feba2fb24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 6 deletions

View File

@ -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");
background-position: center center; &.loading {
background-repeat: no-repeat; background-image: url("../../assets/images/loading-spinner.svg");
background-size: contain; background-position: center center;
background-repeat: no-repeat;
background-size: contain;
}
} }
</style> </style>