fix(oss): 修正文件上传和图片上传模态框中的文件列表类型

将fileList从字符串数组类型改为字符串类型,并在清空时赋值为空字符串而非空数组
This commit is contained in:
dap
2026-01-20 11:39:09 +08:00
parent 7b74975819
commit b6afd5fbb8
2 changed files with 4 additions and 4 deletions

View File

@@ -7,14 +7,14 @@ import { FileUpload } from '#/components/upload';
const emit = defineEmits<{ reload: [] }>();
const fileList = ref<string[]>([]);
const fileList = ref<string>('');
const [BasicModal, modalApi] = useVbenModal({
onOpenChange: (isOpen) => {
if (isOpen) {
return null;
}
if (fileList.value.length > 0) {
fileList.value = [];
fileList.value = '';
emit('reload');
modalApi.close();
return null;

View File

@@ -7,14 +7,14 @@ import { ImageUpload } from '#/components/upload';
const emit = defineEmits<{ reload: [] }>();
const fileList = ref<string[]>([]);
const fileList = ref<string>('');
const [BasicModal, modalApi] = useVbenModal({
onOpenChange: (isOpen) => {
if (isOpen) {
return null;
}
if (fileList.value.length > 0) {
fileList.value = [];
fileList.value = '';
emit('reload');
modalApi.close();
return null;