首页
mac
it
登录
6mi
u
盘
搜
搜 索
it
vue-cli生成项目地址去掉#号
vue-cli生成项目地址去掉#号
mac
2025-09-09
29
vue的路由在默认的hash模式下,url会带有一个# 去掉的话加上mode: 'history', 板成history模式就可以了 如果改变之后样式出现问题可以把./换成/
修改前:
<
link rel
=
"stylesheet"
href
=
"./static/css/base.css"
>
修改后:
<
link rel
=
"stylesheet"
href
=
"/static/css/base.css"
>
转载请注明原文地址: https://mac.8miu.com/read-506358.html
最新回复
(
0
)