vue-router 去掉hash
在地址欄端口後面會帶上一個‘#’ 號,不太友好,那怎麼去除呢?
在router.js 裏面的 new VueRouter 裏面 加 mode:'history'
就可以去掉‘#’ 號了
加上 mode:'history'
號之後 ‘#’ 號就消失了。
vue-router 去掉hash
在地址欄端口後面會帶上一個‘#’ 號,不太友好,那怎麼去除呢?
在router.js 裏面的 new VueRouter 裏面 加 mode:'history'
就可以去掉‘#’ 號了
加上 mode:'history'
號之後 ‘#’ 號就消失了。