toby/resources/js/Shared/ActionButton.vue
Adrian Hopek 636e83b71f #90 - wip
2022-04-13 14:48:56 +02:00

19 lines
341 B
Vue

<template>
<InertiaLink
as="button"
:onStart="() => processing = true"
:onFinish="() => processing = false"
:onBefore="() => ! processing"
>
<slot />
</InertiaLink>
</template>
<script setup>
import { ref, watch } from 'vue'
let processing = ref(false)
watch(processing, (value) => console.log(value))
</script>