diff options
Diffstat (limited to 'nezha-fronted/src')
| -rw-r--r-- | nezha-fronted/src/App.vue | 22 | ||||
| -rw-r--r-- | nezha-fronted/src/assets/logo.png | bin | 0 -> 6849 bytes | |||
| -rw-r--r-- | nezha-fronted/src/components/HelloWorld.vue | 113 | ||||
| -rw-r--r-- | nezha-fronted/src/components/common/Home.vue | 13 | ||||
| -rw-r--r-- | nezha-fronted/src/components/common/Login.vue | 13 | ||||
| -rw-r--r-- | nezha-fronted/src/main.js | 15 | ||||
| -rw-r--r-- | nezha-fronted/src/router/index.js | 24 |
7 files changed, 200 insertions, 0 deletions
diff --git a/nezha-fronted/src/App.vue b/nezha-fronted/src/App.vue new file mode 100644 index 000000000..a2a7be584 --- /dev/null +++ b/nezha-fronted/src/App.vue @@ -0,0 +1,22 @@ +<template> + <div id="app"> + <router-view/> + </div> +</template> + +<script> +export default { + name: 'App' +} +</script> + +<style> +#app { + font-family: 'Avenir', Helvetica, Arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-align: center; + color: #2c3e50; + margin-top: 60px; +} +</style> diff --git a/nezha-fronted/src/assets/logo.png b/nezha-fronted/src/assets/logo.png Binary files differnew file mode 100644 index 000000000..f3d2503fc --- /dev/null +++ b/nezha-fronted/src/assets/logo.png diff --git a/nezha-fronted/src/components/HelloWorld.vue b/nezha-fronted/src/components/HelloWorld.vue new file mode 100644 index 000000000..1c19f2a39 --- /dev/null +++ b/nezha-fronted/src/components/HelloWorld.vue @@ -0,0 +1,113 @@ +<template> + <div class="hello"> + <h1>{{ msg }}</h1> + <h2>Essential Links</h2> + <ul> + <li> + <a + href="https://vuejs.org" + target="_blank" + > + Core Docs + </a> + </li> + <li> + <a + href="https://forum.vuejs.org" + target="_blank" + > + Forum + </a> + </li> + <li> + <a + href="https://chat.vuejs.org" + target="_blank" + > + Community Chat + </a> + </li> + <li> + <a + href="https://twitter.com/vuejs" + target="_blank" + > + Twitter + </a> + </li> + <br> + <li> + <a + href="http://vuejs-templates.github.io/webpack/" + target="_blank" + > + Docs for This Template + </a> + </li> + </ul> + <h2>Ecosystem</h2> + <ul> + <li> + <a + href="http://router.vuejs.org/" + target="_blank" + > + vue-router + </a> + </li> + <li> + <a + href="http://vuex.vuejs.org/" + target="_blank" + > + vuex + </a> + </li> + <li> + <a + href="http://vue-loader.vuejs.org/" + target="_blank" + > + vue-loader + </a> + </li> + <li> + <a + href="https://github.com/vuejs/awesome-vue" + target="_blank" + > + awesome-vue + </a> + </li> + </ul> + </div> +</template> + +<script> +export default { + name: 'HelloWorld', + data () { + return { + msg: 'Welcome to Your Vue.js App' + } + } +} +</script> + +<!-- Add "scoped" attribute to limit CSS to this component only --> +<style scoped> +h1, h2 { + font-weight: normal; +} +ul { + list-style-type: none; + padding: 0; +} +li { + display: inline-block; + margin: 0 10px; +} +a { + color: #42b983; +} +</style> diff --git a/nezha-fronted/src/components/common/Home.vue b/nezha-fronted/src/components/common/Home.vue new file mode 100644 index 000000000..f0d9fc9d2 --- /dev/null +++ b/nezha-fronted/src/components/common/Home.vue @@ -0,0 +1,13 @@ +<template> + +</template> + +<script> + export default { + name: "Home.vue" + } +</script> + +<style scoped> + +</style>
\ No newline at end of file diff --git a/nezha-fronted/src/components/common/Login.vue b/nezha-fronted/src/components/common/Login.vue new file mode 100644 index 000000000..135eae90e --- /dev/null +++ b/nezha-fronted/src/components/common/Login.vue @@ -0,0 +1,13 @@ +<template> + +</template> + +<script> + export default { + name: "login" + } +</script> + +<style scoped> + +</style>
\ No newline at end of file diff --git a/nezha-fronted/src/main.js b/nezha-fronted/src/main.js new file mode 100644 index 000000000..417390e28 --- /dev/null +++ b/nezha-fronted/src/main.js @@ -0,0 +1,15 @@ +// The Vue build version to load with the `import` command +// (runtime-only or standalone) has been set in webpack.base.conf with an alias. +import Vue from 'vue' +import App from './App' +import router from './router' + +Vue.config.productionTip = false + +/* eslint-disable no-new */ +new Vue({ + el: '#app', + router, + components: { App }, + template: '<App/>' +}) diff --git a/nezha-fronted/src/router/index.js b/nezha-fronted/src/router/index.js new file mode 100644 index 000000000..2060241d4 --- /dev/null +++ b/nezha-fronted/src/router/index.js @@ -0,0 +1,24 @@ +import Vue from 'vue' +import Router from 'vue-router' + +Vue.use(Router) + +export default new Router({ + routes: [ + { + path: '/', + redirect: '/login' + }, + { + path: '/login', + component: resolve => require(['../components/common/Login.vue'], resolve), + }, + { + path: '/', + name: 'main', + component: resolve => require(['../components/common/Home.vue'], resolve), + children: [ + ] + }, + ] +}) |
