mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-06-03 07:32:33 +08:00
修复图片上传bug
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
:close-on-click-modal="false"
|
||||
width="500px"
|
||||
:modal="false"
|
||||
:before-close="handleClose"
|
||||
@close="handleClose"
|
||||
>
|
||||
<div class="file-list p-4">
|
||||
<template v-for="(item, index) in fileList" :key="index">
|
||||
@@ -44,6 +44,7 @@ import useUserStore from '@/stores/modules/user'
|
||||
import config from '@/config'
|
||||
import feedback from '@/utils/feedback'
|
||||
import type { ElUpload } from 'element-plus'
|
||||
import { RequestCodeEnum } from '@/enums/requestEnums'
|
||||
export default defineComponent({
|
||||
components: {},
|
||||
props: {
|
||||
@@ -87,7 +88,7 @@ export default defineComponent({
|
||||
|
||||
const handleProgress = (event: any, file: any, fileLists: any[]) => {
|
||||
visible.value = true
|
||||
fileList.value = fileLists
|
||||
fileList.value = toRaw(fileLists)
|
||||
}
|
||||
|
||||
const handleSuccess = (response: any, file: any, fileLists: any[]) => {
|
||||
@@ -95,9 +96,9 @@ export default defineComponent({
|
||||
if (allSuccess) {
|
||||
uploadRefs.value?.clearFiles()
|
||||
visible.value = false
|
||||
emit('change')
|
||||
}
|
||||
emit('change')
|
||||
if (response.code == 0 && response.show && response.msg) {
|
||||
if (response.code == RequestCodeEnum.FAILED && response.msg) {
|
||||
feedback.msgError(response.msg)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user