Merge pull request #388 from lochstar/button-slot

Button slot
pull/411/head
Cagatay Civici 2020-07-18 14:47:40 +03:00 committed by GitHub
commit de622bd0a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -1,8 +1,10 @@
<template>
<button :class="buttonClass" v-on="$listeners" type="button" v-ripple>
<span v-if="icon" :class="iconClass"></span>
<span class="p-button-label">{{label||'&nbsp;'}}</span>
<span class="p-badge" v-if="badge" :class="badgeClass">{{badge}}</span>
<slot>
<span v-if="icon" :class="iconClass"></span>
<span class="p-button-label">{{label||'&nbsp;'}}</span>
<span class="p-badge" v-if="badge" :class="badgeClass">{{badge}}</span>
</slot>
</button>
</template>