Sebelum pengubahsuaian
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
});
Adakah sebab mengapa url yang diubah suai mempunyai # tambahan?
vue-router dokumen-sejarah konfigurasi hujung belakang