mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-01 09:57:14 +00:00
23 lines
286 B
Vue
23 lines
286 B
Vue
|
<template>
|
||
|
<div>
|
||
|
<p>{{ text }}</p>
|
||
|
</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>
|