handleBeforeUpload (file, fileList) { return new Promise(async (resolve, reject) => { const imageReg = /\.(gif|jpg|jpeg|png|webp|GIF|JPG|JPEG|PNG|WEBP)$/ this.getFileWidthAndHeight(file) console.log(‘handleBeforeUpload...‘, this.params, file) if (imageReg.test(file.name)) { return this.GetUploadSinature(this.params).then(() => resolve()) } const errText = ‘请选择图片上传‘ this.$message.error(errText) // eslint-disable-next-line prefer-promise-reject-errors reject() }) },