[英]How can I render component as data attribute in VueJS
例如,我有一个模板和其他一些<my-component>
:
template: '<i data-toggle="popover" data-html="true" data-content="**Here I need render another component in loop**"></i>'
这个
:data-content="<my-component v-for... ></my-component>"
不起作用。 也许有一种方法可以在另一个地方渲染my-component? 在计算区域中...还是在方法中?
因此,如何在html data- * attributes中呈现组件?
谢谢。
您将不得不转换您的组件才能正常工作。 阅读Vue.js渲染功能和Vue.js中的渲染功能组件简介
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.