Vor der Änderung
let router = new VueRouter({
mode: 'history',
routes: [
{
path: '/',
component: goods
},
{
path: '/goods',
component: goods
},
{
path: '/ratings',
component: ratings
},
{
path: '/seller',
component: seller
}
],
linkActiveClass: 'active'
})
const routes = [{
path: '/',
redirect: '/goods'
}, {
path: '/goods',
component: goods
}, {
path: '/ratings',
component: ratings
}, {
path: '/seller',
component: seller
}];
const router = new VueRouter({
linkActiveClass: 'active',
routes
});
Gibt es einen Grund, warum die geänderte URL ein zusätzliches # hat?
vue-router文档-history后端配置