Explorar o código

附件组件修改

wangwei %!s(int64=3) %!d(string=hai) anos
pai
achega
a9838ec195
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      src/components/Form/src/components/upload/UploadFile.vue

+ 5 - 1
src/components/Form/src/components/upload/UploadFile.vue

@@ -103,12 +103,16 @@
           files.map((item) => {
             urls.push(item.url);
           });
-          state.fileUrls += ',' + urls.toString();
+          if (state.fileUrls) {
+            state.fileUrls += ',';
+          }
+          state.fileUrls += urls.toString();
         }
         emit('change', state.fileUrls);
       }
 
       watch(props, (props: PropsType) => {
+        state.fileUrls = props.value;
         state.file_list = props.value.split(',');
       });
       function getFilename(filePath) {