Nuxt/test/fixtures/fetch/pages/fetch-root.vue
renovate[bot] e934da3c36
chore(deps): update devdependency @nuxtjs/eslint-config to v5 (#8345)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Clark Du <clark.duxin@gmail.com>
2020-11-14 17:10:53 +00:00

22 lines
316 B
Vue

<template>
<button @click="$fetch">
fetch {{ foo }}
</button>
</template>
<script>
export default {
data () {
return {
foo: null
}
},
async fetch () {
await new Promise(resolve => setTimeout(resolve, 100))
this.foo = this.$fetch ? 'has fetch' : 'hasn\'t fetch'
}
}
</script>