Commit 3c12d4b0a95e502437bcf556857656104ef7a772

Authored by ww
1 parent 17be408f

fix: 修复组态大屏上传组件无法预览缩略图

... ... @@ -47,7 +47,7 @@
47 47 transformFile?: (file: File) => string | Blob | Promise<string | Blob | File>;
48 48 api: (file: string | Blob | Promise<string | Blob | File>) => Promise<FileItem>;
49 49 overFileLimitHiddenUploadEntry?: boolean;
50   - beforeUpload: (file: File, fileList: File[]) => boolean;
  50 + beforeUpload?: (file: File, fileList: File[]) => boolean;
51 51 }>(),
52 52 {
53 53 fileList: () => [],
... ... @@ -146,7 +146,7 @@
146 146 :remove="handleRemove"
147 147 >
148 148 <Spin
149   - v-if="!(fileList.length >= getMaxFileLimit) || overFileLimitHiddenUploadEntry"
  149 + v-if="!(fileList.length >= getMaxFileLimit && overFileLimitHiddenUploadEntry)"
150 150 :spinning="loading"
151 151 >
152 152 <div class="w-full h-full flex flex-col justify-center content-center">
... ...
... ... @@ -91,7 +91,7 @@ export const formSchema: FormSchema[] = [
91 91 valueField: 'fileList',
92 92 componentProps: () => {
93 93 return {
94   - // listType: 'picture-card',
  94 + listType: 'picture-card',
95 95 maxFileLimit: 1,
96 96 api: async (file: File) => {
97 97 try {
... ...
... ... @@ -57,7 +57,7 @@ export const formSchema: FormSchema[] = [
57 57 valueField: 'fileList',
58 58 componentProps: () => {
59 59 return {
60   - // listType: 'picture-card',
  60 + listType: 'picture-card',
61 61 maxFileLimit: 1,
62 62 api: async (file: File) => {
63 63 try {
... ...