1、报404 是服务器刷新问题
看看ssr知识点
2、引入外部组件报500
我这边是引入瀑布流组件vue-waterfall-easy,页面正常路由导航正确,如果页面刷新报500
代码:
<div class='picTcon'>
<vue-waterfall-easy :imgsArr="imgsArr" @click="fangda" ></vue-waterfall-easy>
<div class="big" v-for="(item,index) in imgsArr">
<div class="close" @click="iclose()"><img src="../assets/img/close.png" alt=""></div>
<div class="leftbtn" @click="pre()"><img src="../assets/img/left-circle.png" alt=""></div>
<img :src="item.sImg" alt="">
<div class="rightbtn" @click="next()"><img src="../assets/img/right-circle.png" alt=""></div>
</div>
</div>
解决办法是
在vue-waterfall-easy标签上加:
v-if="imgsArr.length>0"
网友评论