New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same slot content for multiple template slots #9288

Closed
yamsellem opened this Issue Jan 8, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@yamsellem
Copy link

yamsellem commented Jan 8, 2019

I guess, this is a new feature; Is there a way to set the same content for multiple slots without copy pasting?

So this:

<base-layout>
  <template slot="option">
    <span :class="'flag-icon-' + props.option.toLowerCase()" />{{ countriesByCode[props.option] }}
  </template>

  <template slot="singleLabel">
    <span :class="'flag-icon-' + props.option.toLowerCase()" />{{ countriesByCode[props.option] }}
  </template>
</base-layout>

Could be written that way:

<base-layout>
  <template slot="['option', 'singleLabel']">
    <span :class="'flag-icon-' + props.option.toLowerCase()" />{{ countriesByCode[props.option] }}
  </template>
</base-layout>

Thanks a lot.

@vue-bot

This comment has been minimized.

Copy link
Contributor

vue-bot commented Jan 8, 2019

Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!

@vue-bot vue-bot closed this Jan 8, 2019

@yamsellem yamsellem changed the title Multiple slot name for one template Same slot content for multiple template slots Jan 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment