From 28239ff3df23e1c5818aaae30aabd66824ebaabf Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期二, 01 十二月 2020 15:49:48 +0800
Subject: [PATCH] 相机标定新增标注添加id,确定方法更新
---
src/components/subComponents/FileUpload/btn.vue | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/components/subComponents/FileUpload/btn.vue b/src/components/subComponents/FileUpload/btn.vue
index 45248b8..9eccf99 100644
--- a/src/components/subComponents/FileUpload/btn.vue
+++ b/src/components/subComponents/FileUpload/btn.vue
@@ -26,23 +26,23 @@
default() {
return {}
}
+ },
+ sourceType: {
+ type: Number,
}
},
- watch:{
- attrs:{
- handler(n,o){
- debugger
- this.$nextTick(()=>{
- this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, n)
- })
- },
- deep: true
- }
- },
+
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