mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +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}`))
|
||
|
}
|