Commit be017d0c by 胡悦

三级详情添加loadding

1 parent e04599eb
...@@ -3,10 +3,20 @@ ...@@ -3,10 +3,20 @@
class="picture" class="picture"
v-show="!!detailUrl" v-show="!!detailUrl"
> >
<template v-if="isLoading">
<div class="loadding">
<image
class="gif"
src="../../../assets/images/boutique/loadding.gif"
/>
资源加载中
</div>
</template>
<image <image
class="detail-img" class="detail-img"
:src="detailUrl" :src="detailUrl"
mode="widthFix" mode="widthFix"
@load="load"
/> />
</view> </view>
</template> </template>
...@@ -22,15 +32,20 @@ export default { ...@@ -22,15 +32,20 @@ export default {
}, },
data () { data () {
return { return {
detailUrl: '' detailUrl: '',
isLoading: true
} }
}, },
watch: { watch: {
imgUrl (val) { imgUrl (val) {
this.detailUrl = val this.detailUrl = val
this.isLoading = true
} }
}, },
methods: { methods: {
load(e) {
this.isLoading = false
}
}, },
} }
</script> </script>
...@@ -71,4 +86,20 @@ export default { ...@@ -71,4 +86,20 @@ export default {
height: auto; height: auto;
object-fit: cover; 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> </style>
\ No newline at end of file \ 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!