我读到了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 中做到这一点?
最佳答案
与 NuxtJS您只能选择其中之一(在撰写本文时)。他们的文档确实提到了 Vue SSR vs. Prerendering这可能会对您有所帮助,具体取决于您的预期用例。 SSR 和 SPA 混合使用并不一定实用;它们旨在解决不同的问题。
SSR 旨在通过在发送到客户端之前渲染浏览器所需的所有内容来提高搜索引擎优化和页面加载速度。
另一方面,SPA 在客户端呈现并动态呈现内容。
当我寻找有关此主题的更多信息时,我发现有一个概念 Isomorphic Applications这听起来像是您在这里的目标。
关于javascript - nuxtjs中如何控制路由渲染,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59857816/