From 3e998850b5c4af147a60ed0b86b47379fc9eb1f2 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期四, 16 六月 2022 15:42:33 +0800 Subject: [PATCH] bei bei ke --- src/components/subComponents/FileUpload/btn.vue | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/components/subComponents/FileUpload/btn.vue b/src/components/subComponents/FileUpload/btn.vue index d624a23..7ff2b0e 100644 --- a/src/components/subComponents/FileUpload/btn.vue +++ b/src/components/subComponents/FileUpload/btn.vue @@ -27,22 +27,21 @@ return {} } }, - - }, - watch: { - attrs: { - handler(n, o) { - //this.$nextTick(() => { - this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, n) - //}) - }, - deep: true + sourceType: { + type: Number, } }, + mounted() { this.$nextTick(() => { - console.log('attrs', this.attrs) - this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, this.attrs) + 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) }) } } @@ -63,6 +62,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