From a3f357e8a60443b74b64c7479113c68eb35ce1f5 Mon Sep 17 00:00:00 2001 From: ZZJ <10913410+zzj2100@user.noreply.gitee.com> Date: 星期五, 15 七月 2022 19:44:57 +0800 Subject: [PATCH] 控制轮询 --- src/components/subComponents/FileUpload/btn.vue | 41 +++++++++++++++++++++++------------------ 1 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/components/subComponents/FileUpload/btn.vue b/src/components/subComponents/FileUpload/btn.vue index 7ff2b0e..9f9d27b 100644 --- a/src/components/subComponents/FileUpload/btn.vue +++ b/src/components/subComponents/FileUpload/btn.vue @@ -5,9 +5,9 @@ </template> <script> -import { uploaderMixin, supportMixin } from './common/mixins' +import { uploaderMixin, supportMixin } from "./common/mixins"; -const COMPONENT_NAME = 'uploader-btn' +const COMPONENT_NAME = "uploader-btn"; export default { name: COMPONENT_NAME, @@ -15,36 +15,41 @@ props: { directory: { type: Boolean, - default: false + default: false, }, single: { type: Boolean, - default: false + default: false, }, attrs: { type: Object, default() { - return {} - } + return {}; + }, }, sourceType: { type: Number, - } + }, }, - + mounted() { this.$nextTick(() => { - debugger - let props = {accept:''}; - if(this.sourceType == 1){ - props.accept = '.mp4'; - }else if(this.sourceType == 2){ - props.accept = '.jpg,.jpeg,.png'; + debugger; + 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) - }) - } -} + this.uploader.uploader.assignBrowse( + this.$refs.btn, + this.directory, + this.single, + props + ); + }); + }, +}; </script> <style> -- Gitblit v1.8.0