nuxtjs中如何控制路由渲染

How to control route rendering in nuxtjs

我看了Goldpage,这个可以控制路由渲染

Render Control - You can choose when and where your pages are rendered: one page can be rendered to both HTML and the DOM (classic SSR), another page can be rendered to HTML only (good old plain HTML like in the 90s!), and a third page can be rendered to the DOM only (classic SPA).

现在,我如何在 nuxtjs 中做到这一点?

With NuxtJS you are only able to chose one or the other (at the time of writing this). Their docs do mention Vue SSR vs. Prerendering 这可能对您有所帮助,具体取决于您的预期用例。 SSR 和 SPA 混用不一定实用;它们旨在解决不同的问题。

SSR 旨在通过在将浏览器发送到客户端之前呈现浏览器需要的所有内容来提高搜索引擎优化和页面加载速度。

另一方面,SPA 在客户端呈现并动态呈现内容。

虽然我正在寻找有关此主题的更多信息,但我发现有一个概念 Isomorphic Applications,这听起来像是您在此处针对的内容。