first commit
This commit is contained in:
50
src/App.vue
50
src/App.vue
@@ -1,29 +1,35 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<div id="nav">
|
||||
<router-link to="/">Home</router-link> |
|
||||
<router-link to="/about">About</router-link>
|
||||
</div>
|
||||
<router-view/>
|
||||
<NavBar :activeType="type" @setType="setType"></NavBar>
|
||||
<section class="section">
|
||||
<TimeWindows :activeWindow="window" @setWindow="setWindow" ></TimeWindows>
|
||||
<Chart :window="window" :type="type"></Chart>
|
||||
</section>
|
||||
</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;
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar'
|
||||
import TimeWindows from '@/components/TimeWindows'
|
||||
import Chart from '@/components/Chart'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
TimeWindows,
|
||||
Chart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: {},
|
||||
window: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setType(type) {
|
||||
this.type = type
|
||||
},
|
||||
setWindow(window) {
|
||||
this.window = window
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user