From d7c6e0d1ec18f391243f77eb62bcb111378cb40f Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期一, 21 十二月 2020 10:13:46 +0800
Subject: [PATCH] 修复清空关联设备分组默认选中第一个添加执行条件
---
src/components/subComponents/FileUpload/btn.vue | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/components/subComponents/FileUpload/btn.vue b/src/components/subComponents/FileUpload/btn.vue
index d624a23..9eccf99 100644
--- a/src/components/subComponents/FileUpload/btn.vue
+++ b/src/components/subComponents/FileUpload/btn.vue
@@ -27,22 +27,22 @@
return {}
}
},
-
- },
- watch: {
- attrs: {
- handler(n, o) {
- //this.$nextTick(() => {
- 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