mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-12 09:03:53 +00:00
92018e586b
[release]
81 lines
1.4 KiB
Vue
81 lines
1.4 KiB
Vue
<template>
|
|
<div>
|
|
<ul>
|
|
<li>
|
|
<n-link to="/">
|
|
Fetch
|
|
</n-link>
|
|
</li>
|
|
<li>
|
|
<n-link to="/fetch-client">
|
|
Fetch on client
|
|
</n-link>
|
|
</li>
|
|
<li>
|
|
<n-link to="/fetch-conditional">
|
|
Fetch conditional
|
|
</n-link>
|
|
</li>
|
|
<li>
|
|
<n-link to="/fetch-error">
|
|
Fetch error
|
|
</n-link>
|
|
</li>
|
|
<li>
|
|
<n-link to="/fetch-delay">
|
|
Fetch delay
|
|
</n-link>
|
|
</li>
|
|
<li>
|
|
<n-link to="/fetch-button">
|
|
Fetch button
|
|
</n-link>
|
|
</li>
|
|
<li>
|
|
<n-link to="/fetch-root">
|
|
Fetch in root click handler
|
|
</n-link>
|
|
</li>
|
|
<li>
|
|
<n-link to="/fetch-component">
|
|
Fetch in component
|
|
</n-link>
|
|
</li>
|
|
<li>
|
|
<n-link to="/fetch-deep">
|
|
Fetch with deep update updates
|
|
</n-link>
|
|
</li>
|
|
<li>
|
|
<n-link to="/old-fetch">
|
|
Deprecated fetch
|
|
</n-link>
|
|
</li>
|
|
<li>
|
|
<n-link to="/nested/item">
|
|
Nested fetch
|
|
</n-link>
|
|
</li>
|
|
</ul>
|
|
foo-bar-{{ foo }}
|
|
<nuxt />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'DefaultLayout',
|
|
data () {
|
|
return {
|
|
foo: 'bar'
|
|
}
|
|
},
|
|
async fetch () {
|
|
await new Promise((resolve) => {
|
|
this.foo = 'baz'
|
|
resolve()
|
|
})
|
|
}
|
|
}
|
|
</script>
|