Showing
15 changed files
with
244 additions
and
0 deletions
| 1 | +# test1 | ||
| 2 | + | ||
| 3 | +## Project setup | ||
| 4 | +``` | ||
| 5 | +npm install | ||
| 6 | +``` | ||
| 7 | + | ||
| 8 | +### Compiles and hot-reloads for development | ||
| 9 | +``` | ||
| 10 | +npm run serve | ||
| 11 | +``` | ||
| 12 | + | ||
| 13 | +### Compiles and minifies for production | ||
| 14 | +``` | ||
| 15 | +npm run build | ||
| 16 | +``` | ||
| 17 | + | ||
| 18 | +### Run your tests | ||
| 19 | +``` | ||
| 20 | +npm run test | ||
| 21 | +``` | ||
| 22 | + | ||
| 23 | +### Lints and fixes files | ||
| 24 | +``` | ||
| 25 | +npm run lint | ||
| 26 | +``` | ||
| 27 | + | ||
| 28 | +### Customize configuration | ||
| 29 | +See [Configuration Reference](https://cli.vuejs.org/config/). | ... | ... |
package-lock.json
0 → 100644
This diff could not be displayed because it is too large.
package.json
0 → 100644
| 1 | +{ | ||
| 2 | + "name": "test1", | ||
| 3 | + "version": "0.1.0", | ||
| 4 | + "private": true, | ||
| 5 | + "scripts": { | ||
| 6 | + "serve": "vue-cli-service serve", | ||
| 7 | + "build": "vue-cli-service build", | ||
| 8 | + "lint": "vue-cli-service lint" | ||
| 9 | + }, | ||
| 10 | + "dependencies": { | ||
| 11 | + "vue": "^2.5.21", | ||
| 12 | + "vue-router": "^3.0.1", | ||
| 13 | + "vuex": "^3.0.1" | ||
| 14 | + }, | ||
| 15 | + "devDependencies": { | ||
| 16 | + "@vue/cli-plugin-babel": "^3.3.0", | ||
| 17 | + "@vue/cli-plugin-eslint": "^3.3.0", | ||
| 18 | + "@vue/cli-service": "^3.3.0", | ||
| 19 | + "@vue/eslint-config-standard": "^4.0.0", | ||
| 20 | + "babel-eslint": "^10.0.1", | ||
| 21 | + "eslint": "^5.8.0", | ||
| 22 | + "eslint-plugin-vue": "^5.0.0", | ||
| 23 | + "less": "^3.0.4", | ||
| 24 | + "less-loader": "^4.1.0", | ||
| 25 | + "vue-template-compiler": "^2.5.21" | ||
| 26 | + } | ||
| 27 | +} |
public/favicon.ico
0 → 100644
No preview for this file type
public/index.html
0 → 100644
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html lang="en"> | ||
| 3 | + <head> | ||
| 4 | + <meta charset="utf-8"> | ||
| 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
| 6 | + <meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
| 7 | + <link rel="icon" href="<%= BASE_URL %>favicon.ico"> | ||
| 8 | + <title>test1</title> | ||
| 9 | + </head> | ||
| 10 | + <body> | ||
| 11 | + <noscript> | ||
| 12 | + <strong>We're sorry but test1 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> | ||
| 13 | + </noscript> | ||
| 14 | + <div id="app"></div> | ||
| 15 | + <!-- built files will be auto injected --> | ||
| 16 | + </body> | ||
| 17 | +</html> |
src/App.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div id="app"> | ||
| 3 | + <div id="nav"> | ||
| 4 | + <router-link to="/">Home</router-link> | | ||
| 5 | + <router-link to="/about">About</router-link> | ||
| 6 | + </div> | ||
| 7 | + <router-view/> | ||
| 8 | + </div> | ||
| 9 | +</template> | ||
| 10 | + | ||
| 11 | +<style lang="less"> | ||
| 12 | +#app { | ||
| 13 | + font-family: 'Avenir', Helvetica, Arial, sans-serif; | ||
| 14 | + -webkit-font-smoothing: antialiased; | ||
| 15 | + -moz-osx-font-smoothing: grayscale; | ||
| 16 | + text-align: center; | ||
| 17 | + color: #2c3e50; | ||
| 18 | +} | ||
| 19 | +#nav { | ||
| 20 | + padding: 30px; | ||
| 21 | + a { | ||
| 22 | + font-weight: bold; | ||
| 23 | + color: #2c3e50; | ||
| 24 | + &.router-link-exact-active { | ||
| 25 | + color: #42b983; | ||
| 26 | + } | ||
| 27 | + } | ||
| 28 | +} | ||
| 29 | +</style> |
src/assets/logo.png
0 → 100644
6.69 KB
src/components/HelloWorld.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="hello"> | ||
| 3 | + <h1>{{ msg }}</h1> | ||
| 4 | + <p> | ||
| 5 | + For a guide and recipes on how to configure / customize this project,<br> | ||
| 6 | + check out the | ||
| 7 | + <a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>. | ||
| 8 | + </p> | ||
| 9 | + <h3>Installed CLI Plugins</h3> | ||
| 10 | + <ul> | ||
| 11 | + <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li> | ||
| 12 | + <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li> | ||
| 13 | + </ul> | ||
| 14 | + <h3>Essential Links</h3> | ||
| 15 | + <ul> | ||
| 16 | + <li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li> | ||
| 17 | + <li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li> | ||
| 18 | + <li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li> | ||
| 19 | + <li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li> | ||
| 20 | + <li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li> | ||
| 21 | + </ul> | ||
| 22 | + <h3>Ecosystem</h3> | ||
| 23 | + <ul> | ||
| 24 | + <li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li> | ||
| 25 | + <li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li> | ||
| 26 | + <li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li> | ||
| 27 | + <li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li> | ||
| 28 | + <li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li> | ||
| 29 | + </ul> | ||
| 30 | + </div> | ||
| 31 | +</template> | ||
| 32 | + | ||
| 33 | +<script> | ||
| 34 | +export default { | ||
| 35 | + name: 'HelloWorld', | ||
| 36 | + props: { | ||
| 37 | + msg: String | ||
| 38 | + } | ||
| 39 | +} | ||
| 40 | +</script> | ||
| 41 | + | ||
| 42 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | ||
| 43 | +<style scoped lang="less"> | ||
| 44 | +h3 { | ||
| 45 | + margin: 40px 0 0; | ||
| 46 | +} | ||
| 47 | +ul { | ||
| 48 | + list-style-type: none; | ||
| 49 | + padding: 0; | ||
| 50 | +} | ||
| 51 | +li { | ||
| 52 | + display: inline-block; | ||
| 53 | + margin: 0 10px; | ||
| 54 | +} | ||
| 55 | +a { | ||
| 56 | + color: #42b983; | ||
| 57 | +} | ||
| 58 | +</style> |
src/main.js
0 → 100644
src/router.js
0 → 100644
| 1 | +import Vue from 'vue' | ||
| 2 | +import Router from 'vue-router' | ||
| 3 | +import Home from './views/Home.vue' | ||
| 4 | + | ||
| 5 | +Vue.use(Router) | ||
| 6 | + | ||
| 7 | +export default new Router({ | ||
| 8 | + routes: [ | ||
| 9 | + { | ||
| 10 | + path: '/', | ||
| 11 | + name: 'home', | ||
| 12 | + component: Home | ||
| 13 | + }, | ||
| 14 | + { | ||
| 15 | + path: '/about', | ||
| 16 | + name: 'about', | ||
| 17 | + // route level code-splitting | ||
| 18 | + // this generates a separate chunk (about.[hash].js) for this route | ||
| 19 | + // which is lazy-loaded when the route is visited. | ||
| 20 | + component: () => import(/* webpackChunkName: "about" */ './views/About.vue') | ||
| 21 | + } | ||
| 22 | + ] | ||
| 23 | +}) |
src/store.js
0 → 100644
src/views/About.vue
0 → 100644
src/views/Home.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="home"> | ||
| 3 | + <img alt="Vue logo" src="../assets/logo.png"> | ||
| 4 | + <HelloWorld msg="Welcome to Your Vue.js App"/> | ||
| 5 | + </div> | ||
| 6 | +</template> | ||
| 7 | + | ||
| 8 | +<script> | ||
| 9 | +// @ is an alias to /src | ||
| 10 | +import HelloWorld from '@/components/HelloWorld.vue' | ||
| 11 | + | ||
| 12 | +export default { | ||
| 13 | + name: 'home', | ||
| 14 | + components: { | ||
| 15 | + HelloWorld | ||
| 16 | + } | ||
| 17 | +} | ||
| 18 | +</script> |
-
Please register or login to post a comment