在router文件夹下的index.js中的router实例中添加mode属性,值设置为history

export default new Router({
  mode:"history",//去除哈希值的#号
  routes
})

 使用这种模式需要后端的配合,如果没有后端的配合在打包的时候页面会是空白的。一般还是使用hash模式

相关文章:

  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
猜你喜欢
  • 2022-12-23
  • 2021-12-07
  • 2022-02-17
  • 2022-01-12
  • 2022-12-23
  • 2022-01-17
相关资源
相似解决方案