今日总结 多个路由 + vue-cil里使用swiper+子路由

export default {
  name: 'App',
  components:{
                          Vhome,
                          Vfooter
                      }//载入模块
                                }

//在 mounted 里

    export default {
        mounted (){
    new Swiper ('.swiper-container', {
        direction: 'horizontal',
        loop: true,
         autoplay: {
            delay: 2000,
            stopOnLastSlide: false,
            disableOnInteraction: false,
                    },
        pagination: {
          el: '.swiper-pagination',
        },
    }) 
    //首页轮播图
      var mySwiper = new Swiper ('.message', {
        direction: 'vertical',
        loop: true,
        autoplay:true,//等同于以下设置
      }) 
    //橘子头条
        }
    }

//子路由

      children:[
        { path: '/order/Vnear', component: Vnear},
        { path: '/order/Vhome', component: Vhome}
                ]

        <router-link to="/order/Vnear" class="children">待付款</router-link>
            <router-link to="/order/Vhome" class="children active" >已付款<</router-link>

<router-view></router-view>

猜你喜欢

转载自blog.csdn.net/qq_38674970/article/details/81101955