簡體   English   中英

如何在VueJS中將組件呈現為數據屬性

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM