Nuxt/examples/dynamic-layouts/pages/about.vue

18 lines
298 B
Vue
Raw Normal View History

2017-03-17 17:03:12 +00:00
<template>
<div>
<p>Hi from {{ name }}</p>
<nuxt-link to="/">Home page</nuxt-link>
</div>
</template>
<script>
export default {
layout: ({ isMobile }) => isMobile ? 'mobile' : 'default',
2017-10-31 13:43:55 +00:00
asyncData({ req }) {
2017-03-17 17:03:12 +00:00
return {
name: req ? 'server' : 'client'
}
}
}
</script>