Parcourir la source

修复上传组件首次无法加载回显资源问题

RuoYi il y a 3 ans
Parent
commit
1baa04f459
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      src/components/FileUpload/index.vue
  2. 1 1
      src/components/ImageUpload/index.vue

+ 1 - 1
src/components/FileUpload/index.vue

@@ -95,7 +95,7 @@ watch(() => props.modelValue, val => {
     fileList.value = [];
     return [];
   }
-});
+},{ deep: true, immediate: true });
 
 // 上传前校检格式和大小
 function handleBeforeUpload(file) {

+ 1 - 1
src/components/ImageUpload/index.vue

@@ -105,7 +105,7 @@ watch(() => props.modelValue, val => {
     fileList.value = [];
     return [];
   }
-});
+},{ deep: true, immediate: true });
 
 // 删除图片
 function handleRemove(file, files) {