render span tag only if it has content

This commit is contained in:
taehoon 2019-04-06 13:25:53 -04:00
parent 988849116d
commit 3f5e798de7
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@
<label class="checkbox">
<input type="checkbox" :checked="checked" @change="$emit('change', $event.target.checked)">
<i class="checkbox-indicator" />
<span><slot></slot></span>
<span v-if="!!$slots.default"><slot></slot></span>
</label>
</template>