在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ vue單頁應(yīng)用如何給動態(tài)路由的頁面添加meta頭和預(yù)渲染?

vue單頁應(yīng)用如何給動態(tài)路由的頁面添加meta頭和預(yù)渲染?

vue單頁應(yīng)用如何給動態(tài)路由的頁面添加meta頭和預(yù)渲染?

我現(xiàn)在使用的是prerender-spa-plugin和vue-meta-info對頁面進(jìn)行預(yù)渲染和添加meta

現(xiàn)在存在兩個問題:
1.prerender-spa-plugin不能渲染動態(tài)路由
2.webpack配置項中未配置的路由頁面渲染出來的內(nèi)容都是跟首頁一樣的

回答
編輯回答
枕頭人

給動態(tài)路由頁面渲染meta頭用vue-meta
預(yù)渲染是指預(yù)先渲染好html?可以看看prerender-spa-plugin,它會用一個無頭瀏覽器根據(jù)你的路由渲染頁面后返回..

Prerendering is basically firing up a headless browser, loading your app's routes, and saving the results to a static HTML file.
2018年2月13日 08:40