I have a Vue.js component which builds the content of an svg element dynamically. For simplicity's sake, say the content is <circle cx="50" cy="50" r="60" />
The component does so by manipulating a data variable named svg:
data() {
return {
svg: '<circle cx="50" cy="50" r="60" />',
foobar: 'foobar',
};
},
I have some specific svg element customizations (i.e. width, height, viewBox) in the parent component. How do I render this out in the template in a "raw" form?
<template>
<svg v-html="svg"></svg>
</template>
will add the svg element which I don't want