Skip to content

Commit

Permalink
feat: add binding for external data (#2296)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximepvrt committed Sep 26, 2023
1 parent 0e4b061 commit 4b9b954
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/runtime/components/ContentRendererMarkdown.vue
Expand Up @@ -40,6 +40,11 @@ const props = defineProps({
components: {
type: Object,
default: () => ({})
},
data: {
type: Object,
default: () => ({})
}
})
Expand All @@ -57,7 +62,10 @@ const body = computed(() => {
const data = computed(() => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { body, excerpt, ...data } = props.value
return data
return {
...data,
...props.data
}
})
const mdcComponents = computed(() => {
Expand Down

0 comments on commit 4b9b954

Please sign in to comment.