Nuxt/examples/vue-class-component/pages/index.vue
2017-10-31 21:43:55 +08:00

19 lines
334 B
Vue

<template>
<Child :env="env" ></Child>
</template>
<script>
import Vue from 'vue'
import Component from 'nuxt-class-component'
import Child from '@/components/Child'
@Component({
components: { Child }
})
export default class App extends Vue {
asyncData({ req }) {
return { env: req ? 'server' : 'client' }
}
}
</script>