show text in progress only when slot is given

This commit is contained in:
taehoon 2019-04-25 04:22:34 -04:00
parent f4a16e6541
commit e9e6daa76e
1 changed files with 2 additions and 5 deletions

View File

@ -1,9 +1,6 @@
<template>
<button
:disabled="progress || disabled"
@click="onClick"
>
<template v-if="progress">
<button :disabled="progress || disabled" @click="onClick">
<template v-if="progress && !!$slots.progress">
<slot name="progress" />
</template>
<template v-else>