Vue路由History mode模式中頁面無法渲染的原因及解決

直入主題

修改mode之後,鏈接就不需要帶#號了

const router = new VueRouter({
  mode: 'history',
  routes: [...]
})

nginx配置

location /wx/ {
  try_files $uri $uri/ /wx/index.html;
}

 

發佈了109 篇原創文章 · 獲贊 27 · 訪問量 20萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章