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?