#90 - wip
This commit is contained in:
		
							
								
								
									
										18
									
								
								resources/js/Shared/ActionButton.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								resources/js/Shared/ActionButton.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
<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>
 | 
			
		||||
		Reference in New Issue
	
	Block a user