123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- ;(function(){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o);},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var __vite_style__=document.createElement('style');__vite_style__.innerHTML="._uploader-section_jyku5_1{margin:.26667rem 0;height:3.86667rem;border:.02667rem dashed #ccc;border-radius:.26667rem;box-sizing:border-box;position:relative}._uploader-section_jyku5_1 ._img-close_jyku5_9{position:absolute;top:.21333rem;right:.26667rem;z-index:99;font-size:.42667rem;background-color:#333;color:#fff;width:.58667rem;height:.58667rem;display:flex;justify-content:center;align-items:center;border-radius:50%}._uploader-section_jyku5_1 ._col-uploader_jyku5_24,._uploader-section_jyku5_1 .van-uploader{width:100%;height:100%;align-items:center;display:flex;justify-content:center}._uploader-section_jyku5_1 .van-uploader__wrapper,._uploader-section_jyku5_1 .van-uploader__input-wrapper{display:flex;align-items:center;justify-content:center;width:inherit;height:inherit}._uploader-section_jyku5_1 ._uploader_jyku5_1{display:flex;align-items:center;justify-content:center;flex-direction:column}._uploader-section_jyku5_1 ._uploader_jyku5_1 ._uploaderText_jyku5_52{font-size:.37333rem;color:#999;margin-top:.21333rem}._uploader-section_jyku5_1 ._uploadImg_jyku5_57{width:100%;height:100%;overflow:hidden}.vue-cropper[data-v-be5e5ddc]{position:relative;width:100%;height:100%;box-sizing:border-box;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;direction:ltr;touch-action:none;text-align:left;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-box[data-v-be5e5ddc],.cropper-box-canvas[data-v-be5e5ddc],.cropper-drag-box[data-v-be5e5ddc],.cropper-crop-box[data-v-be5e5ddc],.cropper-face[data-v-be5e5ddc]{position:absolute;top:0;right:0;bottom:0;left:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cropper-box-canvas img[data-v-be5e5ddc]{position:relative;text-align:left;-webkit-user-select:none;-moz-user-select:none;user-select:none;transform:none;max-width:none;max-height:none}.cropper-box[data-v-be5e5ddc]{overflow:hidden}.cropper-move[data-v-be5e5ddc]{cursor:move}.cropper-crop[data-v-be5e5ddc]{cursor:crosshair}.cropper-modal[data-v-be5e5ddc]{background:rgba(0,0,0,.5)}.cropper-view-box[data-v-be5e5ddc]{display:block;overflow:hidden;width:100%;height:100%;outline:.02667rem solid #39f;outline-color:rgba(51,153,255,.75);-webkit-user-select:none;-moz-user-select:none;user-select:none}.cropper-view-box img[data-v-be5e5ddc]{-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:left;max-width:none;max-height:none}.cropper-face[data-v-be5e5ddc]{top:0;left:0;background-color:#fff;opacity:.1}.crop-info[data-v-be5e5ddc]{position:absolute;left:0;min-width:1.73333rem;text-align:center;color:#fff;line-height:.53333rem;background-color:rgba(0,0,0,.8);font-size:.32rem}.crop-line[data-v-be5e5ddc]{position:absolute;display:block;width:100%;height:100%;opacity:.1}.line-w[data-v-be5e5ddc]{top:-.08rem;left:0;height:.13333rem;cursor:n-resize}.line-a[data-v-be5e5ddc]{top:0;left:-.08rem;width:.13333rem;cursor:w-resize}.line-s[data-v-be5e5ddc]{bottom:-.08rem;left:0;height:.13333rem;cursor:s-resize}.line-d[data-v-be5e5ddc]{top:0;right:-.08rem;width:.13333rem;cursor:e-resize}.crop-point[data-v-be5e5ddc]{position:absolute;width:.21333rem;height:.21333rem;opacity:.75;background-color:#39f;border-radius:100%}.point1[data-v-be5e5ddc]{top:-.10667rem;left:-.10667rem;cursor:nw-resize}.point2[data-v-be5e5ddc]{top:-.13333rem;left:50%;margin-left:-.08rem;cursor:n-resize}.point3[data-v-be5e5ddc]{top:-.10667rem;right:-.10667rem;cursor:ne-resize}.point4[data-v-be5e5ddc]{top:50%;left:-.10667rem;margin-top:-.08rem;cursor:w-resize}.point5[data-v-be5e5ddc]{top:50%;right:-.10667rem;margin-top:-.08rem;cursor:e-resize}.point6[data-v-be5e5ddc]{bottom:-.13333rem;left:-.10667rem;cursor:sw-resize}.point7[data-v-be5e5ddc]{bottom:-.13333rem;left:50%;margin-left:-.08rem;cursor:s-resize}.point8[data-v-be5e5ddc]{bottom:-.13333rem;right:-.10667rem;cursor:se-resize}@media screen and (max-width: 500px){.crop-point[data-v-be5e5ddc]{position:absolute;width:.53333rem;height:.53333rem;opacity:.45;background-color:#39f;border-radius:100%}.point1[data-v-be5e5ddc]{top:-.26667rem;left:-.26667rem}.point2[data-v-be5e5ddc],.point4[data-v-be5e5ddc],.point5[data-v-be5e5ddc],.point7[data-v-be5e5ddc]{display:none}.point3[data-v-be5e5ddc]{top:-.26667rem;right:-.26667rem}.point4[data-v-be5e5ddc]{top:0;left:0}.point6[data-v-be5e5ddc]{bottom:-.26667rem;left:-.26667rem}.point8[data-v-be5e5ddc]{bottom:-.26667rem;right:-.26667rem}}._upbtn_4fh9z_1{width:100%;height:100%}._uploadWarper_4fh9z_5{position:absolute;left:0;right:0;top:0;bottom:0}._bg_4fh9z_12{position:fixed;top:0;height:100vh;width:100%;background-color:#000;left:0;z-index:521}._btn_4fh9z_21{height:8vw;padding:0;line-height:8vw;font-size:4vw;padding:0 3.5vw;border-radius:1.333vw;text-align:center}._btn1_4fh9z_33{height:8vw;line-height:8vw;font-size:4vw;padding:0 4vw;border-radius:1.333vw;text-align:center;background-color:#5b6e96}._img_4fh9z_44{height:8vw;width:8vw;position:absolute;left:calc(50% - 4vw);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAZrElEQVR4Xu1dCbBtRXVdC4SAoggOcR6CCkbjbOKAE2iBqAE0kRLFGUVxiCZGVAzOChogDpiIEAaljEMciBGHoFFU1ERRSo0WGnHAKaJoYrRiuVLr/75Vl/f/e+/0cPoMt3fVrff+f717WLvX7dN9du9NNGkINATWRYANm4ZAQ2B9BBpB2uxoCGyAQCNImx4NgUaQNgcaAmkItBUkDbemtSIINIKsiKHbMNMQaARJw61prQgCjSArYug2zDQEGkHScGtaK4JAI8iKGLoNMw2BRpA03JrWiiDQCFLR0JJ+B8A1wmf3pd8X/+eflivW+5D035pUQqARpDDQkvYEcEsAt1j6ufjdfyshlwJY+/n24v9I/qpEI60OoBEkYxZI2gnAvQAcAOA+gRClSJDRM3wBwPkAPgbgMyR/nFPZKus2gkRaX9KdAewLYD8ABwLYObKKIYp/CsAnTZZAmO8O0YkpttkIsonVJHmv8CAA+wdi3GqKhl7T53MBbPmQ/MEMxtPbEBpBtgOtpF0CKUwMf67bmwWGrfjnC6IEsvxy2O6Mr/VGkGATSTsAOGiJGDcen7l67ZEfuxarygd6bWlCla88QSTdBMATABweTp4mZL7euvpRAGf7Q/I3vbUygYpXliCSfPT6xECOa0/AVkN08cuBKGeR/P4QHRi6zZUjiKTbBFKYHFcf2gATaf9HSyvKFyfS5yLdXBmCSLpTIIYfp/xGu0kaAicBOJHkShwVz54gkrxKPC980qZE01qLgMlhkpgss5ZZE0TSYYEYt5+1FYcb3KcBnETyHcN1od+WZ0kQSfsEYjy6X/g6126/qW+Ej3//GYCfhp/Lv/v/fGq065qP38v4/64JwC8qFx/7fN20cy/6K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S7OdkouwXPGN3jqyidvFLAHiluDg8Pl1YuwNTbq8RJMN6knYKV4DtOu6Ad3b92DOjylzVbwOwJ61jgZkQF5NcyduRuUC2TXopBLfd7JsgJsrCV8o/F7+XII/9tRYfxyH+t/D5Isnv9TSsla22rSAVTS/Jb/AdJM0f720Wvy//1BIBlsnwU5L+d5OKCDSCVAS7NTU9BBpBpmez1uOKCDSCVAS7NTU9BBpBpmez1uOKCDSCVAS7NTU9BBpBpmez1uOKCDSCVAS7NTU9BBpBpmez1uOKCDSCVAS7NTU9BBpBpmez1uOKCDSCVAS7NTU9BBpBpmez1uOKCPw/JjUpXx7VFvoAAAAASUVORK5CYII=);background-size:100% 100%}._btndiv_4fh9z_53{height:13.333vw;color:#fff;justify-content:space-between;display:flex;align-items:center;padding:0 4vw;line-height:13.333vw;font-size:4vw;position:relative}._wrapper_4fh9z_64{height:calc(100vh - 21.333vw);padding:4vw}._wrapper_4fh9z_64 .crop-point{opacity:0;z-index:523}._wrapper_4fh9z_64 .cropper-view-box{outline:.02667rem solid #fff;border:.02667rem solid #fff}._wrapper_4fh9z_64 .vue-cropper{background-color:#000;background-image:none}\n";document.head.appendChild(__vite_style__);System.register(['./vendor-legacy.eeb61cf8.js','./index-legacy.f25f109a4.js','./index-legacy.637f35562.js','./index-legacy.f25f109a15.js','./index-legacy.f25f109a16.js','./index-legacy.1bceca67.js'],function(exports){'use strict';var defineComponent,createElementBlock,withDirectives,vShow,createBaseVNode,normalizeStyle,createCommentVNode,normalizeClass,toDisplayString,openBlock,createVNode,Toast,request$1,useCustomFieldValue,Icon,Image$1,Uploader,postMessage,state,request;return{setters:[function(module){defineComponent=module.d;createElementBlock=module.au;withDirectives=module.av;vShow=module.aw;createBaseVNode=module.ax;normalizeStyle=module.ay;createCommentVNode=module.az;normalizeClass=module.aA;toDisplayString=module.aB;openBlock=module.o;createVNode=module.a;Toast=module.T;request$1=module.aa;useCustomFieldValue=module.aC;Icon=module.u;Image$1=module.I;Uploader=module.a4;},function(){},function(){},function(){},function(){},function(module){postMessage=module.p;state=module.s;request=module.r;}],execute:function execute(){var uploader="_uploader_jyku5_1";var uploaderText="_uploaderText_jyku5_52";var uploadImg="_uploadImg_jyku5_57";var styles$1={"uploader-section":"_uploader-section_jyku5_1","img-close":"_img-close_jyku5_9","col-uploader":"_col-uploader_jyku5_24",uploader:uploader,uploaderText:uploaderText,uploadImg:uploadImg};var index='';var Exif={};Exif.getData=function(img){return new Promise(function(reslove,reject){var obj={};getImageData(img).then(function(data){obj.arrayBuffer=data;obj.orientation=getOrientation(data);reslove(obj);}).catch(function(error){reject(error);});});};function getImageData(img){var data=null;return new Promise(function(reslove,reject){if(img.src){if(/^data\:/i.test(img.src)){data=base64ToArrayBuffer(img.src);reslove(data);}else if(/^blob\:/i.test(img.src)){var fileReader=new FileReader();fileReader.onload=function(e){data=e.target.result;reslove(data);};objectURLToBlob(img.src,function(blob){fileReader.readAsArrayBuffer(blob);});}else{var http=new XMLHttpRequest();http.onload=function(){if(this.status==200||this.status===0){data=http.response;reslove(data);}else{throw"Could not load image";}http=null;};http.open("GET",img.src,true);http.responseType="arraybuffer";http.send(null);}}else{reject("img error");}});}function objectURLToBlob(url,callback){var http=new XMLHttpRequest();http.open("GET",url,true);http.responseType="blob";http.onload=function(e){if(this.status==200||this.status===0){callback(this.response);}};http.send();}function base64ToArrayBuffer(base64){base64=base64.replace(/^data\:([^\;]+)\;base64,/gmi,"");var binary=atob(base64);var len=binary.length;var buffer=new ArrayBuffer(len);var view=new Uint8Array(buffer);for(var i=0;i<len;i++){view[i]=binary.charCodeAt(i);}return buffer;}function getStringFromCharCode(dataView,start,length){var str="";var i;for(i=start,length+=start;i<length;i++){str+=String.fromCharCode(dataView.getUint8(i));}return str;}function getOrientation(arrayBuffer){var dataView=new DataView(arrayBuffer);var length=dataView.byteLength;var orientation;var exifIDCode;var tiffOffset;var firstIFDOffset;var littleEndian;var endianness;var app1Start;var ifdStart;var offset;var i;if(dataView.getUint8(0)===255&&dataView.getUint8(1)===216){offset=2;while(offset<length){if(dataView.getUint8(offset)===255&&dataView.getUint8(offset+1)===225){app1Start=offset;break;}offset++;}}if(app1Start){exifIDCode=app1Start+4;tiffOffset=app1Start+10;if(getStringFromCharCode(dataView,exifIDCode,4)==="Exif"){endianness=dataView.getUint16(tiffOffset);littleEndian=endianness===18761;if(littleEndian||endianness===19789){if(dataView.getUint16(tiffOffset+2,littleEndian)===42){firstIFDOffset=dataView.getUint32(tiffOffset+4,littleEndian);if(firstIFDOffset>=8){ifdStart=tiffOffset+firstIFDOffset;}}}}}if(ifdStart){length=dataView.getUint16(ifdStart,littleEndian);for(i=0;i<length;i++){offset=ifdStart+i*12+2;if(dataView.getUint16(offset,littleEndian)===274){offset+=8;orientation=dataView.getUint16(offset,littleEndian);break;}}}return orientation;}var _export_sfc=function _export_sfc(sfc,props){var target=sfc.__vccOpts||sfc;var _iterator=_createForOfIteratorHelper(props),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _step$value=_slicedToArray(_step.value,2),key=_step$value[0],val=_step$value[1];target[key]=val;}}catch(err){_iterator.e(err);}finally{_iterator.f();}return target;};var _sfc_main=defineComponent({data:function data(){return{w:0,h:0,scale:1,x:0,y:0,loading:true,trueWidth:0,trueHeight:0,move:true,moveX:0,moveY:0,crop:false,cropping:false,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:false,canChangeY:false,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:false,rotate:0,isIos:false,orientation:0,imgs:"",coe:0.2,scaling:false,scalingSet:"",coeStatus:"",isCanShow:true};},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:true},canScale:{type:Boolean,default:true},autoCrop:{type:Boolean,default:false},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:false},fixedNumber:{type:Array,default:function _default(){return[1,1];}},fixedBox:{type:Boolean,default:false},full:{type:Boolean,default:false},canMove:{type:Boolean,default:true},canMoveBox:{type:Boolean,default:true},original:{type:Boolean,default:false},centerBox:{type:Boolean,default:false},high:{type:Boolean,default:true},infoTrue:{type:Boolean,default:false},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:function _default(){return 10;}}},computed:{cropInfo:function cropInfo(){var obj={};obj.top=this.cropOffsertY>21?"-21px":"0px";obj.width=this.cropW>0?this.cropW:0;obj.height=this.cropH>0?this.cropH:0;if(this.infoTrue){var dpr=1;if(this.high&&!this.full){dpr=window.devicePixelRatio;}if(this.enlarge!==1&!this.full){dpr=Math.abs(Number(this.enlarge));}obj.width=obj.width*dpr;obj.height=obj.height*dpr;if(this.full){obj.width=obj.width/this.scale;obj.height=obj.height/this.scale;}}obj.width=obj.width.toFixed(0);obj.height=obj.height.toFixed(0);return obj;},isIE:function isIE(){var isIE=!!window.ActiveXObject||"ActiveXObject"in window;return isIE;},passive:function passive(){return this.isIE?null:{passive:false};}},watch:{img:function img(){this.checkedImg();},imgs:function imgs(val){if(val===""){return;}this.reload();},cropW:function cropW(){this.showPreview();},cropH:function cropH(){this.showPreview();},cropOffsertX:function cropOffsertX(){this.showPreview();},cropOffsertY:function cropOffsertY(){this.showPreview();},scale:function scale(val,oldVal){this.showPreview();},x:function x(){this.showPreview();},y:function y(){this.showPreview();},autoCrop:function autoCrop(val){if(val){this.goAutoCrop();}},autoCropWidth:function autoCropWidth(){if(this.autoCrop){this.goAutoCrop();}},autoCropHeight:function autoCropHeight(){if(this.autoCrop){this.goAutoCrop();}},mode:function mode(){this.checkedImg();},rotate:function rotate(){this.showPreview();if(this.autoCrop){this.goAutoCrop(this.cropW,this.cropH);}else{if(this.cropW>0||this.cropH>0){this.goAutoCrop(this.cropW,this.cropH);}}}},methods:{getVersion:function getVersion(name){var arr=navigator.userAgent.split(" ");var chromeVersion="";var result=0;var reg=new RegExp(name,"i");for(var i=0;i<arr.length;i++){if(reg.test(arr[i]))chromeVersion=arr[i];}if(chromeVersion){result=chromeVersion.split("/")[1].split(".");}else{result=["0","0","0"];}return result;},checkOrientationImage:function checkOrientationImage(img,orientation,width,height){var _this=this;if(this.getVersion("chrome")[0]>=81){orientation=-1;}else{if(this.getVersion("safari")[0]>=605){var safariVersion=this.getVersion("version");if(safariVersion[0]>13&&safariVersion[1]>1){orientation=-1;}}else{var isIos=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(isIos){var version=isIos[1];version=version.split("_");if(version[0]>13||version[0]>=13&&version[1]>=4){orientation=-1;}}}}var canvas=document.createElement("canvas");var ctx=canvas.getContext("2d");ctx.save();switch(orientation){case 2:canvas.width=width;canvas.height=height;ctx.translate(width,0);ctx.scale(-1,1);break;case 3:canvas.width=width;canvas.height=height;ctx.translate(width/2,height/2);ctx.rotate(180*Math.PI/180);ctx.translate(-width/2,-height/2);break;case 4:canvas.width=width;canvas.height=height;ctx.translate(0,height);ctx.scale(1,-1);break;case 5:canvas.height=width;canvas.width=height;ctx.rotate(0.5*Math.PI);ctx.scale(1,-1);break;case 6:canvas.width=height;canvas.height=width;ctx.translate(height/2,width/2);ctx.rotate(90*Math.PI/180);ctx.translate(-width/2,-height/2);break;case 7:canvas.height=width;canvas.width=height;ctx.rotate(0.5*Math.PI);ctx.translate(width,-height);ctx.scale(-1,1);break;case 8:canvas.height=width;canvas.width=height;ctx.translate(height/2,width/2);ctx.rotate(-90*Math.PI/180);ctx.translate(-width/2,-height/2);break;default:canvas.width=width;canvas.height=height;}ctx.drawImage(img,0,0,width,height);ctx.restore();canvas.toBlob(function(blob){var data=URL.createObjectURL(blob);URL.revokeObjectURL(_this.imgs);_this.imgs=data;},"image/"+this.outputType,1);},checkedImg:function checkedImg(){var _this2=this;if(this.img===null||this.img===""){this.imgs="";this.clearCrop();return;}this.loading=true;this.scale=1;this.rotate=0;this.clearCrop();var img=new Image();img.onload=function(){if(_this2.img===""){_this2.$emit("img-load","error");return false;}var width=img.width;var height=img.height;Exif.getData(img).then(function(data){_this2.orientation=data.orientation||1;var max=Number(_this2.maxImgSize);if(!_this2.orientation&&width<max&height<max){_this2.imgs=_this2.img;return;}if(width>max){height=height/width*max;width=max;}if(height>max){width=width/height*max;height=max;}_this2.checkOrientationImage(img,_this2.orientation,width,height);});};img.onerror=function(){_this2.$emit("img-load","error");};if(this.img.substr(0,4)!=="data"){img.crossOrigin="";}if(this.isIE){var xhr=new XMLHttpRequest();xhr.onload=function(){var url=URL.createObjectURL(this.response);img.src=url;};xhr.open("GET",this.img,true);xhr.responseType="blob";xhr.send();}else{img.src=this.img;}},startMove:function startMove(e){e.preventDefault();if(this.move&&!this.crop){if(!this.canMove){return false;}this.moveX=("clientX"in e?e.clientX:e.touches[0].clientX)-this.x;this.moveY=("clientY"in e?e.clientY:e.touches[0].clientY)-this.y;if(e.touches){window.addEventListener("touchmove",this.moveImg);window.addEventListener("touchend",this.leaveImg);if(e.touches.length==2){this.touches=e.touches;window.addEventListener("touchmove",this.touchScale);window.addEventListener("touchend",this.cancelTouchScale);}}else{window.addEventListener("mousemove",this.moveImg);window.addEventListener("mouseup",this.leaveImg);}this.$emit("imgMoving",{moving:true,axis:this.getImgAxis()});this.$emit("img-moving",{moving:true,axis:this.getImgAxis()});}else{this.cropping=true;window.addEventListener("mousemove",this.createCrop);window.addEventListener("mouseup",this.endCrop);window.addEventListener("touchmove",this.createCrop);window.addEventListener("touchend",this.endCrop);this.cropOffsertX=e.offsetX?e.offsetX:e.touches[0].pageX-this.$refs.cropper.offsetLeft;this.cropOffsertY=e.offsetY?e.offsetY:e.touches[0].pageY-this.$refs.cropper.offsetTop;this.cropX="clientX"in e?e.clientX:e.touches[0].clientX;this.cropY="clientY"in e?e.clientY:e.touches[0].clientY;this.cropChangeX=this.cropOffsertX;this.cropChangeY=this.cropOffsertY;this.cropW=0;this.cropH=0;}},touchScale:function touchScale(e){var _this3=this;e.preventDefault();var scale=this.scale;var oldTouch1={x:this.touches[0].clientX,y:this.touches[0].clientY};var newTouch1={x:e.touches[0].clientX,y:e.touches[0].clientY};var oldTouch2={x:this.touches[1].clientX,y:this.touches[1].clientY};var newTouch2={x:e.touches[1].clientX,y:e.touches[1].clientY};var oldL=Math.sqrt(Math.pow(oldTouch1.x-oldTouch2.x,2)+Math.pow(oldTouch1.y-oldTouch2.y,2));var newL=Math.sqrt(Math.pow(newTouch1.x-newTouch2.x,2)+Math.pow(newTouch1.y-newTouch2.y,2));var cha=newL-oldL;var coe=1;coe=coe/this.trueWidth>coe/this.trueHeight?coe/this.trueHeight:coe/this.trueWidth;coe=coe>0.1?0.1:coe;var num=coe*cha;if(!this.touchNow){this.touchNow=true;if(cha>0){scale+=Math.abs(num);}else if(cha<0){scale>Math.abs(num)?scale-=Math.abs(num):scale;}this.touches=e.touches;setTimeout(function(){_this3.touchNow=false;},8);if(!this.checkoutImgAxis(this.x,this.y,scale)){return false;}this.scale=scale;}},cancelTouchScale:function cancelTouchScale(e){window.removeEventListener("touchmove",this.touchScale);},moveImg:function moveImg(e){var _this4=this;e.preventDefault();if(e.touches&&e.touches.length===2){this.touches=e.touches;window.addEventListener("touchmove",this.touchScale);window.addEventListener("touchend",this.cancelTouchScale);window.removeEventListener("touchmove",this.moveImg);return false;}var nowX="clientX"in e?e.clientX:e.touches[0].clientX;var nowY="clientY"in e?e.clientY:e.touches[0].clientY;var changeX,changeY;changeX=nowX-this.moveX;changeY=nowY-this.moveY;this.$nextTick(function(){if(_this4.centerBox){var axis=_this4.getImgAxis(changeX,changeY,_this4.scale);var cropAxis=_this4.getCropAxis();var imgW=_this4.trueHeight*_this4.scale;var imgH=_this4.trueWidth*_this4.scale;var maxLeft,maxTop,maxRight,maxBottom;switch(_this4.rotate){case 1:case-1:case 3:case-3:maxLeft=_this4.cropOffsertX-_this4.trueWidth*(1-_this4.scale)/2+(imgW-imgH)/2;maxTop=_this4.cropOffsertY-_this4.trueHeight*(1-_this4.scale)/2+(imgH-imgW)/2;maxRight=maxLeft-imgW+_this4.cropW;maxBottom=maxTop-imgH+_this4.cropH;break;default:maxLeft=_this4.cropOffsertX-_this4.trueWidth*(1-_this4.scale)/2;maxTop=_this4.cropOffsertY-_this4.trueHeight*(1-_this4.scale)/2;maxRight=maxLeft-imgH+_this4.cropW;maxBottom=maxTop-imgW+_this4.cropH;break;}if(axis.x1>=cropAxis.x1){changeX=maxLeft;}if(axis.y1>=cropAxis.y1){changeY=maxTop;}if(axis.x2<=cropAxis.x2){changeX=maxRight;}if(axis.y2<=cropAxis.y2){changeY=maxBottom;}}_this4.x=changeX;_this4.y=changeY;_this4.$emit("imgMoving",{moving:true,axis:_this4.getImgAxis()});_this4.$emit("img-moving",{moving:true,axis:_this4.getImgAxis()});});},leaveImg:function leaveImg(e){window.removeEventListener("mousemove",this.moveImg);window.removeEventListener("touchmove",this.moveImg);window.removeEventListener("mouseup",this.leaveImg);window.removeEventListener("touchend",this.leaveImg);this.$emit("imgMoving",{moving:false,axis:this.getImgAxis()});this.$emit("img-moving",{moving:false,axis:this.getImgAxis()});},scaleImg:function scaleImg(){if(this.canScale){window.addEventListener(this.support,this.changeSize,this.passive);}},cancelScale:function cancelScale(){if(this.canScale){window.removeEventListener(this.support,this.changeSize);}},changeSize:function changeSize(e){var _this5=this;e.preventDefault();var scale=this.scale;var change=e.deltaY||e.wheelDelta;var isFirefox=navigator.userAgent.indexOf("Firefox");change=isFirefox>0?change*30:change;if(this.isIE){change=-change;}var coe=this.coe;coe=coe/this.trueWidth>coe/this.trueHeight?coe/this.trueHeight:coe/this.trueWidth;var num=coe*change;num<0?scale+=Math.abs(num):scale>Math.abs(num)?scale-=Math.abs(num):scale;var status=num<0?"add":"reduce";if(status!==this.coeStatus){this.coeStatus=status;this.coe=0.2;}if(!this.scaling){this.scalingSet=setTimeout(function(){_this5.scaling=false;_this5.coe=_this5.coe+=0.01;},50);}this.scaling=true;if(!this.checkoutImgAxis(this.x,this.y,scale)){return false;}this.scale=scale;},changeScale:function changeScale(num){var scale=this.scale;num=num||1;var coe=20;coe=coe/this.trueWidth>coe/this.trueHeight?coe/this.trueHeight:coe/this.trueWidth;num=num*coe;num>0?scale+=Math.abs(num):scale>Math.abs(num)?scale-=Math.abs(num):scale;if(!this.checkoutImgAxis(this.x,this.y,scale)){return false;}this.scale=scale;},createCrop:function createCrop(e){var _this6=this;e.preventDefault();var nowX="clientX"in e?e.clientX:e.touches?e.touches[0].clientX:0;var nowY="clientY"in e?e.clientY:e.touches?e.touches[0].clientY:0;this.$nextTick(function(){var fw=nowX-_this6.cropX;var fh=nowY-_this6.cropY;if(fw>0){_this6.cropW=fw+_this6.cropChangeX>_this6.w?_this6.w-_this6.cropChangeX:fw;_this6.cropOffsertX=_this6.cropChangeX;}else{_this6.cropW=_this6.w-_this6.cropChangeX+Math.abs(fw)>_this6.w?_this6.cropChangeX:Math.abs(fw);_this6.cropOffsertX=_this6.cropChangeX+fw>0?_this6.cropChangeX+fw:0;}if(!_this6.fixed){if(fh>0){_this6.cropH=fh+_this6.cropChangeY>_this6.h?_this6.h-_this6.cropChangeY:fh;_this6.cropOffsertY=_this6.cropChangeY;}else{_this6.cropH=_this6.h-_this6.cropChangeY+Math.abs(fh)>_this6.h?_this6.cropChangeY:Math.abs(fh);_this6.cropOffsertY=_this6.cropChangeY+fh>0?_this6.cropChangeY+fh:0;}}else{var fixedHeight=_this6.cropW/_this6.fixedNumber[0]*_this6.fixedNumber[1];if(fixedHeight+_this6.cropOffsertY>_this6.h){_this6.cropH=_this6.h-_this6.cropOffsertY;_this6.cropW=_this6.cropH/_this6.fixedNumber[1]*_this6.fixedNumber[0];if(fw>0){_this6.cropOffsertX=_this6.cropChangeX;}else{_this6.cropOffsertX=_this6.cropChangeX-_this6.cropW;}}else{_this6.cropH=fixedHeight;}_this6.cropOffsertY=_this6.cropOffsertY;}});},changeCropSize:function changeCropSize(e,w,h,typeW,typeH){e.preventDefault();window.addEventListener("mousemove",this.changeCropNow);window.addEventListener("mouseup",this.changeCropEnd);window.addEventListener("touchmove",this.changeCropNow);window.addEventListener("touchend",this.changeCropEnd);this.canChangeX=w;this.canChangeY=h;this.changeCropTypeX=typeW;this.changeCropTypeY=typeH;this.cropX="clientX"in e?e.clientX:e.touches[0].clientX;this.cropY="clientY"in e?e.clientY:e.touches[0].clientY;this.cropOldW=this.cropW;this.cropOldH=this.cropH;this.cropChangeX=this.cropOffsertX;this.cropChangeY=this.cropOffsertY;if(this.fixed){if(this.canChangeX&&this.canChangeY){this.canChangeY=0;}}this.$emit("change-crop-size",{width:this.cropW,height:this.cropH});},changeCropNow:function changeCropNow(e){var _this7=this;e.preventDefault();var nowX="clientX"in e?e.clientX:e.touches?e.touches[0].clientX:0;var nowY="clientY"in e?e.clientY:e.touches?e.touches[0].clientY:0;var wrapperW=this.w;var wrapperH=this.h;var minX=0;var minY=0;if(this.centerBox){var axis=this.getImgAxis();var imgW=axis.x2;var imgH=axis.y2;minX=axis.x1>0?axis.x1:0;minY=axis.y1>0?axis.y1:0;if(wrapperW>imgW){wrapperW=imgW;}if(wrapperH>imgH){wrapperH=imgH;}}this.$nextTick(function(){var fw=nowX-_this7.cropX;var fh=nowY-_this7.cropY;if(_this7.canChangeX){if(_this7.changeCropTypeX===1){if(_this7.cropOldW-fw>0){_this7.cropW=wrapperW-_this7.cropChangeX-fw<=wrapperW-minX?_this7.cropOldW-fw:_this7.cropOldW+_this7.cropChangeX-minX;_this7.cropOffsertX=wrapperW-_this7.cropChangeX-fw<=wrapperW-minX?_this7.cropChangeX+fw:minX;}else{_this7.cropW=Math.abs(fw)+_this7.cropChangeX<=wrapperW?Math.abs(fw)-_this7.cropOldW:wrapperW-_this7.cropOldW-_this7.cropChangeX;_this7.cropOffsertX=_this7.cropChangeX+_this7.cropOldW;}}else if(_this7.changeCropTypeX===2){if(_this7.cropOldW+fw>0){_this7.cropW=_this7.cropOldW+fw+_this7.cropOffsertX<=wrapperW?_this7.cropOldW+fw:wrapperW-_this7.cropOffsertX;_this7.cropOffsertX=_this7.cropChangeX;}else{_this7.cropW=wrapperW-_this7.cropChangeX+Math.abs(fw+_this7.cropOldW)<=wrapperW-minX?Math.abs(fw+_this7.cropOldW):_this7.cropChangeX-minX;_this7.cropOffsertX=wrapperW-_this7.cropChangeX+Math.abs(fw+_this7.cropOldW)<=wrapperW-minX?_this7.cropChangeX-Math.abs(fw+_this7.cropOldW):minX;}}}if(_this7.canChangeY){if(_this7.changeCropTypeY===1){if(_this7.cropOldH-fh>0){_this7.cropH=wrapperH-_this7.cropChangeY-fh<=wrapperH-minY?_this7.cropOldH-fh:_this7.cropOldH+_this7.cropChangeY-minY;_this7.cropOffsertY=wrapperH-_this7.cropChangeY-fh<=wrapperH-minY?_this7.cropChangeY+fh:minY;}else{_this7.cropH=Math.abs(fh)+_this7.cropChangeY<=wrapperH?Math.abs(fh)-_this7.cropOldH:wrapperH-_this7.cropOldH-_this7.cropChangeY;_this7.cropOffsertY=_this7.cropChangeY+_this7.cropOldH;}}else if(_this7.changeCropTypeY===2){if(_this7.cropOldH+fh>0){_this7.cropH=_this7.cropOldH+fh+_this7.cropOffsertY<=wrapperH?_this7.cropOldH+fh:wrapperH-_this7.cropOffsertY;_this7.cropOffsertY=_this7.cropChangeY;}else{_this7.cropH=wrapperH-_this7.cropChangeY+Math.abs(fh+_this7.cropOldH)<=wrapperH-minY?Math.abs(fh+_this7.cropOldH):_this7.cropChangeY-minY;_this7.cropOffsertY=wrapperH-_this7.cropChangeY+Math.abs(fh+_this7.cropOldH)<=wrapperH-minY?_this7.cropChangeY-Math.abs(fh+_this7.cropOldH):minY;}}}if(_this7.canChangeX&&_this7.fixed){var fixedHeight=_this7.cropW/_this7.fixedNumber[0]*_this7.fixedNumber[1];if(fixedHeight+_this7.cropOffsertY>wrapperH){_this7.cropH=wrapperH-_this7.cropOffsertY;_this7.cropW=_this7.cropH/_this7.fixedNumber[1]*_this7.fixedNumber[0];}else{_this7.cropH=fixedHeight;}}if(_this7.canChangeY&&_this7.fixed){var fixedWidth=_this7.cropH/_this7.fixedNumber[1]*_this7.fixedNumber[0];if(fixedWidth+_this7.cropOffsertX>wrapperW){_this7.cropW=wrapperW-_this7.cropOffsertX;_this7.cropH=_this7.cropW/_this7.fixedNumber[0]*_this7.fixedNumber[1];}else{_this7.cropW=fixedWidth;}}});},checkCropLimitSize:function checkCropLimitSize(){var cropW=this.cropW,cropH=this.cropH,limitMinSize=this.limitMinSize;var limitMinNum=new Array();if(!Array.isArray[limitMinSize]){limitMinNum=[limitMinSize,limitMinSize];}else{limitMinNum=limitMinSize;}cropW=parseFloat(limitMinNum[0]);cropH=parseFloat(limitMinNum[1]);return[cropW,cropH];},changeCropEnd:function changeCropEnd(e){window.removeEventListener("mousemove",this.changeCropNow);window.removeEventListener("mouseup",this.changeCropEnd);window.removeEventListener("touchmove",this.changeCropNow);window.removeEventListener("touchend",this.changeCropEnd);},endCrop:function endCrop(){if(this.cropW===0&&this.cropH===0){this.cropping=false;}window.removeEventListener("mousemove",this.createCrop);window.removeEventListener("mouseup",this.endCrop);window.removeEventListener("touchmove",this.createCrop);window.removeEventListener("touchend",this.endCrop);},startCrop:function startCrop(){this.crop=true;},stopCrop:function stopCrop(){this.crop=false;},clearCrop:function clearCrop(){this.cropping=false;this.cropW=0;this.cropH=0;},cropMove:function cropMove(e){e.preventDefault();if(!this.canMoveBox){this.crop=false;this.startMove(e);return false;}if(e.touches&&e.touches.length===2){this.crop=false;this.startMove(e);this.leaveCrop();return false;}window.addEventListener("mousemove",this.moveCrop);window.addEventListener("mouseup",this.leaveCrop);window.addEventListener("touchmove",this.moveCrop);window.addEventListener("touchend",this.leaveCrop);var x="clientX"in e?e.clientX:e.touches[0].clientX;var y="clientY"in e?e.clientY:e.touches[0].clientY;var newX,newY;newX=x-this.cropOffsertX;newY=y-this.cropOffsertY;this.cropX=newX;this.cropY=newY;this.$emit("cropMoving",{moving:true,axis:this.getCropAxis()});this.$emit("crop-moving",{moving:true,axis:this.getCropAxis()});},moveCrop:function moveCrop(e,isMove){var _this8=this;var nowX=0;var nowY=0;if(e){e.preventDefault();nowX="clientX"in e?e.clientX:e.touches[0].clientX;nowY="clientY"in e?e.clientY:e.touches[0].clientY;}this.$nextTick(function(){var cx,cy;var fw=nowX-_this8.cropX;var fh=nowY-_this8.cropY;if(isMove){fw=_this8.cropOffsertX;fh=_this8.cropOffsertY;}if(fw<=0){cx=0;}else if(fw+_this8.cropW>_this8.w){cx=_this8.w-_this8.cropW;}else{cx=fw;}if(fh<=0){cy=0;}else if(fh+_this8.cropH>_this8.h){cy=_this8.h-_this8.cropH;}else{cy=fh;}if(_this8.centerBox){var axis=_this8.getImgAxis();if(cx<=axis.x1){cx=axis.x1;}if(cx+_this8.cropW>axis.x2){cx=axis.x2-_this8.cropW;}if(cy<=axis.y1){cy=axis.y1;}if(cy+_this8.cropH>axis.y2){cy=axis.y2-_this8.cropH;}}_this8.cropOffsertX=cx;_this8.cropOffsertY=cy;_this8.$emit("cropMoving",{moving:true,axis:_this8.getCropAxis()});_this8.$emit("crop-moving",{moving:true,axis:_this8.getCropAxis()});});},getImgAxis:function getImgAxis(x,y,scale){x=x||this.x;y=y||this.y;scale=scale||this.scale;var obj={x1:0,x2:0,y1:0,y2:0};var imgW=this.trueWidth*scale;var imgH=this.trueHeight*scale;switch(this.rotate){case 0:obj.x1=x+this.trueWidth*(1-scale)/2;obj.x2=obj.x1+this.trueWidth*scale;obj.y1=y+this.trueHeight*(1-scale)/2;obj.y2=obj.y1+this.trueHeight*scale;break;case 1:case-1:case 3:case-3:obj.x1=x+this.trueWidth*(1-scale)/2+(imgW-imgH)/2;obj.x2=obj.x1+this.trueHeight*scale;obj.y1=y+this.trueHeight*(1-scale)/2+(imgH-imgW)/2;obj.y2=obj.y1+this.trueWidth*scale;break;default:obj.x1=x+this.trueWidth*(1-scale)/2;obj.x2=obj.x1+this.trueWidth*scale;obj.y1=y+this.trueHeight*(1-scale)/2;obj.y2=obj.y1+this.trueHeight*scale;break;}return obj;},getCropAxis:function getCropAxis(){var obj={x1:0,x2:0,y1:0,y2:0};obj.x1=this.cropOffsertX;obj.x2=obj.x1+this.cropW;obj.y1=this.cropOffsertY;obj.y2=obj.y1+this.cropH;return obj;},leaveCrop:function leaveCrop(e){window.removeEventListener("mousemove",this.moveCrop);window.removeEventListener("mouseup",this.leaveCrop);window.removeEventListener("touchmove",this.moveCrop);window.removeEventListener("touchend",this.leaveCrop);this.$emit("cropMoving",{moving:false,axis:this.getCropAxis()});this.$emit("crop-moving",{moving:false,axis:this.getCropAxis()});},getCropChecked:function getCropChecked(cb){var _this9=this;var canvas=document.createElement("canvas");var img=new Image();var rotate=this.rotate;var trueWidth=this.trueWidth;var trueHeight=this.trueHeight;var cropOffsertX=this.cropOffsertX;var cropOffsertY=this.cropOffsertY;img.onload=function(){if(_this9.cropW!==0){var ctx=canvas.getContext("2d");var dpr=1;if(_this9.high&!_this9.full){dpr=window.devicePixelRatio;}if(_this9.enlarge!==1&!_this9.full){dpr=Math.abs(Number(_this9.enlarge));}var width=_this9.cropW*dpr;var height=_this9.cropH*dpr;var imgW=trueWidth*_this9.scale*dpr;var imgH=trueHeight*_this9.scale*dpr;var dx=(_this9.x-cropOffsertX+_this9.trueWidth*(1-_this9.scale)/2)*dpr;var dy=(_this9.y-cropOffsertY+_this9.trueHeight*(1-_this9.scale)/2)*dpr;setCanvasSize(width,height);ctx.save();switch(rotate){case 0:if(!_this9.full){ctx.drawImage(img,dx,dy,imgW,imgH);}else{setCanvasSize(width/_this9.scale,height/_this9.scale);ctx.drawImage(img,dx/_this9.scale,dy/_this9.scale,imgW/_this9.scale,imgH/_this9.scale);}break;case 1:case-3:if(!_this9.full){dx=dx+(imgW-imgH)/2;dy=dy+(imgH-imgW)/2;ctx.rotate(rotate*90*Math.PI/180);ctx.drawImage(img,dy,-dx-imgH,imgW,imgH);}else{setCanvasSize(width/_this9.scale,height/_this9.scale);dx=dx/_this9.scale+(imgW/_this9.scale-imgH/_this9.scale)/2;dy=dy/_this9.scale+(imgH/_this9.scale-imgW/_this9.scale)/2;ctx.rotate(rotate*90*Math.PI/180);ctx.drawImage(img,dy,-dx-imgH/_this9.scale,imgW/_this9.scale,imgH/_this9.scale);}break;case 2:case-2:if(!_this9.full){ctx.rotate(rotate*90*Math.PI/180);ctx.drawImage(img,-dx-imgW,-dy-imgH,imgW,imgH);}else{setCanvasSize(width/_this9.scale,height/_this9.scale);ctx.rotate(rotate*90*Math.PI/180);dx=dx/_this9.scale;dy=dy/_this9.scale;ctx.drawImage(img,-dx-imgW/_this9.scale,-dy-imgH/_this9.scale,imgW/_this9.scale,imgH/_this9.scale);}break;case 3:case-1:if(!_this9.full){dx=dx+(imgW-imgH)/2;dy=dy+(imgH-imgW)/2;ctx.rotate(rotate*90*Math.PI/180);ctx.drawImage(img,-dy-imgW,dx,imgW,imgH);}else{setCanvasSize(width/_this9.scale,height/_this9.scale);dx=dx/_this9.scale+(imgW/_this9.scale-imgH/_this9.scale)/2;dy=dy/_this9.scale+(imgH/_this9.scale-imgW/_this9.scale)/2;ctx.rotate(rotate*90*Math.PI/180);ctx.drawImage(img,-dy-imgW/_this9.scale,dx,imgW/_this9.scale,imgH/_this9.scale);}break;default:if(!_this9.full){ctx.drawImage(img,dx,dy,imgW,imgH);}else{setCanvasSize(width/_this9.scale,height/_this9.scale);ctx.drawImage(img,dx/_this9.scale,dy/_this9.scale,imgW/_this9.scale,imgH/_this9.scale);}}ctx.restore();}else{var _width=trueWidth*_this9.scale;var _height=trueHeight*_this9.scale;var _ctx2=canvas.getContext("2d");_ctx2.save();switch(rotate){case 0:setCanvasSize(_width,_height);_ctx2.drawImage(img,0,0,_width,_height);break;case 1:case-3:setCanvasSize(_height,_width);_ctx2.rotate(rotate*90*Math.PI/180);_ctx2.drawImage(img,0,-_height,_width,_height);break;case 2:case-2:setCanvasSize(_width,_height);_ctx2.rotate(rotate*90*Math.PI/180);_ctx2.drawImage(img,-_width,-_height,_width,_height);break;case 3:case-1:setCanvasSize(_height,_width);_ctx2.rotate(rotate*90*Math.PI/180);_ctx2.drawImage(img,-_width,0,_width,_height);break;default:setCanvasSize(_width,_height);_ctx2.drawImage(img,0,0,_width,_height);}_ctx2.restore();}cb(canvas);};var s=this.img.substr(0,4);if(s!=="data"){img.crossOrigin="Anonymous";}img.src=this.imgs;function setCanvasSize(width,height){canvas.width=Math.round(width);canvas.height=Math.round(height);}},getCropData:function getCropData(cb){var _this10=this;this.getCropChecked(function(data){cb(data.toDataURL("image/"+_this10.outputType,_this10.outputSize));});},getCropBlob:function getCropBlob(cb){var _this11=this;this.getCropChecked(function(data){data.toBlob(function(blob){return cb(blob);},"image/"+_this11.outputType,_this11.outputSize);});},showPreview:function showPreview(){var _this12=this;if(this.isCanShow){this.isCanShow=false;setTimeout(function(){_this12.isCanShow=true;},16);}else{return false;}var w=this.cropW;var h=this.cropH;var scale=this.scale;var obj={};obj.div={width:"".concat(w,"px"),height:"".concat(h,"px")};var transformX=(this.x-this.cropOffsertX)/scale;var transformY=(this.y-this.cropOffsertY)/scale;var transformZ=0;obj.w=w;obj.h=h;obj.url=this.imgs;obj.img={width:"".concat(this.trueWidth,"px"),height:"".concat(this.trueHeight,"px"),transform:"scale(".concat(scale,")translate3d(").concat(transformX,"px, ").concat(transformY,"px, ").concat(transformZ,"px)rotateZ(").concat(this.rotate*90,"deg)")};obj.html="\n <div class=\"show-preview\" style=\"width: ".concat(obj.w,"px; height: ").concat(obj.h,"px,; overflow: hidden\">\n <div style=\"width: ").concat(w,"px; height: ").concat(h,"px\">\n <img src=").concat(obj.url," style=\"width: ").concat(this.trueWidth,"px; height: ").concat(this.trueHeight,"px; transform:\n scale(").concat(scale,")translate3d(").concat(transformX,"px, ").concat(transformY,"px, ").concat(transformZ,"px)rotateZ(").concat(this.rotate*90,"deg)\">\n </div>\n </div>");this.$emit("realTime",obj);this.$emit("real-time",obj);},reload:function reload(){var _this13=this;var img=new Image();img.onload=function(){_this13.w=parseFloat(window.getComputedStyle(_this13.$refs.cropper).width);_this13.h=parseFloat(window.getComputedStyle(_this13.$refs.cropper).height);_this13.trueWidth=img.width;_this13.trueHeight=img.height;if(!_this13.original){_this13.scale=_this13.checkedMode();}else{_this13.scale=1;}_this13.$nextTick(function(){_this13.x=-(_this13.trueWidth-_this13.trueWidth*_this13.scale)/2+(_this13.w-_this13.trueWidth*_this13.scale)/2;_this13.y=-(_this13.trueHeight-_this13.trueHeight*_this13.scale)/2+(_this13.h-_this13.trueHeight*_this13.scale)/2;_this13.loading=false;if(_this13.autoCrop){_this13.goAutoCrop();}_this13.$emit("img-load","success");_this13.$emit("imgLoad","success");setTimeout(function(){_this13.showPreview();},20);});};img.onerror=function(){_this13.$emit("imgLoad","error");_this13.$emit("img-load","error");};img.src=this.imgs;},checkedMode:function checkedMode(){var scale=1;var imgW=this.trueWidth;var imgH=this.trueHeight;var arr=this.mode.split(" ");switch(arr[0]){case"contain":if(this.trueWidth>this.w){scale=this.w/this.trueWidth;}if(this.trueHeight*scale>this.h){scale=this.h/this.trueHeight;}break;case"cover":imgW=this.w;scale=imgW/this.trueWidth;imgH=imgH*scale;if(imgH<this.h){imgH=this.h;scale=imgH/this.trueHeight;}break;default:try{var str=arr[0];if(str.search("px")!==-1){str=str.replace("px","");imgW=parseFloat(str);var scaleX=imgW/this.trueWidth;var scaleY=1;var strH=arr[1];if(strH.search("px")!==-1){strH=strH.replace("px","");imgH=parseFloat(strH);scaleY=imgH/this.trueHeight;}scale=Math.min(scaleX,scaleY);}if(str.search("%")!==-1){str=str.replace("%","");imgW=parseFloat(str)/100*this.w;scale=imgW/this.trueWidth;}if(arr.length===2&&str==="auto"){var str2=arr[1];if(str2.search("px")!==-1){str2=str2.replace("px","");imgH=parseFloat(str2);scale=imgH/this.trueHeight;}if(str2.search("%")!==-1){str2=str2.replace("%","");imgH=parseFloat(str2)/100*this.h;scale=imgH/this.trueHeight;}}}catch(error){scale=1;}}return scale;},goAutoCrop:function goAutoCrop(cw,ch){if(this.imgs===""||this.imgs===null)return;this.clearCrop();this.cropping=true;var maxWidth=this.w;var maxHeight=this.h;if(this.centerBox){var switchWH=Math.abs(this.rotate)%2>0;var imgW=(switchWH?this.trueHeight:this.trueWidth)*this.scale;var imgH=(switchWH?this.trueWidth:this.trueHeight)*this.scale;maxWidth=imgW<maxWidth?imgW:maxWidth;maxHeight=imgH<maxHeight?imgH:maxHeight;}var w=cw?cw:parseFloat(this.autoCropWidth);var h=ch?ch:parseFloat(this.autoCropHeight);if(w===0||h===0){w=maxWidth*0.8;h=maxHeight*0.8;}w=w>maxWidth?maxWidth:w;h=h>maxHeight?maxHeight:h;if(this.fixed){h=w/this.fixedNumber[0]*this.fixedNumber[1];}if(h>this.h){h=this.h;w=h/this.fixedNumber[1]*this.fixedNumber[0];}this.changeCrop(w,h);},changeCrop:function changeCrop(w,h){var _this14=this;if(this.centerBox){var axis=this.getImgAxis();if(w>axis.x2-axis.x1){w=axis.x2-axis.x1;h=w/this.fixedNumber[0]*this.fixedNumber[1];}if(h>axis.y2-axis.y1){h=axis.y2-axis.y1;w=h/this.fixedNumber[1]*this.fixedNumber[0];}}this.cropW=w;this.cropH=h;this.checkCropLimitSize();this.$nextTick(function(){_this14.cropOffsertX=(_this14.w-_this14.cropW)/2;_this14.cropOffsertY=(_this14.h-_this14.cropH)/2;if(_this14.centerBox){_this14.moveCrop(null,true);}});},refresh:function refresh(){var _this15=this;this.img;this.imgs="";this.scale=1;this.crop=false;this.rotate=0;this.w=0;this.h=0;this.trueWidth=0;this.trueHeight=0;this.clearCrop();this.$nextTick(function(){_this15.checkedImg();});},rotateLeft:function rotateLeft(){this.rotate=this.rotate<=-3?0:this.rotate-1;},rotateRight:function rotateRight(){this.rotate=this.rotate>=3?0:this.rotate+1;},rotateClear:function rotateClear(){this.rotate=0;},checkoutImgAxis:function checkoutImgAxis(x,y,scale){x=x||this.x;y=y||this.y;scale=scale||this.scale;var canGo=true;if(this.centerBox){var axis=this.getImgAxis(x,y,scale);var cropAxis=this.getCropAxis();if(axis.x1>=cropAxis.x1){canGo=false;}if(axis.x2<=cropAxis.x2){canGo=false;}if(axis.y1>=cropAxis.y1){canGo=false;}if(axis.y2<=cropAxis.y2){canGo=false;}}return canGo;}},mounted:function mounted(){this.support="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";var that=this;var u=navigator.userAgent;this.isIOS=!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);if(!HTMLCanvasElement.prototype.toBlob){Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function value(callback,type,quality){var binStr=atob(this.toDataURL(type,quality).split(",")[1]),len=binStr.length,arr=new Uint8Array(len);for(var i=0;i<len;i++){arr[i]=binStr.charCodeAt(i);}callback(new Blob([arr],{type:that.type||"image/png"}));}});}this.showPreview();this.checkedImg();},destroyed:function destroyed(){window.removeEventListener("mousemove",this.moveCrop);window.removeEventListener("mouseup",this.leaveCrop);window.removeEventListener("touchmove",this.moveCrop);window.removeEventListener("touchend",this.leaveCrop);this.cancelScale();}});var _hoisted_1={key:0,class:"cropper-box"};var _hoisted_2=["src"];var _hoisted_3={class:"cropper-view-box"};var _hoisted_4=["src"];var _hoisted_5={key:1};function _sfc_render(_ctx,_cache,$props,$setup,$data,$options){return openBlock(),createElementBlock("div",{class:"vue-cropper",ref:"cropper",onMouseover:_cache[28]||(_cache[28]=function(){return _ctx.scaleImg&&_ctx.scaleImg.apply(_ctx,arguments);}),onMouseout:_cache[29]||(_cache[29]=function(){return _ctx.cancelScale&&_ctx.cancelScale.apply(_ctx,arguments);})},[_ctx.imgs?(openBlock(),createElementBlock("div",_hoisted_1,[withDirectives(createBaseVNode("div",{class:"cropper-box-canvas",style:normalizeStyle({"width":_ctx.trueWidth+"px","height":_ctx.trueHeight+"px","transform":"scale("+_ctx.scale+","+_ctx.scale+") translate3d("+_ctx.x/_ctx.scale+"px,"+_ctx.y/_ctx.scale+"px,0)rotateZ("+_ctx.rotate*90+"deg)"})},[createBaseVNode("img",{src:_ctx.imgs,alt:"cropper-img",ref:"cropperImg"},null,8,_hoisted_2)],4),[[vShow,!_ctx.loading]])])):createCommentVNode("",true),createBaseVNode("div",{class:normalizeClass(["cropper-drag-box",{"cropper-move":_ctx.move&&!_ctx.crop,"cropper-crop":_ctx.crop,"cropper-modal":_ctx.cropping}]),onMousedown:_cache[0]||(_cache[0]=function(){return _ctx.startMove&&_ctx.startMove.apply(_ctx,arguments);}),onTouchstart:_cache[1]||(_cache[1]=function(){return _ctx.startMove&&_ctx.startMove.apply(_ctx,arguments);})},null,34),withDirectives(createBaseVNode("div",{class:"cropper-crop-box",style:normalizeStyle({"width":_ctx.cropW+"px","height":_ctx.cropH+"px","transform":"translate3d("+_ctx.cropOffsertX+"px,"+_ctx.cropOffsertY+"px,0)"})},[createBaseVNode("span",_hoisted_3,[createBaseVNode("img",{style:normalizeStyle({"width":_ctx.trueWidth+"px","height":_ctx.trueHeight+"px","transform":"scale("+_ctx.scale+","+_ctx.scale+") translate3d("+(_ctx.x-_ctx.cropOffsertX)/_ctx.scale+"px,"+(_ctx.y-_ctx.cropOffsertY)/_ctx.scale+"px,0)rotateZ("+_ctx.rotate*90+"deg)"}),src:_ctx.imgs,alt:"cropper-img"},null,12,_hoisted_4)]),createBaseVNode("span",{class:"cropper-face cropper-move",onMousedown:_cache[2]||(_cache[2]=function(){return _ctx.cropMove&&_ctx.cropMove.apply(_ctx,arguments);}),onTouchstart:_cache[3]||(_cache[3]=function(){return _ctx.cropMove&&_ctx.cropMove.apply(_ctx,arguments);})},null,32),_ctx.info?(openBlock(),createElementBlock("span",{key:0,class:"crop-info",style:normalizeStyle({"top":_ctx.cropInfo.top})},toDisplayString(_ctx.cropInfo.width)+" \xD7 "+toDisplayString(_ctx.cropInfo.height),5)):createCommentVNode("",true),!_ctx.fixedBox?(openBlock(),createElementBlock("span",_hoisted_5,[createBaseVNode("span",{class:"crop-line line-w",onMousedown:_cache[4]||(_cache[4]=function($event){return _ctx.changeCropSize($event,false,true,0,1);}),onTouchstart:_cache[5]||(_cache[5]=function($event){return _ctx.changeCropSize($event,false,true,0,1);})},null,32),createBaseVNode("span",{class:"crop-line line-a",onMousedown:_cache[6]||(_cache[6]=function($event){return _ctx.changeCropSize($event,true,false,1,0);}),onTouchstart:_cache[7]||(_cache[7]=function($event){return _ctx.changeCropSize($event,true,false,1,0);})},null,32),createBaseVNode("span",{class:"crop-line line-s",onMousedown:_cache[8]||(_cache[8]=function($event){return _ctx.changeCropSize($event,false,true,0,2);}),onTouchstart:_cache[9]||(_cache[9]=function($event){return _ctx.changeCropSize($event,false,true,0,2);})},null,32),createBaseVNode("span",{class:"crop-line line-d",onMousedown:_cache[10]||(_cache[10]=function($event){return _ctx.changeCropSize($event,true,false,2,0);}),onTouchstart:_cache[11]||(_cache[11]=function($event){return _ctx.changeCropSize($event,true,false,2,0);})},null,32),createBaseVNode("span",{class:"crop-point point1",onMousedown:_cache[12]||(_cache[12]=function($event){return _ctx.changeCropSize($event,true,true,1,1);}),onTouchstart:_cache[13]||(_cache[13]=function($event){return _ctx.changeCropSize($event,true,true,1,1);})},null,32),createBaseVNode("span",{class:"crop-point point2",onMousedown:_cache[14]||(_cache[14]=function($event){return _ctx.changeCropSize($event,false,true,0,1);}),onTouchstart:_cache[15]||(_cache[15]=function($event){return _ctx.changeCropSize($event,false,true,0,1);})},null,32),createBaseVNode("span",{class:"crop-point point3",onMousedown:_cache[16]||(_cache[16]=function($event){return _ctx.changeCropSize($event,true,true,2,1);}),onTouchstart:_cache[17]||(_cache[17]=function($event){return _ctx.changeCropSize($event,true,true,2,1);})},null,32),createBaseVNode("span",{class:"crop-point point4",onMousedown:_cache[18]||(_cache[18]=function($event){return _ctx.changeCropSize($event,true,false,1,0);}),onTouchstart:_cache[19]||(_cache[19]=function($event){return _ctx.changeCropSize($event,true,false,1,0);})},null,32),createBaseVNode("span",{class:"crop-point point5",onMousedown:_cache[20]||(_cache[20]=function($event){return _ctx.changeCropSize($event,true,false,2,0);}),onTouchstart:_cache[21]||(_cache[21]=function($event){return _ctx.changeCropSize($event,true,false,2,0);})},null,32),createBaseVNode("span",{class:"crop-point point6",onMousedown:_cache[22]||(_cache[22]=function($event){return _ctx.changeCropSize($event,true,true,1,2);}),onTouchstart:_cache[23]||(_cache[23]=function($event){return _ctx.changeCropSize($event,true,true,1,2);})},null,32),createBaseVNode("span",{class:"crop-point point7",onMousedown:_cache[24]||(_cache[24]=function($event){return _ctx.changeCropSize($event,false,true,0,2);}),onTouchstart:_cache[25]||(_cache[25]=function($event){return _ctx.changeCropSize($event,false,true,0,2);})},null,32),createBaseVNode("span",{class:"crop-point point8",onMousedown:_cache[26]||(_cache[26]=function($event){return _ctx.changeCropSize($event,true,true,2,2);}),onTouchstart:_cache[27]||(_cache[27]=function($event){return _ctx.changeCropSize($event,true,true,2,2);})},null,32)])):createCommentVNode("",true)],4),[[vShow,_ctx.cropping]])],544);}var VueCropper=/* @__PURE__ */_export_sfc(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-be5e5ddc"]]);if(typeof window!=="undefined"&&window.Vue){window.Vue.createApp({}).component("VueCropper",VueCropper);}var upbtn="_upbtn_4fh9z_1";var uploadWarper="_uploadWarper_4fh9z_5";var bg="_bg_4fh9z_12";var btn="_btn_4fh9z_21";var btn1="_btn1_4fh9z_33";var img="_img_4fh9z_44";var btndiv="_btndiv_4fh9z_53";var wrapper="_wrapper_4fh9z_64";var styles={upbtn:upbtn,uploadWarper:uploadWarper,bg:bg,btn:btn,btn1:btn1,img:img,btndiv:btndiv,wrapper:wrapper};var ColCropper=defineComponent({name:'col-cropper',components:{VueCropper:VueCropper},props:{hideInput:{type:Boolean,default:false},option:{type:Object},onCancelTailor:{type:Function,default:function _default(){}},// 取消
- getBase64Data:{type:Function,default:function _default(){}},getBlob:{type:Function,default:function _default(){}},getFile:{type:Function,default:function _default(){}},imgOriginF:{type:Function,default:function _default(){}}},data:function data(){return{img:'',config:{ceilbutton:false,//顶部按钮,默认底部
- outputSize:1,//裁剪生成图片的质量
- outputType:'png',//裁剪生成图片的格式,默认png
- info:false,//裁剪框的大小信息
- canScale:true,//图片是否允许滚轮缩放
- autoCrop:false,//是否默认生成截图框
- autoCropWidth:0,//默认生成截图框宽度
- autoCropHeight:0,//默认生成截图框高度
- fixed:true,//是否开启截图框宽高固定比例
- fixedNumber:[1,1],//截图框的宽高比例
- full:false,//是否输出原图比例的截图
- fixedBox:true,//固定截图框大小 不允许改变
- canMove:true,//上传图片是否可以移动
- canMoveBox:false,//截图框能否拖动
- original:false,//上传图片按照原始比例渲染
- centerBox:true,//截图框是否被限制在图片里面
- high:true,//是否按照设备的dpr 输出等比例图片
- infoTrue:false,//true 为展示真实输出图片宽高 false 展示看到的截图框宽高
- maxImgSize:2000,//限制图片最大宽度和高度
- enlarge:1,//图片根据截图框输出比例倍数
- mode:'100%',//图片默认渲染方式
- cancelButtonText:'取消',//取消按钮文本
- confirmButtonText:'确定',//确定按钮文本
- cancelButtonBackgroundColor:'#606266',//取消按钮背景色
- confirmButtonBackgroundColor:'#ed594c',//确定按钮背景色
- cancelButtonTextColor:'#ffffff',//取消按钮字体色
- confirmButtonTextColor:'#ffffff'//确定按钮字体色
- }};},mounted:function mounted(){this.config=Object.assign(this.config,this.option);},methods:{//添加网格线
- addSlide:function addSlide(){if(document.getElementById('vertical')==null){var box=document.getElementsByClassName('cropper-crop-box')[0];//左网格线
- var verticalLeft=document.createElement('div');verticalLeft.id='vertical';verticalLeft.style.width='1px';verticalLeft.style.height='100%';verticalLeft.style.top='0px';verticalLeft.style.left='33%';verticalLeft.style.position='absolute';verticalLeft.style.backgroundColor='#fff';verticalLeft.style.zIndex='522';verticalLeft.style.opacity='0.5';//右网格线
- var verticalRight=document.createElement('div');verticalRight.style.width='1px';verticalRight.style.height='100%';verticalRight.style.top='0px';verticalRight.style.right='33%';verticalRight.style.position='absolute';verticalRight.style.backgroundColor='#fff';verticalRight.style.zIndex='522';verticalRight.style.opacity='0.5';//上网格线
- var verticalTop=document.createElement('div');verticalTop.style.width='100%';verticalTop.style.height='1px';verticalTop.style.top='33%';verticalTop.style.left='0px';verticalTop.style.position='absolute';verticalTop.style.backgroundColor='#fff';verticalTop.style.zIndex='522';verticalTop.style.opacity='0.5';//下网格线
- var verticalBottom=document.createElement('div');verticalBottom.style.width='100%';verticalBottom.style.height='1px';verticalBottom.style.bottom='33%';verticalBottom.style.left='0px';verticalBottom.style.position='absolute';verticalBottom.style.backgroundColor='#fff';verticalBottom.style.zIndex='522';verticalBottom.style.opacity='0.5';//左上边线
- var LeftTopSide=document.createElement('div');LeftTopSide.style.width='30px';LeftTopSide.style.height='4px';LeftTopSide.style.top='-4px';LeftTopSide.style.left='-4px';LeftTopSide.style.position='absolute';LeftTopSide.style.backgroundColor='#fff';LeftTopSide.style.zIndex='522';LeftTopSide.style.opacity='1';//上左边线
- var TopListSide=document.createElement('div');TopListSide.style.width='4px';TopListSide.style.height='30px';TopListSide.style.top='-4px';TopListSide.style.left='-4px';TopListSide.style.position='absolute';TopListSide.style.backgroundColor='#fff';TopListSide.style.zIndex='522';TopListSide.style.opacity='1';//右上边线
- var RightTopSide=document.createElement('div');RightTopSide.style.width='30px';RightTopSide.style.height='4px';RightTopSide.style.top='-4px';RightTopSide.style.right='-4px';RightTopSide.style.position='absolute';RightTopSide.style.backgroundColor='#fff';RightTopSide.style.zIndex='522';RightTopSide.style.opacity='1';//上右边线
- var TopRightSide=document.createElement('div');TopRightSide.style.width='4px';TopRightSide.style.height='30px';TopRightSide.style.top='-4px';TopRightSide.style.right='-4px';TopRightSide.style.position='absolute';TopRightSide.style.backgroundColor='#fff';TopRightSide.style.zIndex='522';TopRightSide.style.opacity='1';//左下边线
- var LeftBottomSide=document.createElement('div');LeftBottomSide.style.width='30px';LeftBottomSide.style.height='4px';LeftBottomSide.style.bottom='-4px';LeftBottomSide.style.left='-4px';LeftBottomSide.style.position='absolute';LeftBottomSide.style.backgroundColor='#fff';LeftBottomSide.style.zIndex='522';LeftBottomSide.style.opacity='1';//下左边线
- var BottomListSide=document.createElement('div');BottomListSide.style.width='4px';BottomListSide.style.height='30px';BottomListSide.style.bottom='-4px';BottomListSide.style.left='-4px';BottomListSide.style.position='absolute';BottomListSide.style.backgroundColor='#fff';BottomListSide.style.zIndex='522';BottomListSide.style.opacity='1';//右下边线
- var RightBottomSide=document.createElement('div');RightBottomSide.style.width='30px';RightBottomSide.style.height='4px';RightBottomSide.style.bottom='-4px';RightBottomSide.style.right='-4px';RightBottomSide.style.position='absolute';RightBottomSide.style.backgroundColor='#fff';RightBottomSide.style.zIndex='522';RightBottomSide.style.opacity='1';//下右边线
- var BottomRightSide=document.createElement('div');BottomRightSide.style.width='4px';BottomRightSide.style.height='30px';BottomRightSide.style.bottom='-4px';BottomRightSide.style.right='-4px';BottomRightSide.style.position='absolute';BottomRightSide.style.backgroundColor='#fff';BottomRightSide.style.zIndex='522';BottomRightSide.style.opacity='1';//一起生成
- box.appendChild(verticalLeft);box.appendChild(verticalRight);box.appendChild(verticalTop);box.appendChild(verticalBottom);box.appendChild(LeftTopSide);box.appendChild(TopListSide);box.appendChild(RightTopSide);box.appendChild(TopRightSide);box.appendChild(LeftBottomSide);box.appendChild(BottomListSide);box.appendChild(RightBottomSide);box.appendChild(BottomRightSide);}},//异步onload图片
- onLoadImg:function onLoadImg(photoUrl){return new Promise(function(resolve,reject){var reader=new FileReader();reader.readAsDataURL(photoUrl);reader.onload=function(e){resolve(e.target['result']);};});},/**
- * 载入文件
- * template:
- * <h5-cropper hide-input ref="cropper">
- *
- * javascript:
- * this.$refs.cropper.loadFile()
- *
- * @param file
- */loadFile:function loadFile(file){var _this16=this;if(file instanceof File){this.onLoadImg(file).then(function(base64){_this16.img=base64;setTimeout(function(){_this16.config.autoCrop=true;_this16.addSlide();},10);});}else{throw new Error('Arguments file is not File');}},/**
- *
- * @param base64
- */loadBase64:function loadBase64(base64){var _this17=this;if(typeof base64!=='string'){throw new Error('Arguments base64 is not string');}var base=base64.split(',');if(!/^data:image\/(.*?);base64$/.test(base[0])){throw new Error('Arguments base64 MIME is not image/*');}// Base64 Regex @see https://learnku.com/articles/42295
- if(!/^[\/]?([\da-zA-Z]+[\/+]+)*[\da-zA-Z]+([+=]{1,2}|[\/])?$/.test(base[1])){throw new Error('Not standard base64');}this.img=base64;setTimeout(function(){_this17.config.autoCrop=true;_this17.addSlide();},10);},rotating:function rotating(e){this.$refs.cropper.rotateRight();// document.getElementsByClassName("cropper-modal")[0].style = "background-color: rgba(0,0,0,0.5);transition: 0.88s";
- },canceltailor:function canceltailor(){this.img='';this.onCancelTailor();},tailoring:function tailoring(){var _this18=this;this.$refs.cropper.getCropData(function(data){_this18.getBase64Data(data);_this18.getBlob(data);_this18.img='';_this18.config.autoCrop=false;})// 获取截图的blob数据
- ;this.$refs.cropper.getCropBlob(function(data){_this18.getBase64Data(data);_this18.getBlob(data);// Blob 转 File
- var suffix={jpeg:'jpg',png:'png',webp:'webp'}[_this18.config.outputType];var time=new Date().getTime();var file=new File([data],"".concat(time,".").concat(suffix),{type:"image/".concat(_this18.config.outputType)});_this18.getFile(file);_this18.img='';_this18.config.autoCrop=false;});},upPhoto:function upPhoto(e){var _this19=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var photoUrl;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:photoUrl=e.target.files[0];_this19.$refs.headInput.value=null;if(!(photoUrl!=undefined)){_context.next=9;break;}_this19.imgOriginF(photoUrl);_context.next=6;return _this19.onLoadImg(photoUrl);case 6:_this19.img=_context.sent;_this19.config.autoCrop=true;setTimeout(function(){_this19.addSlide();},20);case 9:case"end":return _context.stop();}}},_callee);}))();},onCropMoving:function onCropMoving(e){// console.log('onCropMoving')
- },onImgMoving:function onImgMoving(e){// console.log('onCropMoving')
- }},render:function render(){return createVNode("div",{"class":[styles.upbtn,styles.uploadWarper]},[this.hideInput,!this.hideInput?createVNode("input",{"style":"opacity: 0;","class":styles.upbtn,"type":"file","accept":"image/*","onChange":this.upPhoto,"ref":"headInput"},null):null,this.img!=''?createVNode("div",{"class":styles.bg},[this.config.ceilbutton?createVNode("div",{"class":styles.btndiv},[createVNode("div",{"class":styles.btn,"onClick":this.canceltailor,"style":{backgroundColor:this.config.cancelButtonBackgroundColor,color:this.config.cancelButtonTextColor}},[this.config.cancelButtonText]),createVNode("div",{"class":styles.img,"onClick":this.rotating},null),createVNode("div",{"class":styles.btn,"onClick":this.tailoring,"style":{backgroundColor:this.config.confirmButtonBackgroundColor,color:this.config.confirmButtonTextColor}},[this.config.confirmButtonText])]):null,createVNode("div",{"class":styles.wrapper},[createVNode(VueCropper,{"ref":"cropper","img":this.img,"outputSize":this.config.outputSize,"outputType":this.config.outputType,"info":this.config.info,"canScale":this.config.canScale,"autoCrop":this.config.autoCrop,"autoCropWidth":this.config.autoCropWidth,"autoCropHeight":this.config.autoCropHeight,"fixedBox":this.config.fixedBox,"fixed":this.config.fixed,"fixedNumber":this.config.fixedNumber,"full":this.config.full,"canMove":this.config.canMove,"canMoveBox":this.config.canMoveBox,"original":this.config.original,"centerBox":this.config.centerBox,"high":this.config.high,"infoTrue":this.config.infoTrue,"maxImgSize":this.config.maxImgSize,"enlarge":this.config.enlarge,"mode":this.config.mode,"onCropMoving":this.onCropMoving,"onImgMoving":this.onImgMoving},null)]),!this.config.ceilbutton?createVNode("div",{"class":styles.btndiv},[createVNode("div",{"class":styles.btn,"onClick":this.canceltailor,"style":{backgroundColor:this.config.cancelButtonBackgroundColor,color:this.config.cancelButtonTextColor}},[this.config.cancelButtonText]),createVNode("div",{"class":styles.img,"onClick":this.rotating},null),createVNode("div",{"class":styles.btn,"onClick":this.tailoring,"style":{backgroundColor:this.config.confirmButtonBackgroundColor,color:this.config.confirmButtonTextColor}},[this.config.confirmButtonText])]):null]):null]);}});var iconUploader="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAA4CAMAAAB6xg5AAAAAAXNSR0IArs4c6QAAAotQTF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ocGh1F3S7jVrsJtvrO0q9Nzcx88Umn46R2c/wEA2LVBpTpQcQAAAABJRU5ErkJggg==";var ColUpload=exports('C',defineComponent({name:'col-upload',props:{modelValue:String,tips:{type:String,default:'点击上传'},deletable:{type:Boolean,default:true},native:{// 是否原生上传
- type:Boolean,default:false},cropper:{// 是否进行裁切
- type:Boolean,default:false},options:{// 裁切需要参数
- type:Object,default:{}},uploadSize:{// 上传图片大小
- type:Number,default:5},onUploadChange:{type:Function,default:function _default(url){}},bucket:{type:String,default:'daya'}},methods:{nativeUpload:function nativeUpload(){var _this20=this;postMessage({api:'chooseFile',content:{type:'img',max:1,bucket:this.bucket}},function(res){console.log(res,'fileUrl');_this20.$emit('update:modelValue',res.fileUrl);});},beforeRead:function beforeRead(file){console.log(file,'beforeRead');var isLt2M=file.size/1024/1024<this.uploadSize;if(!isLt2M){Toast("\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7 ".concat(this.uploadSize,"MB"));return false;}return true;},beforeDelete:function beforeDelete(file,detail){// this.dataModel.splice(detail.index, 1)
- return true;},afterRead:function afterRead(file,detail){var _this21=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;file.status='uploading';file.message='上传中...';_context2.next=5;return _this21.uploadFile(file.file);case 5:_context2.next=11;break;case 7:_context2.prev=7;_context2.t0=_context2["catch"](0);//
- console.log(_context2.t0,'2323');Toast.clear();case 11:case"end":return _context2.stop();}}},_callee2,null,[[0,7]]);}))();},onClose:function onClose(e){this.$emit('update:modelValue',null);this.onUploadChange();e.stopPropagation();},getFile:function getFile(file){var _this22=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(){return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return _this22.uploadFile(file);case 3:_context3.next=7;break;case 5:_context3.prev=5;_context3.t0=_context3["catch"](0);case 7:case"end":return _context3.stop();}}},_callee3,null,[[0,5]]);}))();},uploadFile:function uploadFile(file){var _this23=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee4(){var signUrl,tempName,fileName,key,res,obj,formData,_key,uploadUrl;return regeneratorRuntime.wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:_context4.prev=0;// 获取签名
- signUrl=state.platformType==='TEACHER'?'/api-teacher/getUploadSign':'/api-student/getUploadSign';tempName=file.name||'';fileName=tempName&&tempName.replace(/ /gi,'_');key=new Date().getTime()+fileName;console.log(file);_context4.next=8;return request.post(signUrl,{data:{filename:fileName,bucketName:_this23.bucket,postData:{filename:fileName,acl:'public-read',key:key,unknowValueField:[]}}});case 8:res=_context4.sent;Toast.loading({message:'加载中...',forbidClick:true,loadingType:'spinner',duration:0});obj={policy:res.data.policy,signature:res.data.signature,key:key,KSSAccessKeyId:res.data.kssAccessKeyId,acl:'public-read',name:fileName};formData=new FormData();for(_key in obj){formData.append(_key,obj[_key]);}formData.append('file',file,fileName);_context4.next=16;return request$1(state.ossUploadUrl+_this23.bucket,{method:'POST',data:formData});case 16:console.log(state.ossUploadUrl+_this23.bucket+'/'+key);uploadUrl=state.ossUploadUrl+_this23.bucket+'/'+key;Toast.clear();_this23.$emit('update:modelValue',uploadUrl);_this23.onUploadChange(uploadUrl);_context4.next=26;break;case 23:_context4.prev=23;_context4.t0=_context4["catch"](0);console.log(_context4.t0,'uploadFile');case 26:case"end":return _context4.stop();}}},_callee4,null,[[0,23]]);}))();}},render:function render(){var _this24=this;useCustomFieldValue(function(){return _this24.modelValue;});return createVNode("div",{"class":styles$1['uploader-section']},[this.modelValue&&this.deletable?createVNode(Icon,{"name":"cross","onClick":this.onClose,"class":styles$1['img-close']},null):null,this.cropper&&!this.native?createVNode("div",{"class":styles$1['col-uploader']},[this.modelValue?createVNode(Image$1,{"fit":"cover","position":"center","class":styles$1.uploadImg,"src":this.modelValue},null):createVNode("div",{"class":styles$1.uploader},[createVNode(Icon,{"name":iconUploader,"size":"32"},null),createVNode("p",{"class":styles$1.uploaderText},[this.tips])]),createVNode(ColCropper,{"option":this.options,"getFile":this.getFile},null)]):this.native?createVNode("div",{"style":{display:'flex',alignItems:'center',justifyContent:'center',height:'100%'},"onClick":this.nativeUpload},[this.modelValue?createVNode(Image$1,{"fit":"cover","position":"center","class":styles$1.uploadImg,"src":this.modelValue},null):createVNode("div",{"class":styles$1.uploader},[createVNode(Icon,{"name":iconUploader,"size":"32"},null),createVNode("p",{"class":styles$1.uploaderText},[this.tips])])]):createVNode(Uploader,{"afterRead":this.afterRead,"beforeRead":this.beforeRead,"beforeDelete":this.beforeDelete},{default:function _default(){return _this24.modelValue?createVNode(Image$1,{"fit":"cover","position":"center","class":styles$1.uploadImg,"src":_this24.modelValue},null):createVNode("div",{"class":styles$1.uploader},[createVNode(Icon,{"name":iconUploader,"size":"32"},null),createVNode("p",{"class":styles$1.uploaderText},[_this24.tips])]);}})]);}}));}};});})();
|