查看: 1750|回复: 2
打印 上一主题 下一主题

vue-awesome-swiper回掉函数无效是怎么回事呢?

[复制链接]

该用户从未签到

1

主题

1

帖子

4

积分

新手上路

Rank: 1

积分
4
跳转到指定楼层
楼主
发表于 2018-5-16 10:49:48 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
data () {
        return {
            title: '1/5' ,
            swiperOption: {
            // notNextTick是一个组件自有属性,如果notNextTick设置为true,组件则不会通过NextTick来实例化swiper,也就意味着你可以在第一时间获取到swiper对象,假如你需要刚加载遍使用获取swiper对象来做什么事,那么这个属性一定要是true
                notNextTick: true,
                direction : 'horizontal',
                grabCursor : true,
                setWrapperSize :true,
                autoHeight: true,
                pagination : '.swiper-pagination',
                paginationClickable :true,
                mousewheelControl : true,
                observeParents:true,
                    // onTransitionEnd(swiper){
                    //     alert(1)
                    //     alert(swiper.activeIndex) //切换结束时,告诉我现在是第几个slide
                    // },
                    onTransitionStart(swiper){
                      console.log(swiper)
                    },
                    onSlideChangeEnd: swiper => {  
                        //这个位置放swiper的回调方法  
                        this.page = swiper.realIndex+1;  
                        this.index = swiper.realIndex;  
                    }  
                    
            },   
        }
    },
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Swiper中文网 ( 粤ICP备15001020号

GMT+8, 2024-5-4 11:36 , Processed in 0.085799 second(s), 26 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表