项目为VUE,根据需要配置了多页面路由,现在有个问题请教大家:我配置了两个入口文件main.js
(引入index.js
路由),login.js
(引入login.js
路由),两个路由文件均配置'/'路由路径.
现在我在浏览器分别访问以下三个URL:
http://localhost:8099/
http://localhost:8099/index.html#/
http://localhost:8099/login.html#/
均会定向到 http://localhost:8099/login.html#/
如果我要定向到http://localhost:8099/index.html#/
,该怎么设置呢.
另:如果我又加了一个入口文件mobile.js
(引入mobile.js
路由),我如何设置http://localhost:8099/
这个根路径下的定向呢?
又另:现在我访问http://localhost:8099/index.html#/
,发现还加载了login.js导致报错vue.esm.js?6f63:628 [Vue warn]: Cannot find element: #login