I building a ponent to convert all icons to SVG.
So, at the end of my code I have this:
return createElement('i',
'<SVG>CODE</SVG>'
)
Where is this SPAN, I should add a dynamic HTML! I could not find any option to do it. This HTML will be an SVG, so, for this reason, I need to add the full HTML.
Somebody had the same problem? What is missing?? How to make this as new HTML, when my ponent is running???
ps: I dont need to know how to create a SVG file, but yes, how render the HTML, that can be anyone, inside of my dynamic ponent.
Thanks
I building a ponent to convert all icons to SVG.
So, at the end of my code I have this:
return createElement('i',
'<SVG>CODE</SVG>'
)
Where is this SPAN, I should add a dynamic HTML! I could not find any option to do it. This HTML will be an SVG, so, for this reason, I need to add the full HTML.
Somebody had the same problem? What is missing?? How to make this as new HTML, when my ponent is running???
ps: I dont need to know how to create a SVG file, but yes, how render the HTML, that can be anyone, inside of my dynamic ponent.
Thanks
Share Improve this question edited Jul 24, 2018 at 16:01 Quentin 945k132 gold badges1.3k silver badges1.4k bronze badges asked Jul 24, 2018 at 15:15 Cesar CabralCesar Cabral 3414 silver badges13 bronze badges 6- stackoverflow./q/3492322 – IVO GELOV Commented Jul 24, 2018 at 15:19
- I already have my SVG content. I just need to find a way to render my HTML as HTML and as STRING. – Cesar Cabral Commented Jul 24, 2018 at 15:20
-
Perhaps like this
<div v-html="my_svg_string"></div><div>{{ my_svg_string }}</div>
? – IVO GELOV Commented Jul 24, 2018 at 15:22 -
Have you looked at
v-html
? – zero298 Commented Jul 24, 2018 at 15:23 - is a dynamic element. I think that I can't do that. I found what I need. I should add an attribute: domProps: {innerHTML: this.data} – Cesar Cabral Commented Jul 24, 2018 at 15:53
1 Answer
Reset to default 8I found a solution!
return createElement('i', {
domProps: {
innerHTML: this.data
}
}
)
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744057671a4551201.html
评论列表(0条)