Browse Source

附件组件修改

wangwei 3 years ago
parent
commit
a9838ec195
1 changed files with 5 additions and 1 deletions
  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) {