diff --git a/package.json b/package.json index 4873388..fac693e 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "build": "node build/build.js" }, "dependencies": { - "vue": "^2.1.10" + "vue": "^2.1.10", + "vue-router": "^2.2.0" }, "devDependencies": { "autoprefixer": "^6.7.2", diff --git a/src/App.vue b/src/App.vue index a4dd50d..136c754 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,18 +1,13 @@ @@ -22,7 +17,6 @@ export default { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-align: center; - color: #2c3e50; - margin-top: 60px; + margin-top: 30px; } diff --git a/src/components/1-circle-mount.vue b/src/components/1-circle-mount.vue new file mode 100644 index 0000000..ea3c77d --- /dev/null +++ b/src/components/1-circle-mount.vue @@ -0,0 +1,16 @@ + + + + + + diff --git a/src/components/Hello.vue b/src/components/Hello.vue deleted file mode 100644 index 2d80539..0000000 --- a/src/components/Hello.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - diff --git a/src/components/index.vue b/src/components/index.vue new file mode 100644 index 0000000..47c9183 --- /dev/null +++ b/src/components/index.vue @@ -0,0 +1,58 @@ + + + + + + diff --git a/src/main.js b/src/main.js index ac000a6..d25f5b4 100644 --- a/src/main.js +++ b/src/main.js @@ -1,11 +1,13 @@ // 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 App from './app' +import router from './router' /* eslint-disable no-new */ new Vue({ el: '#app', + router, template: '', components: { App } }) diff --git a/src/router/demos.js b/src/router/demos.js new file mode 100644 index 0000000..df6a947 --- /dev/null +++ b/src/router/demos.js @@ -0,0 +1,8 @@ + +export const routes = [ + { + name: 'Circle mount', + path: '/1-circle-mount', + component: require('components/1-circle-mount') + } +] diff --git a/src/router/index.js b/src/router/index.js new file mode 100644 index 0000000..0b45949 --- /dev/null +++ b/src/router/index.js @@ -0,0 +1,17 @@ +import Vue from 'vue' +import Router from 'vue-router' +import Index from 'components/index' +import {routes as demoRoutes} from './demos' + +Vue.use(Router) + +export default new Router({ + routes: [ + { + path: '/', + name: 'Index', + component: Index + }, ... demoRoutes + + ] +})