Commit 2c1bf08c authored by Zhang Xiaojie's avatar Zhang Xiaojie

initial

parent 058c4e67
fns_backend @ c84a2ba9
Subproject commit c84a2ba954da258491acb4cdada0c7f8513510eb
<template> <template>
<div id="app"> <div id="app">
<div id="nav"> <router-view/>
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</div>
<router-view/>
</div> </div>
</template> </template>
<style lang="less"> <style lang="less">
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
#nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
}
}
}
</style> </style>
...@@ -5,19 +5,19 @@ import Home from '../views/Home.vue' ...@@ -5,19 +5,19 @@ import Home from '../views/Home.vue'
Vue.use(VueRouter) Vue.use(VueRouter)
const routes: Array<RouteConfig> = [ const routes: Array<RouteConfig> = [
{ // {
path: '/', // path: '/',
name: 'Home', // name: 'Home',
component: Home // component: Home
}, // },
{ // {
path: '/about', // path: '/about',
name: 'About', // name: 'About',
// route level code-splitting // // route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route // // this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited. // // which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue') // component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
} // }
] ]
const router = new VueRouter({ const router = new VueRouter({
......
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
})
</script>
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js + TypeScript App"/>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import HelloWorld from '@/components/HelloWorld.vue'; // @ is an alias to /src
export default Vue.extend({
name: 'Home',
components: {
HelloWorld,
},
});
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment