mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
24 lines
313 B
Vue
24 lines
313 B
Vue
|
<template>
|
||
|
<div>
|
||
|
<p>{{ text }}</p>
|
||
|
<ComponentWithFetch />
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
data () {
|
||
|
return {
|
||
|
text: ''
|
||
|
}
|
||
|
},
|
||
|
fetch () {
|
||
|
this.text = 'page-fetch-called'
|
||
|
|
||
|
if (this.$preview) {
|
||
|
this.text = 'page-fetch-called-in-preview'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|