javascript - How to get router in vue single file component
阿神
阿神 2017-07-05 10:48:49
0
3
806
 

I would like to ask, how can I obtain the router and implement programmatic navigation?

阿神
阿神

闭关修行中......

reply all (3)
扔个三星炸死你

this.$router

    某草草

    See component injection for details

    $router: router instance.
    $route: currently activated routing information object.

      Peter_Zhu
      this.$router.push({path:'a'})
        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!