mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
25 lines
421 B
Vue
25 lines
421 B
Vue
<template>
|
|
<div>
|
|
<p v-if="$fetchState.pending">
|
|
Fetching...
|
|
</p>
|
|
<p v-else-if="$fetchState.error" id="error">
|
|
{{ $fetchState.error.message }}
|
|
</p>
|
|
<pre v-else>{{ team }}</pre>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
async fetch () {
|
|
await new Promise((resolve, reject) => reject(new Error('fetch-error')))
|
|
},
|
|
data () {
|
|
return {
|
|
team: []
|
|
}
|
|
}
|
|
}
|
|
</script>
|