Open PadreSVK opened 1 year ago
I have the same problem
Personally for me working the following (Composition API Vue3):
For custom components that should be declared like
components: { WelcomeItem }
I use
this._app.component("WelcomeItem", WelcomeItem);
(It's better to use lowercase letter with "-" like "welcome-item")
And for instances that will be returned from setup() method:
<v-runtime-template v-if="contentTemplate" :template="contentTemplate" :template-props="templateProps"></v-runtime-template>
...
let templateProps = ref();
...
templateProps.value = result;
...
return result = { active, loading, contentTemplate, templateProps }
So now you can use active, loading and component WelcomeItem inside your templete.
Hi, first of all thanks for your work 🎉
I am trying to use this library to dynamically render vuejs components, but I am not able to use custom components.
by my understanding it should use
components
from parentOptions (I suppose that vue is doing some optimalization here)Repro repository: https://github.com/PadreSVK/vue3-runtime-template-parent-elements-issue