From c99cad106ef5be9f818e45d385dfdcec29ce19e5 Mon Sep 17 00:00:00 2001 From: hanbaoshan <hanbaoshan@aiotlink.com> Date: 星期四, 03 十二月 2020 16:52:24 +0800 Subject: [PATCH] 修复绘制多边形撤销错误的bug --- src/components/subComponents/FileUpload/btn.vue | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/components/subComponents/FileUpload/btn.vue b/src/components/subComponents/FileUpload/btn.vue index 7ea24ff..9eccf99 100644 --- a/src/components/subComponents/FileUpload/btn.vue +++ b/src/components/subComponents/FileUpload/btn.vue @@ -26,11 +26,23 @@ default() { return {} } + }, + sourceType: { + type: Number, } }, + mounted() { this.$nextTick(() => { - 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