压缩图片的递归方法
authJob(n){ if (n<=0) { return }else{ this.rpc.load.authJob(this.fileList[n-1].raw) .then((res) => { this.outerFileList.push(res) if (n-1==0) { this.$emit("fromchild", this.outerFileList); console.log(this.outerFileList,"-------wenjijan"); this.outerFileList = [] this.$refs.uploadImport.clearFiles(); this.dialogVisible = false; this.loading=false return } // this.fileCountSuccess++ // this.fileList.push(res); // console.log(this.fileCountBefore,"qian"); // console.log(this.fileCountSuccess,"完"); // if(this.fileCountBefore==this.fileCountSuccess){ // this.loading=false // } return this.authJob(n-1) }) .catch((err) => { // this.$refs.uploadImport.uploadFiles.splice(idx, 1) }); } },