vue-router 设置 history 模式
vue-router 默认为 hash 模式,使用默认的 hash 模式,浏览器 URL 地址中会有一个 #,如果有需求要讲#去掉就将vue-router 设置 history 模式
const router = new Router({
mode: 'history',
routes: [......]
})
vue-router 默认为 hash 模式,使用默认的 hash 模式,浏览器 URL 地址中会有一个 #,如果有需求要讲#去掉就将vue-router 设置 history 模式
const router = new Router({
mode: 'history',
routes: [......]
})
本文标题:如何将vue项目中地址上的#去掉
本文链接:https://www.haomeiwen.com/subject/cfdjnhtx.html
网友评论