search

Home  >  Q&A  >  body text

javascript - Why is there no $route attribute in my project built with vue-cli?

The code is as follows:
main.js

router.js

Login page (login.vue)

Why is there no $route attribute in this here?
Or where can I see the $route attribute...
There is still something wrong with my routing configuration, the page can jump normally, but this attribute cannot be found

PHPzPHPz2751 days ago523

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-05-19 10:12:33

    this.$root.$route
    this.$router

    reply
    0
  • 迷茫

    迷茫2017-05-19 10:12:33

    Try it

    console.log(this.$route)

    reply
    0
  • Cancelreply