Cristiano Magro
2025-01-05 20827a1da0db1bce02767505fa1c0a77cd25ba62
gestione slot non valorizzato

con una condizione nascondo il pezzo
2 files modified
13 ■■■■■ changed files
09 - deeper into components/cmp-adv-01-starting-setup/src/components/BadgeList.vue 4 ●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-01-starting-setup/src/components/BaseCard.vue 9 ●●●● patch | view | raw | blame | history
09 - deeper into components/cmp-adv-01-starting-setup/src/components/BadgeList.vue
@@ -1,9 +1,9 @@
<template>
  <section>
    <base-card>
      <template v-slot:header>
      <!-- <template v-slot:header>
        <h2>Available Badges</h2>
      </template>
      </template> -->
      <template v-slot:default>
        <ul>
          <li>
09 - deeper into components/cmp-adv-01-starting-setup/src/components/BaseCard.vue
@@ -1,7 +1,9 @@
<template>
    <div>
        <header>
            <slot name="header"></slot>
        <header v-if="$slots.header">
            <slot name="header">
                <!-- <h2>Default Title </h2> -->
            </slot>
        </header>
        <slot></slot>
    </div>
@@ -9,6 +11,9 @@
<script>
export default {
    mounted() {
        console.log(this.$slots);
    }
}
</script>