feat: AcfProse
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
fragment AcfProse on GroupAbstractProse_Fields {
|
||||
content
|
||||
}
|
||||
12
wp-content/themes/headless/app/components/acf/AcfProse.vue
Normal file
12
wp-content/themes/headless/app/components/acf/AcfProse.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import type { AcfProseFragment } from "#graphql/types";
|
||||
|
||||
defineProps<{ prose: AcfProseFragment }>();
|
||||
|
||||
const refContent = useTemplateRef("refContent");
|
||||
useProseLinks(refContent);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div ref="refContent" class="prose" v-html="prose.content" />
|
||||
</template>
|
||||
@@ -1,5 +1,7 @@
|
||||
fragment SectionProse on GroupAbstractBuilderSectionsProseLayout {
|
||||
content
|
||||
prose @nonNull {
|
||||
...AcfProse
|
||||
}
|
||||
layout: layoutSettings @nonNull {
|
||||
...AcfLayout
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ defineProps<{ section: SectionProseFragment }>();
|
||||
|
||||
<template>
|
||||
<AcfLayout :layout="section.layout">
|
||||
<div class="prose" v-html="section.content"></div>
|
||||
<AcfProse :prose="section.prose" />
|
||||
</AcfLayout>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user