element ui 走马灯

  1. 切换下一屏
  <el-carousel   :autoplay="false" arrow="never" ref="carousel"  height="340px">
              <el-carousel-item v-for="(item,index) in num"  :key="index" name="index">
                <div class="photo animated">
                  <img class="item_img" v-for="(items, index) in imgList.slice(left,right)" :key="index" name="index" :src="imgUrl+items" />
                </div>
              </el-carousel-item>
            </el-carousel>
             <div class="left_button" @click="leftChange('prev')"><img class="left_img" src="@/assets/Uram/leader/left.png" alt=""> </div>
          <div class="right_button" @click="rightChange('next')"><img   class="right_img" src="@/assets/Uram/leader/right.png" alt=""></div>
          

2.切到下一屏的时候没有找到下表,只好手写一个定义一个god当下表
element ui 走马灯_第1张图片
这里的left 和right 为渲染的数据项为几,

你可能感兴趣的:(笔记,ui)