This is how it is written in the nav.vue component
In main.js
Vue.use(VueRouter);
const routes = [
{ path: '/home', component: Shop },
{ path: '/long', component: LongTerm }
]
const router = new VueRouter({
routes: routes
})
const app = new Vue({
el: '#inner',
render: h => h(Shop)
})
The first page of Shop has been loaded,
Then the router-link reported an error, and the value inside was not displayed
As follows:
Router is mounted into vue
Add a colon before to