mint-ui填坑 mt-swipe保存当前索引

mint-ui填坑 mt-swipe

1.获取当前index

template:

<mt-swipe ref="swipe" :auto="4000"  :showIndicators="false" @change="swipeChange">
            <mt-swipe-item>1</mt-swipe-item>
            <mt-swipe-item>2></mt-swipe-item>
        </mt-swipe>

methods:

swipeChange() {
                this.activeIndex = this.$refs.swipe.index + 1
            },

data:

activeIndex:1

猜你喜欢

转载自blog.csdn.net/qq719756146/article/details/84582962