add button slot

pull/388/head
lochstar 2020-07-16 14:31:17 +10:00
parent fb2d14ca15
commit c95101d78f
1 changed files with 5 additions and 3 deletions

View File

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