Brotherhood question link: https://codeshelper.com/q/10.
displays the text on the home page by default
http://localhost:8080/Fen
app.vue
<template>
<div id="app">
<Header></Header>
<div class="main">
<keep-alive>
<router-view></router-view>
</keep-alive>
</div>
<Footer></Footer>
</div>
</template>
router/index.js
import Vue from "vue"
import Router from "vue-router"
import Home from "@/components/Home"
import Fen from "@/components/Fen"
import Cart from "@/components/Cart"
import Center from "@/components/Center"
Vue.use(Router)
export default new Router({
mode: "history",
watch: {
"$route" (to, from) {
// data
}
} ,
routes: [
{
path: "/",
name: "Home",
component: Home
},
{
path: "/",
name: "Fen",
component: Fen
},
{
path: "/",
name: "Cart",
component: Cart
},
{
path: "/",
name: "Center",
component: Center
}
]
})