Nuxt/examples/dynamic-layouts/pages/about.vue
2017-10-31 21:43:55 +08:00

18 lines
298 B
Vue

<template>
<div>
<p>Hi from {{ name }}</p>
<nuxt-link to="/">Home page</nuxt-link>
</div>
</template>
<script>
export default {
layout: ({ isMobile }) => isMobile ? 'mobile' : 'default',
asyncData({ req }) {
return {
name: req ? 'server' : 'client'
}
}
}
</script>