Slot and Named Slot in Vue Js
Slot and Named Slot in Vue Js
name name=toggle-name type=checkbox> label for=toggle-name>Include name?label> template v-if=showInput> label for=name>Name
Scoped slots allow you to pass a template to the slot instead of passing a rendered element It's called a scoped slot because although the
vue check if slot has content To inject HTML content into a particular slot, use the slot attribute on any child element to specify the name of the slot All other child elements of the
vue slotscope To access a named slot, we use the $slot instance variable with the slot's name If a slot is unnamed, we specify the name as “default” Syntax: $slot
Regular
price
141.00 ₹ INR
Regular
price
141.00 ₹ INR
Sale
price
141.00 ₹ INR
Unit price
/
per