From e5cd37f56567a800c78eae86c11de98f5cdd8dec Mon Sep 17 00:00:00 2001 From: hanbaoshan <hanbaoshan@aiotlink.com> Date: 星期日, 29 十一月 2020 21:38:04 +0800 Subject: [PATCH] 调整左侧目录树及滚动条的宽度 --- 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