First init

This commit is contained in:
saplf
2018-09-28 15:20:43 +08:00
commit a8fabb15fd
27 changed files with 332 additions and 0 deletions

29
src/App.vue Normal file
View File

@@ -0,0 +1,29 @@
<template>
<div id="app">
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</div>
<router-view/>
</div>
</template>
<style lang="scss">
#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>

BIN
src/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

15
src/main.js Normal file
View File

@@ -0,0 +1,15 @@
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { app } from './services'
Vue.config.productionTip = false
Vue.config.devtools = app.dev
Vue.config.performance = !app.dev
new Vue({
router,
store,
render: h => h(App),
}).$mount('#app')

23
src/router.js Normal file
View File

@@ -0,0 +1,23 @@
import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'home',
component: Home,
},
{
path: '/about',
name: 'about',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import('./views/About.vue'),
},
],
})

3
src/services/app.js Normal file
View File

@@ -0,0 +1,3 @@
export default {
dev: process.env.NODE_ENV === 'development',
}

1
src/services/index.js Normal file
View File

@@ -0,0 +1 @@
export { default as app } from './app'

8
src/store/chain.js Normal file
View File

@@ -0,0 +1,8 @@
import Vuex from 'vuex'
export default new Vuex.Store({
state: {},
mutations: {},
actions: {},
getters: {},
})

15
src/store/index.js Normal file
View File

@@ -0,0 +1,15 @@
import Vue from 'vue'
import Vuex from 'vuex'
import chain from './chain'
import market from './market'
import network from './network'
import owner from './owner'
Vue.use(Vuex)
export default new Vuex.Store({
chain,
owner,
market,
network,
})

8
src/store/market.js Normal file
View File

@@ -0,0 +1,8 @@
import Vuex from 'vuex'
export default new Vuex.Store({
state: {},
mutations: {},
actions: {},
getters: {},
})

8
src/store/network.js Normal file
View File

@@ -0,0 +1,8 @@
import Vuex from 'vuex'
export default new Vuex.Store({
state: {},
mutations: {},
actions: {},
getters: {},
})

8
src/store/node.js Normal file
View File

@@ -0,0 +1,8 @@
import Vuex from 'vuex'
export default new Vuex.Store({
state: {},
mutations: {},
actions: {},
getters: {},
})

8
src/store/owner.js Normal file
View File

@@ -0,0 +1,8 @@
import Vuex from 'vuex'
export default new Vuex.Store({
state: {},
mutations: {},
actions: {},
getters: {},
})

5
src/views/About.vue Normal file
View File

@@ -0,0 +1,5 @@
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
</template>

11
src/views/Home.vue Normal file
View File

@@ -0,0 +1,11 @@
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png" />
</div>
</template>
<script>
export default {
name: 'Home',
}
</script>