From b036dae92aeed291930f0efd8cf276499ebfb882 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期五, 25 六月 2021 19:03:22 +0800
Subject: [PATCH] 修复用户权限获取方式错误的bug
---
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