Coder Social home page Coder Social logo

zwhgithub / vue-swiper Goto Github PK

View Code? Open in Web Editor NEW
588.0 12.0 115.0 1.14 MB

✅ 轻量、高性能轮播插件。目前支持 无缝衔接自动轮播、无限轮播、手势轮播

JavaScript 68.80% HTML 0.97% Vue 30.23%
vue-swiper swiper vue-slider slider vue-swiper-component

vue-swiper's Issues

bug

改变轮播的list数组时 会有缓存上一次的图片

优化建议

我在学习VUE总用到了您的插件,确实很不粗,但是提几点改进意见:1、可否增加参数配置,播放到最后一张图片是否从第一张循环播放;2、增加参数,配置同一块屏幕内露出前一张躲到,后一张多少。提一个小问题,组件对上下滑动不敏感,体验较差。个人意见,多有得罪。建议参考微信小程序的swiper,https://developers.weixin.qq.com/miniprogram/dev/component/swiper.html

<Slide>

<Slide @click="clickMe" v-for="(item,index) in slidesReal" :key="index">
//添加click事件

往sliderReal里面添加一张图片,但是这张图片不能够直接进行轮播显示;slidesReal已经确认添加进图片了

图片不加载

您的这个轮播插件,我拿到项目里面,出现了一个问题,图片加载不出来(图片全部显示空白),如果刷新页面,图片会闪烁一下,然后变空白,我想知道这个问题,出在了哪里,您遇到过这样的问题吗

缩略图

这个能支持缩略图的效果吗?

typescript支持

import Vue from 'vue'

declare class Swiper extends Vue {
  autoPlay: boolean
  duration: number
  interval: number
  showIndicator: boolean
}

declare class Slide extends Vue {

}

export {
  Swiper, Slide
}


一个vue文件内,添加多个swiper会出问题吗?

作者大神你好,

我目前用本地静态img测试,在同一个vue文件内,第一个轮播动画乱了,第二个无法播放,小圆点数量也double了

想请教下,是否这个组件暂时还不支持多个使用?或者用v-for动态数据就好了?谢谢~新年快乐

HTML:

     <div class="swiper-wrapper">
        <Swiper v-if="list.length > 0" interval="5000" duration="1000">
          <Slide v-for="(item,index) in list" :key="index">
            <img :src="item.img">
          </Slide>
        </Swiper>
      </div>

JS:

data(){
      return{
        list:[
          {img: require('static/img/02.png')},
          {img: require('static/img/03.png')},
          {img: require('static/img/04.png')},
          {img: require('static/img/05.png')},
          {img: require('static/img/06.png')},
        ]
      }
    }

CSS:

.swiper-wrapper{
    padding: 0 10px;
  }
  /*小圆点顶下去*/
  .wh_content /deep/{
    padding-bottom: 56px;
  }
  /*小圆点的样式*/
  .wh_content /deep/ .wh_show_bgcolor {
    background: $font;
  }

transtionend

transtionend是每次轮播 index 变化后才监听到,有没有轮播开始变化时的监听方法。我在源码中只看到了transtionend,似乎没有了,希望能加上。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.