Nuxt/test/fixtures/full-static-with-preview/pages/with-component.vue

24 lines
313 B
Vue
Raw Normal View History

<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>