lengziyu / noteBook

This is my noteBook.
0 stars 0 forks source link

nuxt笔记 #29

Open lengziyu opened 5 years ago

lengziyu commented 5 years ago

1.动态路由获取参数,如:

'/list/:id' ==>  '/list/123'

接收:

async asyncData ({ app, query }) {
  app.context.params.id
}

2.?获取参数,如:

'/list?id=123'

接收:

async asyncData ({ app, query }) {
  query.id
}