From e1467b19874294a9a36dcfb06083081f9d4b504d Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期四, 05 十一月 2020 11:32:16 +0800
Subject: [PATCH] 上传组件回复至三方原始包,数据栈根据文件夹动态传入资源类型;联动刷新底图修复

---
 src/components/subComponents/FileUpload/btn.vue |   27 ++++++++++++---------------
 1 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/src/components/subComponents/FileUpload/btn.vue b/src/components/subComponents/FileUpload/btn.vue
index 750ad79..9eccf99 100644
--- a/src/components/subComponents/FileUpload/btn.vue
+++ b/src/components/subComponents/FileUpload/btn.vue
@@ -27,25 +27,22 @@
         return {}
       }
     },
-
-  },
-  watch: {
-    attrs: {
-      handler(n, o) {
-        //this.$nextTick(() => {
-          if(n){
-            this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, n)
-          }
-          
-        //})
-      },
-      deep: true
+    sourceType: {
+      type: Number,
     }
   },
+ 
   mounted() {
     this.$nextTick(() => {
-      console.log('attrs', this.attrs)
-      this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, this.attrs)
+      console.log('btn attrs', this.attrs)
+      console.log("btn sourceType", this.sourceType)
+      let props = {accept:''};
+      if(this.sourceType == 1){
+        props.accept = '.mp4';
+      }else if(this.sourceType == 2){
+        props.accept = '.jpg,.jpeg,.png';
+      }
+      this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, props)
     })
   }
 }

--
Gitblit v1.8.0