mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-04-06 18:23:14 +08:00
fix(oss): 修正文件上传和图片上传模态框中的文件列表类型
将fileList从字符串数组类型改为字符串类型,并在清空时赋值为空字符串而非空数组
This commit is contained in:
@@ -7,14 +7,14 @@ import { FileUpload } from '#/components/upload';
|
|||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
|
|
||||||
const fileList = ref<string[]>([]);
|
const fileList = ref<string>('');
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
onOpenChange: (isOpen) => {
|
onOpenChange: (isOpen) => {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (fileList.value.length > 0) {
|
if (fileList.value.length > 0) {
|
||||||
fileList.value = [];
|
fileList.value = '';
|
||||||
emit('reload');
|
emit('reload');
|
||||||
modalApi.close();
|
modalApi.close();
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ import { ImageUpload } from '#/components/upload';
|
|||||||
|
|
||||||
const emit = defineEmits<{ reload: [] }>();
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
|
|
||||||
const fileList = ref<string[]>([]);
|
const fileList = ref<string>('');
|
||||||
const [BasicModal, modalApi] = useVbenModal({
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
onOpenChange: (isOpen) => {
|
onOpenChange: (isOpen) => {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (fileList.value.length > 0) {
|
if (fileList.value.length > 0) {
|
||||||
fileList.value = [];
|
fileList.value = '';
|
||||||
emit('reload');
|
emit('reload');
|
||||||
modalApi.close();
|
modalApi.close();
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user