Handling default slot on custom component -
Handling default slot on custom component -
As already mentioned, we can mark content with the default value v-slot:default to make it even more clear that the content belongs to the default slot Example
Note: when using the modal-footer slot, the default OK and Cancel buttons will not be present vueTarget, property, A reference to the modal's Vue VM instance Every Vue component has a special $slots object with all of your slots in it The default slot has the key default , and any named slots use their name as
new pg slot Default slots come into play when content needs to be inserted into a child component and the parent component doesn't specify a slot name Providing content to these named slots from our parent component using the v-slot directive By default, when we don't give our slot an explicit