refactor: Migrate the project functionality and optimize the code structure
This commit is contained in:
17
src/components/FormWrapper.vue
Normal file
17
src/components/FormWrapper.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<form @submit="handleSubmit" @reset="handleReset">
|
||||
<slot name="default"></slot>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const emits = defineEmits(['submit', 'reset'])
|
||||
|
||||
const handleReset = () => {
|
||||
emits('reset')
|
||||
}
|
||||
|
||||
const handleSubmit = async () => {
|
||||
emits('submit')
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user