mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-08 07:31:09 +08:00
fix(oss): 修正文件上传和图片上传模态框中的文件列表类型
将fileList从字符串数组类型改为字符串类型,并在清空时赋值为空字符串而非空数组
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user