我正在尝试获取根路由中的GET参数。我从文档中读到,我需要_id.vue文件来做这件事,我把它放在和'index.vue‘相同的级别。在index.vue中,我有:
GET
_id.vue
index.vue
beforeMount () { console.log(this.$route); }
我正在尝试使用URL中的params来访问它,但this.$route.params为空。
this.$route.params
https://stackoverflow.com/questions/55696178
相似问题