Skip to content

Commit 78a0571

Browse files
committed
fix(MDCRenderer): re-render when tags are modified
1 parent f4c8d5f commit 78a0571

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/runtime/components/MDCRenderer.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ export default defineComponent({
8484
const route = $nuxt?.$route || $nuxt?._route
8585
const { mdc } = $nuxt?.$config?.public || {}
8686
87-
const tags = {
87+
const tags = computed(() => ({
8888
...(mdc?.components?.prose && props.prose !== false ? proseComponentMap : {}),
8989
...(mdc?.components?.map || {}),
9090
...toRaw(props.data?.mdc?.components || {}),
9191
...props.components
92-
}
92+
}))
9393
9494
const contentKey = computed(() => {
9595
const components = (props.body?.children || [])
@@ -107,7 +107,7 @@ export default defineComponent({
107107
Object.assign(runtimeData, newData)
108108
})
109109
110-
await resolveContentComponents(props.body, { tags })
110+
await resolveContentComponents(props.body, { tags: tags.value })
111111
112112
function updateRuntimeData(code: string, value: any) {
113113
const lastIndex = code.split('.').length - 1

0 commit comments

Comments
 (0)