mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
refactor(front): update onFileHandle prop to use config instead of data for improved clarity
This commit is contained in:
@@ -8,7 +8,7 @@ import FileShareHandle from '~/components/Preprocessing/FileShareHandle.vue';
|
||||
const props = defineProps<{
|
||||
hide: () => void
|
||||
file: File
|
||||
onFileHandle: ({ data, type }: { data: any, type: string }) => void
|
||||
onFileHandle: ({ type, config }: { type: string, config: any }) => void
|
||||
}>()
|
||||
|
||||
const isImage = computed(() => props.file.type.startsWith('image/'))
|
||||
|
||||
@@ -6,7 +6,7 @@ import FormButton from '../Field/FormButton.vue';
|
||||
const props = defineProps<{
|
||||
hide: () => void
|
||||
file: File
|
||||
onFileHandle: ({ data, type }: { data: any, type: string }) => void
|
||||
onFileHandle: ({ type, config }: { type: string, config: any }) => void
|
||||
}>()
|
||||
|
||||
</script>
|
||||
@@ -42,7 +42,7 @@ const props = defineProps<{
|
||||
<InputField v-if="!!values.has_download_notify" name="download_notify_email" placeholder="请输入邮箱" />
|
||||
</div>
|
||||
<FormButton @click="(form) => {
|
||||
onFileHandle({ data: form?.values?.value, type: 'file-share' })
|
||||
onFileHandle({ type: 'file-share', config: values })
|
||||
hide()
|
||||
}">提交</FormButton>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user