例如该样式:
1.Vue的方法(可实现自动轮播和左右按钮和下方原点按钮轮播)
<div id="app"><div class="a" ref="b" @mouseenter="MouseFun('c')" @mouseleave="MouseFun('d')">//1.图片显示盒子<div class="imgBox" :style="{left:`-${leftVal}px`,transition:`${ition}s`}"><img :src="item.imgUrl" v-for="(item,index) in imgList" :key="index" /><img :src="imgList[0].imgUrl" alt=""></div>//2.按钮<div class="leftBtn" @click="throttle(PrevFun)">←</div> //左按钮<div class="rightBtn" @click="throttle(NextFun)">→</div> //右按钮//3.下方选择点击按钮<div class="instBox"><div @click="instFun(index)" v-for="(item,index) in imgList.length" :key="index":class="['inst',index==imgShow?'instActv':'']"></div></div></div>
</div>
<script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script>
<script type="text/javascript">var app = new Vue({el: '#app',