Skip to content

should allow multiple default slots in the same template if using v-if #3595

@Centaur

Description

@Centaur
<template>
  <div>
    <slot v-if="slotAlreadyAttached"></slot>
    <div class="ui attached segment" v-else>
      <slot></slot>
    </div>
  <div>
</template

This fails compiling with error template syntax error Duplicate default <slot> found in the same template. The logic is that we can choose to wrap the default slot content in some tag or not under certain condition, such as the slot content itself.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions