例如,我有一个模板和其他一些 <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>"
不起作用。也许有一种方法可以在另一个地方渲染我的组件?在计算区域...还是在方法中?
那么,如何在 html data-*attributes 中渲染组件?
谢谢。
最佳答案
关于javascript - 如何在 VueJS 中将组件渲染为数据属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51537327/