当前位置: 代码迷 >> 综合 >> Vue路由History mode模式中页面无法渲染的原因及解决
  详细解决方案

Vue路由History mode模式中页面无法渲染的原因及解决

热度:13   发布时间:2024-01-24 22:50:14.0

直入主题

修改mode之后,链接就不需要带#号了

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

nginx配置

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

 

  相关解决方案