Folders/files nuxt动态路由的结构
Folders/files structure for nuxt Dynamic routes
文件和文件夹应该如何组织才能使 url 像这样:localhost:3000/apps/10/ads/12
10 和 12 是所选应用和所选广告的 ID。
到目前为止,我得到下面的文件夹结构 url :
localhost:3000/apps/10/
我应该如何编辑文件夹结构才能使整个 url 正常工作?
文件夹结构:
pages/
---|apps/
-----|index.vue
-----|_id.vue
您也必须为文件夹使用“_id”架构名称。
例如。 _app
& _ad
:
pages/
---|apps/
-----|index.vue
-----|_app/
-------|index.vue # localhost:3000/apps/10
-------|ads/
---------|_ad.vue # localhost:3000/apps/10/ads/12
或
...
-------|ads/
---------|_ad/
-----------index.vue # localhost:3000/apps/10/ads/12
文件和文件夹应该如何组织才能使 url 像这样:localhost:3000/apps/10/ads/12
10 和 12 是所选应用和所选广告的 ID。
到目前为止,我得到下面的文件夹结构 url :
localhost:3000/apps/10/
我应该如何编辑文件夹结构才能使整个 url 正常工作?
文件夹结构:
pages/
---|apps/
-----|index.vue
-----|_id.vue
您也必须为文件夹使用“_id”架构名称。
例如。 _app
& _ad
:
pages/
---|apps/
-----|index.vue
-----|_app/
-------|index.vue # localhost:3000/apps/10
-------|ads/
---------|_ad.vue # localhost:3000/apps/10/ads/12
或
...
-------|ads/
---------|_ad/
-----------index.vue # localhost:3000/apps/10/ads/12