Browse Source

skeleton

dependabot/npm_and_yarn/webpack-bundle-analyzer-3.6.0
Alexey Velikiy 7 years ago
parent
commit
0076e160c3
  1. 3
      package.json
  2. 14
      src/App.vue
  3. 16
      src/components/1-circle-mount.vue
  4. 53
      src/components/Hello.vue
  5. 58
      src/components/index.vue
  6. 4
      src/main.js
  7. 8
      src/router/demos.js
  8. 17
      src/router/index.js

3
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",

14
src/App.vue

@ -1,18 +1,13 @@
<template>
<div id="app">
<img src="./assets/logo.png">
<hello></hello>
<h1> D3.js vs Vue.js templates </h1>
<router-view></router-view>
</div>
</template>
<script>
import Hello from './components/Hello'
export default {
name: 'app',
components: {
Hello
}
name: 'app'
}
</script>
@ -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;
}
</style>

16
src/components/1-circle-mount.vue

@ -0,0 +1,16 @@
<template>
<div>aaaa</div>
</template>
<script>
export default {
name: 'hello',
data () {
return {}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>

53
src/components/Hello.vue

@ -1,53 +0,0 @@
<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://gitter.im/vuejs/vue" target="_blank">Gitter 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: 'hello',
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>

58
src/components/index.vue

@ -0,0 +1,58 @@
<template>
<div class="hello">
<ul>
<li v-for="item in itemz">
<a :href="item.path | hashed">{{ item.name }}</a>
</li>
</ul>
</div>
</template>
<script>
import { routes } from 'router/demos'
export default {
name: 'hello',
data () {
return {
itemz: routes
}
},
filters: {
hashed: function (value) {
if (!value) return ''
return '#' + value;
}
}
}
</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;
margin: auto;
width: 150px;
}
li {
/*display: inline-block;*/
margin: 0 0px;
list-style: decimal
}
a {
color: blue;
display: block;
text-decoration: none;
text-align: left;
}
a:hover {
text-decoration: underline;;
}
</style>

4
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: '<App/>',
components: { App }
})

8
src/router/demos.js

@ -0,0 +1,8 @@
export const routes = [
{
name: 'Circle mount',
path: '/1-circle-mount',
component: require('components/1-circle-mount')
}
]

17
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
]
})
Loading…
Cancel
Save