fix: 修复前端类型错误 (#1653)

This commit is contained in:
shaohuzhang1 2024-11-19 15:10:12 +08:00 committed by GitHub
parent 6801a24c38
commit 119bba030b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 5 deletions

View File

@ -39,9 +39,12 @@ interface chatType {
record_id: string record_id: string
chat_id: string chat_id: string
vote_status: string vote_status: string
status?: number, status?: number
execution_details: any[] execution_details: any[]
upload_meta?: any[] upload_meta?: {
document_list: Array<any>
image_list: Array<any>
}
} }
export class ChatRecordManage { export class ChatRecordManage {

View File

@ -88,7 +88,7 @@ const delOption = (index: number) => {
formValue.value.option_list.splice(index, 1) formValue.value.option_list.splice(index, 1)
} }
const formField = computed(() => { const formField = computed(() => {
return getData() return { field: '', ...getData() }
}) })
const getData = () => { const getData = () => {
return { return {

View File

@ -63,6 +63,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, onMounted } from 'vue' import { computed, onMounted } from 'vue'
import RadioRow from '@/components/dynamics-form/items/radio/RadioRow.vue' import RadioRow from '@/components/dynamics-form/items/radio/RadioRow.vue'
import type { FormField } from '@/components/dynamics-form/type'
const props = defineProps<{ const props = defineProps<{
modelValue: any modelValue: any
}>() }>()
@ -87,8 +88,8 @@ const delOption = (index: number) => {
} }
formValue.value.option_list.splice(index, 1) formValue.value.option_list.splice(index, 1)
} }
const formField = computed(() => { const formField = computed<FormField>(() => {
return getData() return { field: '', ...getData() }
}) })
const getData = () => { const getData = () => {
return { return {