Home

Issue: 1991

How to dynamic switch theme

[issue link]

I have a need, I want to create a company offical site, different company has different theme, and when visit one company page, I must specify the compnay id, and get the theme by the id from api (async), then render different UI component by different theme.

for example I visit http://xxxx?company=1 will render the red theme and I visit http://xxxx?company=2 will render the blue theme

so I struct the project like:

pages
  -red
      index.vue
  -blue
      index.vue

but the result is nuxt always root the view page to pages can’t specify a rule, so how can I realize this?

This question is available on Nuxt.js community (#c1767)