Я использую router.push для изменения маршрута, он работает, но:
router.push({path:'xxx'}
результат в моем браузере показывает, что это «# (hash) mode push»,адрес выглядит так:
localhost:8080/index/xxx#
как я могу сделать push без # (хеш), например:
localhost:8080/index/xxx
я уже установил режим: 'history' in 'router.js '
const router = new Router({
mode: 'history',
base: proc...
извините, мой плохой английский
вот мой код:
методы: {
changeIdx (item) {
console.log(
this.currentURL.slice(0, this.currentURL.lastIndexOf('/') + 1) + this.urlStore[item]
)
this.$router.push(
this.currentURL.slice(0, this.currentURL.lastIndexOf('/') + 1) + this.urlStore[item]
)
}
в консоли: console.log
в браузере: адрес в браузере