Answer the question
In order to leave comments, you need to log in
Why can't register the component?
One of the Vue components has text where placeholders (character sequences ### or @@@ ) are replaced with the corresponding component.
computed: {
processedHtml () {
let html = this.content.replaceAll('###', '<b-form-input type="text" size="sm" :name="name"></b-form-input>').replaceAll('@@@', '<gap></gap>');
return {
template: '<div>' + html + '</div>'
}
}
}
<template>
<component v-bind:is="processedHtml"></component>
</template>
<template>
<gap></gap>
</template>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question