Reputation: 3738
I'm looking at an existing Vue code base and I am seeing <template>
tags like:
<template #default>
<template #content>
<template #close>
I know each vue component is enclosed in the <template>
tag but I've never seen #default
or #content
embedded within the template tag before. What is the purpose of this? I'm suspecting those #
are customisable but you just have to define them? If that is the case, where would I be able to find it in a vue project? I'm assuming there is a standard location to store files like this in a vue project. Thank you.
Upvotes: 7
Views: 5011
Reputation: 1843
#
in a template
tag is simply shorthand for v-slot:
. See: https://vuejs.org/guide/components/slots.html#named-slots
Upvotes: 11