I have the following component with a slot:
{{ someProp }}
I just came across an answer to this in vue forum: slots
The principle is: There is nothing like createElement('slot'..) Instead there is a render function which provides the slotted innerHtml as function: $scopedSlots.default()
Usage:
render: function (createElement) {
const self = this;
return createElement("div", this.$scopedSlots.default());
}
If you want to provide a default in case there is no content given for the slots, you need to code a disctinction yourself and render something else. (The link above holds a more detailed example)
The function returns an array, therefore it can not be used as a root for the render function. It need to be wrapped into single container node like div in the example above.