1. Want to use vue"s createElement to generate a template that contains v-if?
2. The dom you want to generate
var pureComponent = $Vue.component("pure-component", {
data() {
return {
showSpin: true
}
},
render: function (createElement) {
var self = this;
return createElement("div", {}, [createElement("iframe", {
attrs: {
id: "customMenuIframe",
src: svgUrl,
frameborder: 0,
seamless: true
},
style: {
width: "100%",
height: "100%",
minHeight: "848px"
}
}), createElement("Spin", {
props: {
size: "large",
fix: true,
"v-if": self.spinShow // v-if
}
})]);
},