Grape UI-gitee page链接

tools:Vue-3.0.0、Vite-1.0.0-RC.4 、VueRouter4.0.0-beta.3、Gitee page

先抛结果,createWebHistorycreateWebHashHistory二者差异导致的。

一开始,我用的createWebHistory,在本地yarn devhs dist -c-1都没问题,部署到gitee page上network请求也都是200,可#app里没东西,控制台也不报错,如图:
记VueRouter4.0.0-beta.3在gitee page上的使用问题
调试过程中,页面的表现也前后不太一致。在main.ts中添加console.log调试,一开始mount前的log可以执行、mount后的代码不执行,可是我在usemount中间添加log后,连更新两次,log全执行了。
记VueRouter4.0.0-beta.3在gitee page上的使用问题
在APP里加了些其他内容,APP页面的其他内容显示了,但<router-view/>里的东西还是不出来,我把空标签展开,然后把路由模式改为createWebHashHistory,就好了,就调试有点玄,本地能用,gitee上没法用。

相关文章:

  • 2021-12-09
  • 2021-12-24
  • 2021-12-25
  • 2022-12-23
  • 2021-08-08
  • 2021-09-15
  • 2021-08-21
  • 2022-12-23
猜你喜欢
  • 2021-06-15
  • 2021-12-23
  • 2021-07-24
  • 2021-11-15
  • 2021-11-03
  • 2021-10-14
  • 2021-04-09
相关资源
相似解决方案