vue 访问路径
路由问题
vue/cli 构建的项目,配置路由后,访问不到,需要在 端口号后加入 #
- 错误访问: http://172.16.9.67:8080/about/3
- 正确访问:http://172.16.9.67:8080/#/about/3
如果不需要 # 号
则 在路由 index 中添加mode: "history
const router = new VueRouter({ mode: "history", routes, });
vue/cli 构建的项目,配置路由后,访问不到,需要在 端口号后加入 #
mode: "historyconst router = new VueRouter({ mode: "history", routes, });