293293 </div >
294294</template >
295295<script setup lang="ts">
296- import { ref , computed , onMounted , nextTick , watch , type Ref } from ' vue'
296+ import { ref , computed , onMounted , nextTick , reactive , type Ref } from ' vue'
297297import { t } from ' @/locales'
298298import Recorder from ' recorder-core'
299299import TouchChat from ' ./TouchChat.vue'
@@ -429,9 +429,8 @@ const uploadFile = async (file: any, fileList: any) => {
429429 fileList .splice (0 , fileList .length )
430430 return
431431 }
432- fileAllList .value = fileList
433- console .log (fileAllList .value )
434-
432+ const inner = reactive (file )
433+ fileAllList .value .push (inner )
435434 if (! chatId_context .value ) {
436435 const res = await props .openChatId ()
437436 chatId_context .value = res
@@ -446,9 +445,9 @@ const uploadFile = async (file: any, fileList: any) => {
446445 )
447446 : chatAPI .postUploadFile (file .raw , chatId_context .value , ' CHAT' , uploadLoading )
448447 api .then ((ok ) => {
449- file .url = ok .data
448+ inner .url = ok .data
450449 const split_path = ok .data .split (' /' )
451- file .file_id = split_path [split_path .length - 1 ]
450+ inner .file_id = split_path [split_path .length - 1 ]
452451 })
453452 if (! inputValue .value && uploadImageList .value .length > 0 ) {
454453 inputValue .value = t (' chat.uploadFile.imageMessage' )
0 commit comments