如何在nuxtjs中向路由器添加用户名?

I'm working on blog site. And I use nuxtjs and laravel for backend api. The question is how I can define dynamic route with username of users like: ../@{username}/some-post.

  • update:

    1. I use auth-nuxt and active its middleware globaly
    2. I have defined bellow rote:
{path:'/:username',name:'username',组件:   页面(“作者/用户名/index.vue”)}

but when I go to mydev.io/k90mirzaei the page isn't there!

评论