From 149b22dc62c85a5668f24073210ac5c0b1955520 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期一, 23 五月 2022 19:12:44 +0800
Subject: [PATCH] 添加基础应用的编译规则
---
src/components/subComponents/FileUpload/btn.vue | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/src/components/subComponents/FileUpload/btn.vue b/src/components/subComponents/FileUpload/btn.vue
index 45248b8..0bffa02 100644
--- a/src/components/subComponents/FileUpload/btn.vue
+++ b/src/components/subComponents/FileUpload/btn.vue
@@ -26,23 +26,21 @@
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)
+ 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)
})
}
}
@@ -63,6 +61,6 @@
outline: none;
}
.uploader-btn:hover {
- background-color: rgba(0, 0, 0, 0.08);
+ /* background-color: rgba(0, 0, 0, 0.08); */
}
</style>
--
Gitblit v1.8.0