From 660bd554d74c81b683e68f7f579db0912e248d36 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期二, 09 十一月 2021 14:15:44 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/web/vue-smart-ai
---
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