mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-02 10:27:15 +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}`))
|
||
|
}
|