vue中使用superslide组件实现滚动、tab切换、幻灯片等移动切换特效
官方文档 https://rockyxia.github.io/vue-superslide/#/superslide只初始化一次,这里需要watch监听强制刷新dom<superslide v-if="hackReset" :options="options" class="picScroll-left"><div class="bd">...
·
官方文档 https://rockyxia.github.io/vue-superslide/#/
superslide只初始化一次,这里需要watch监听强制刷新dom
<superslide v-if="hackReset" :options="options" class="picScroll-left">
<div class="bd">
<ul class="picList">
<li
v-for="preview_imgs in preview_img"
v-bind:key="preview_imgs.index"
style="position:relative"
>
<div class="pic">
<a href="javascript:;">
<img @mouseenter="enter()" @mouseleave="leave()" :src="preview_imgs"/>
</a>
</div>
</li>
</ul>
</div>
<div v-show="isshow" class="prev" slot="prev"></div>
<div v-show="isshow" class="next" slot="next"></div>
</superslide>
watch: {
preview_img() {
this.hackReset = false;
this.$nextTick(() => {
this.hackReset = true;
});
}
}
更多推荐
已为社区贡献3条内容
所有评论(0)