refactor(front): update FormButton click handlers to support async functionality

This commit is contained in:
keven1024
2025-05-15 11:15:29 +08:00
parent d2d11ef9d8
commit dca8799f04
3 changed files with 3 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ const props = defineProps<{
rules="required" />
</div>
</div>
<FormButton @click="(form) => {
<FormButton @click="async (form) => {
onFileHandle({ type: 'file-share', config: values })
hide()
}">提交</FormButton>

View File

@@ -9,7 +9,7 @@ const emit = defineEmits<{
(e: 'change', key: string): void
}>()
const handleFormSubmit = (form: any) => {
const handleFormSubmit = async (form: any) => {
const { file } = form?.values || {}
showDrawer({
render: ({ hide }) => h(FileShareDrawer, {

View File

@@ -26,7 +26,7 @@ import { cx } from 'class-variance-authority'
</Button>
</div>
<div class="flex flex-row gap-3">
<FormButton @click="(form) => {
<FormButton @click="async (form) => {
const { text } = form?.values || {}
showDrawer({ render: ({ hide }) => h(TextShareDrawer, { hide, text }) })
}">