Nuxt/examples/vue-class-component/pages/index.vue

19 lines
327 B
Vue
Raw Normal View History

2017-04-14 14:47:21 +00:00
<template>
<Child :env="env" />
2017-04-14 14:47:21 +00:00
</template>
<script>
import Vue from 'vue'
import Component from 'nuxt-class-component'
import Child from '@/components/Child'
2017-04-14 14:47:21 +00:00
@Component({
components: { Child }
})
2017-04-14 14:47:21 +00:00
export default class App extends Vue {
2017-10-31 13:43:55 +00:00
asyncData({ req }) {
2017-04-14 14:47:21 +00:00
return { env: req ? 'server' : 'client' }
}
}
</script>