Commit be017d0c by 胡悦

三级详情添加loadding

1 parent e04599eb
......@@ -3,10 +3,20 @@
class="picture"
v-show="!!detailUrl"
>
<template v-if="isLoading">
<div class="loadding">
<image
class="gif"
src="../../../assets/images/boutique/loadding.gif"
/>
资源加载中
</div>
</template>
<image
class="detail-img"
:src="detailUrl"
mode="widthFix"
@load="load"
/>
</view>
</template>
......@@ -22,15 +32,20 @@ export default {
},
data () {
return {
detailUrl: ''
detailUrl: '',
isLoading: true
}
},
watch: {
imgUrl (val) {
this.detailUrl = val
this.isLoading = true
}
},
methods: {
load(e) {
this.isLoading = false
}
},
}
</script>
......@@ -71,4 +86,20 @@ export default {
height: auto;
object-fit: cover;
}
.loadding {
font-size: 12px;
color: #999;
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
overflow: hidden;
.gif {
width: 64rpx;
height: 64rpx;
margin-bottom: 32rpx;
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!