How to define v-if in vue createElement

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
                            }
                        })]);
                    },
May.31,2022

vue-render-element-with-directive


can't even write the basic js.

createElement(
  "div", 
  {},
  [
   createElement("iframe"),
   self.spinShow ? createElement('Spin') : null
  ]
)
Menu