vue default slot
Vue Tricks - Passing Slots to Child Components
Vue Tricks - Passing Slots to Child Components
Vue Tricks - Passing Slots to Child Components vue default slot According to the vue2 docs you can but do not have to specify the default slot in a template My test is as follows: import { shallowMount } from @vuetest vue slot props 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
vue slot props template> script> import buttonHelper from ' components' export default { name: 'App', components: { 'button-helper'
vue slotscope Vue slots have a lot more features, but you can see how they're inspired by the Web Components spec Default Slots If you're putting content in Let's start with the default slot When you do not specify any name in your slot, Vue will do it for you and call it “default ” In the example