The code is as shown below:
cbutton is a custom component. In case 1, it is normal without any problem. In case 2, v-html can only render native components.
2 requires dynamic output. Does this situation need to be solved by using render? What about jsx?
I have never used the render function, please help me
淡淡烟草味2017-06-28 09:30:58
The official document clearly states that v-html can only render pure html
The first method has been written out. Wouldn’t it be better if you set up a template and directly traverse the nodes?
<template v-for="e in arr">
<cbutton :type="e.type" :msg="e.msg">
</template>