父组件中有异步请求,而子组件中需要用到这个异步请求的结果
所以需要子组件延迟加载
data() {
return {
logoCss: {
width:0,
height:0,
defaultImgUrl: null,
},
}
},
<mobileWidget
v-if="logoCss.defaultImgUrl != null"
:logo-css="logoCss"
/>
https://blog.csdn.net/weixin_37744901/article/details/106931965