Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<template>
<div id="app" v-if="model">
<TopMenu v-bind:user="model.user" />
<div class="container">
<Main v-bind:model="model" />
</div>
</div>
</template>
<script>
import TopMenu from './components/TopMenu.vue'
import Main from './components/Main.vue'
import client from 'api-client'
export default {
name: 'app',
components: {
TopMenu,
Main
},
data: function() {
return {
model: null
}
},
mounted: function() {
client
.fetchMainModel()
.then(model => this.$data.model = model);
}
}
</script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
</style>