vue-router 設(shè)置 history 模式
vue-router 默認(rèn)為 hash 模式白修,使用默認(rèn)的 hash 模式,瀏覽器 URL 地址中會(huì)有一個(gè) #,如果有需求要講#去掉就將vue-router 設(shè)置 history 模式
const router = new Router({
mode: 'history',
routes: [......]
})
vue-router 默認(rèn)為 hash 模式白修,使用默認(rèn)的 hash 模式,瀏覽器 URL 地址中會(huì)有一個(gè) #,如果有需求要講#去掉就將vue-router 設(shè)置 history 模式
const router = new Router({
mode: 'history',
routes: [......]
})