Render of Vue cannot render children node

use the rendering function of Vue to render html elements. The parent node can render it, but the child node can not.

:
    <script>
    export default {
      props: {
        renderConfig: {
          type: Object,
          required: true
        }
      },
      data() {
        return {}
      },
      render(h) {
        let ele = this.renderElements(h, this.renderConfig)
        console.log(ele)
        return ele
      },
      methods: {
        renderElements(h, renderConfig) {
          if (!h || !renderConfig) {
            return
          }
    
          if (renderConfig.children && renderConfig.children.length) {
            let children = []
    
            for (let element of renderConfig.children) {
              // rendervnode
              children.push(this.renderElements(h, element))
            }
            console.log(children)
            return h(
              renderConfig.tag,
              { ...Object.assign(renderConfig.properties) },
              children
            )
          }
    
          return h(renderConfig.tag, { ...Object.assign(renderConfig.properties) })
        }
      }
    }
    </script>
    props:
    {
            tag: "div",
            properties: {
              attrs: { id: "myDiv", "data-url": "www.abc123.com" },
              domProps: { innerHTML: "Hello, myDiv" },
              on: {
                click: this.handleClick
              }
            },
            children: [
              {
                tag: "label",
                properties: {
                  attrs: { id: "myLabel" },
                  domProps: { innerHTML: ": " }
                }
              },
              {
                tag: "input",
                properties: {
                  attrs: { id: "myInput", value: "hello~~" }
                },
                on: { change: this.handleChange }
              }
            ]
          }

log result of ele:

vnodelog:


DOM:

you can see that the child element (vnode) has a value in renderElements (), but it disappears after render (h). What went wrong?
I have been watching it for a long time, but I really can"t see it.

Mar.21,2021

try domProps: {innerHTML: 'Hello, myDiv'} here, probably because innerHTML overrides the subcomponents


Hello, what is the reason for the rendering of this child node to write recursion? I just experimented that the third parameter of render's createElement can accept child node information.
for example, I have a data structure `let test_div =

{
  'tag': 'div',
  'data': {
    'attrs': {'id': 'div-1'}
  }
  , 'children': [
  {
    'tag': 'div',
    'data': {
      'attrs': {'id': 'div-2'}
    }
    , 'children': [
    {
      'tag': 'div',
      'data': {
        'attrs': {'id': 'div-3'}
      }
      , 'children': []
    }
  ]
  },{
    'tag': 'div',
    'data': {
      'attrs': {'id': 'div-4'}
    }
    , 'children': [
      {
        'tag': 'div',
        'data': {
          'attrs': {'id': 'div-5'}
        }
        , 'children': []
      }
    ]
  }
]
}`
<script>
  export default {
    name: "DomCreate",
    render(createElement){
      return createElement(this.list.tag,{...Object.assign(this.list.data)},this.list.children)
    },
    props:{
      list:Object
    }
  }
</script>

this allows you to render the structure directly.
so did you write this recursion yourself for any special reason?

Menu