Skip to content

Commit ef2f0ae

Browse files
author
luft.liu
committed
Commit Code-Pop#1:
Rename Home.vue to EventList.vue Customize route for EventList Update About.vue Reconfigure About route
1 parent ec12c4c commit ef2f0ae

File tree

4 files changed

+86
-93
lines changed

4 files changed

+86
-93
lines changed

package-lock.json

Lines changed: 79 additions & 83 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div id="app">
33
<div id="nav">
4-
<router-link to="/">Home</router-link> |
4+
<router-link to="/">Events</router-link> |
55
<router-link to="/about">About</router-link>
66
</div>
77
<router-view />

src/router/index.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
import { createRouter, createWebHistory } from 'vue-router'
2-
import Home from '../views/Home.vue'
2+
import EventList from '../views/EventList.vue'
3+
import About from '../views/About.vue'
34

45
const routes = [
56
{
67
path: '/',
7-
name: 'Home',
8-
component: Home
8+
name: 'EventList',
9+
component: EventList
910
},
1011
{
1112
path: '/about',
1213
name: 'About',
13-
// route level code-splitting
14-
// this generates a separate chunk (about.[hash].js) for this route
15-
// which is lazy-loaded when the route is visited.
16-
component: () =>
17-
import(/* webpackChunkName: "about" */ '../views/About.vue')
14+
component: About
1815
}
1916
]
2017

src/views/About.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
22
<div class="about">
3-
<h1>This is an about page</h1>
3+
<h1>A site for events to better the world.</h1>
44
</div>
55
</template>

0 commit comments

Comments
 (0)