file: initialize default Vue2 file

This commit is contained in:
Leon Xu committed 2022-04-06 20:18:21 -07:00
1 parent ef0e031ebf
commit fd65bff339
15 files changed
+20148

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
<template>
<div id="app">
<nav>
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</nav>
<router-view/>
</div>
</template>
<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>
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

+10
View File
@@ -0,0 +1,10 @@
import Vue from 'vue'
import App from './App.vue'
import router from './router'
Vue.config.productionTip = false
new Vue({
router,
render: h => h(App)
}).$mount('#app')
+21
View File
@@ -0,0 +1,21 @@
import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";
Vue.use(VueRouter);
const routes = [
{
path: "/",
name: "home",
component: HomeView,
},
];
const router = new VueRouter({
mode: "history",
base: process.env.BASE_URL,
routes,
});
export default router;
+12
View File
@@ -0,0 +1,12 @@
<template>
<div class="home"></div>
</template>
<script>
// @ is an alias to /src
export default {
name: "HomeView",
components: {},
};
</script>