lesson 112: use the short hand for named slots

This commit is contained in:
Andreas Zweili 2021-02-07 10:49:19 +01:00
parent cf7b57dfb2
commit f9f5d32d51
2 changed files with 4 additions and 4 deletions

View File

@ -1,9 +1,9 @@
<template> <template>
<section> <section>
<base-card> <base-card>
<template v-slot:header> <h2>Available Badges</h2> </template> <template #header> <h2>Available Badges</h2> </template>
<template v-slot:default> <template #default>
<ul> <ul>
<li> <li>
<base-badge type="admin" caption="ADMIN"></base-badge> <base-badge type="admin" caption="ADMIN"></base-badge>

View File

@ -1,7 +1,7 @@
<template> <template>
<section> <section>
<base-card> <base-card>
<template v-slot:header> <template #header>
<h3>{{ fullName }}</h3> <h3>{{ fullName }}</h3>
<base-badge <base-badge
:type="role" :type="role"
@ -9,7 +9,7 @@
></base-badge> ></base-badge>
</template> </template>
<template v-slot:default> <template #default>
<p>{{ infoText }}</p> <p>{{ infoText }}</p>
</template> </template>
</base-card> </base-card>