mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-15 18:34:50 +00:00
8 lines
219 B
TypeScript
8 lines
219 B
TypeScript
|
import { asyncData } from '@nuxt/app'
|
||
|
|
||
|
export { default as NuxtContent } from './content.vue'
|
||
|
|
||
|
export function useContent (slug) {
|
||
|
return asyncData(`content:${slug}`, () => globalThis.$fetch(`/api/content${slug}`))
|
||
|
}
|