All checks were successful
Docker Deploy / build-and-push (push) Successful in 4m42s
27 lines
451 B
Vue
27 lines
451 B
Vue
<script setup lang="ts">
|
|
defineProps<{
|
|
message: string;
|
|
action: string;
|
|
method?: string;
|
|
class?: string;
|
|
}>();
|
|
|
|
function onSubmit(e: Event) {
|
|
if (!confirm((e.currentTarget as HTMLFormElement).dataset.message!)) {
|
|
e.preventDefault();
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<form
|
|
:method="method || 'POST'"
|
|
:action="action"
|
|
:class="$props.class"
|
|
:data-message="message"
|
|
@submit="onSubmit"
|
|
>
|
|
<slot />
|
|
</form>
|
|
</template>
|