> For the complete documentation index, see [llms.txt](https://yicoding.gitbook.io/vue/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yicoding.gitbook.io/vue/cha-jian/vue-awesome-swiper.md).

# vue-awesome-swiper

```
// swiperbox.vue
<template>
  <div>
    <swiper :options="swiperOption" ref="mySwiper">
      <swiper-slide></swiper-slide>
    </swiper>
  </div>
</template>

<script>
// 引入
import { swiper, swiperSlide } from 'vue-awesome-swiper'

export default {
  data () {
    return {
        swiperOption: {
          
        }
    }
  },
  computed: {
    swiper() {
      return this.$refs.mySwiper.swiper
    }
  },
  methods: {
    // 回到第一页
    goTo() {
      this.swiper.slideTo(0, 1000, false)
    }
  }
}
</script>
```
