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> <template>
<button <button :disabled="progress || disabled" @click="onClick">
:disabled="progress || disabled" <template v-if="progress && !!$slots.progress">
@click="onClick"
>
<template v-if="progress">
<slot name="progress" /> <slot name="progress" />
</template> </template>
<template v-else> <template v-else>