ScopedSlots usage of vue, how to display scope slots?

use scopedSlots to display scope slots, through the following code:

               <div id="K7">
                    <u-component>
                    <template slot-scope="props">
                    

2

</template> </u-component> </div> <script> Vue.component("u-component",{ render: function (createElement) { return createElement("div", [ createElement("child", { scopedSlots: { default: function (props) { return createElement("span", props.text) } } }) ]) }, data:function(){ return {text:"nvjs"} } }) new Vue({ el:"-sharpK7" }) </script>

but there is no display in the browser, how to use it correctly to display the value of text?

Mar.28,2021

render (h) {

  return  h('div',{},this.$scopedSlots.default({text:this.text})])  

}


landlord, you have not solved this problem

Menu