!function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=9)}([function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;en.parts.length&&(o.parts.length=n.parts.length)}else{for(var r=[],i=0;i<\/script>\n\t\t\tVue.use(window[\'vue-cropper\'])\n\n\t\t\t\n\t\t',this.code1='\n\t\t\t
\n\t\t\t\t

example1 基本例子 无限制

\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tdownload(base64)\n\t\t\t\t\tdownload(blob)\n\t\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t\t

截图框大小

\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t

中等大小

\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\n\t\t\t\t\t

迷你大小

\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\n\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t

输出图片格式

\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
{{ code1 }}
\n\t\t\t\t
\n
\n\t\t'}}},function(t,e,n){"use strict";e.a={data:function(){return{all:!1}},computed:{msg:function(){return this.all?"fold":"unfold"}}}},function(t,e,n){"use strict";var o=n(10);e.a={data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:function(){return[1,1]}},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:Number,default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"}},computed:{cropInfo:function(){var t={};if(t.top=this.cropOffsertY>21?"-21px":"0px",t.width=this.cropW>0?this.cropW:0,t.height=this.cropH>0?this.cropH:0,this.infoTrue){var e=1;this.high&&!this.full&&(e=window.devicePixelRatio),1!==this.enlarge&!this.full&&(e=Math.abs(Number(this.enlarge))),t.width=t.width*e,t.height=t.height*e,this.full&&(t.width=t.width/this.scale,t.height=t.height/this.scale)}return t.width=t.width.toFixed(0),t.height=t.height.toFixed(0),t},isIE:function(){var t=navigator.userAgent;return t.indexOf("compatible")>-1&&t.indexOf("MSIE")>-1}},watch:{img:function(){this.checkedImg()},imgs:function(t){""!==t&&this.reload()},cropW:function(){this.showPreview()},cropH:function(){this.showPreview()},cropOffsertX:function(){this.showPreview()},cropOffsertY:function(){this.showPreview()},scale:function(t,e){this.showPreview()},x:function(){this.showPreview()},y:function(){this.showPreview()},autoCrop:function(t){t&&this.goAutoCrop()},autoCropWidth:function(){this.autoCrop&&this.goAutoCrop()},autoCropHeight:function(){this.autoCrop&&this.goAutoCrop()},mode:function(){this.checkedImg()},rotate:function(){this.showPreview(),this.autoCrop?this.goAutoCrop(this.cropW,this.cropH):(this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{checkOrientationImage:function(t,e,n,o){var i=this,r=document.createElement("canvas"),a=r.getContext("2d");switch(a.save(),e){case 2:r.width=n,r.height=o,a.translate(n,0),a.scale(-1,1);break;case 3:r.width=n,r.height=o,a.translate(n/2,o/2),a.rotate(180*Math.PI/180),a.translate(-n/2,-o/2);break;case 4:r.width=n,r.height=o,a.translate(0,o),a.scale(1,-1);break;case 5:r.height=n,r.width=o,a.rotate(.5*Math.PI),a.scale(1,-1);break;case 6:r.width=o,r.height=n,a.translate(o/2,n/2),a.rotate(90*Math.PI/180),a.translate(-n/2,-o/2);break;case 7:r.height=n,r.width=o,a.rotate(.5*Math.PI),a.translate(n,-o),a.scale(-1,1);break;case 8:r.height=n,r.width=o,a.translate(o/2,n/2),a.rotate(-90*Math.PI/180),a.translate(-n/2,-o/2);break;default:r.width=n,r.height=o}a.drawImage(t,0,0,n,o),a.restore(),r.toBlob(function(t){var e=URL.createObjectURL(t);i.imgs=e},"image/"+this.outputType,1)},checkedImg:function(){var t=this;if(""!==this.img){this.loading=!0,this.scale=1,this.rotate=0,this.clearCrop();var e=new Image;if(e.onload=function(){if(""===t.img)return t.$emit("imgLoad","error"),t.$emit("img-load","error"),!1;var n=e.width,i=e.height;o.a.getData(e).then(function(o){t.orientation=o.orientation||1;var r=t.maxImgSize;if(!t.orientation&&nr&&(i=i/n*r,n=r),i>r&&(n=n/i*r,i=r),t.checkOrientationImage(e,t.orientation,n,i)})},e.onerror=function(){t.$emit("imgLoad","error"),t.$emit("img-load","error")},"data"!==this.img.substr(0,4)&&(e.crossOrigin=""),this.isIE){var n=new XMLHttpRequest;n.onload=function(){var t=URL.createObjectURL(this.response);e.src=t},n.open("GET",this.img,!0),n.responseType="blob",n.send()}else e.src=this.img}},startMove:function(t){if(t.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=(t.clientX?t.clientX:t.touches[0].clientX)-this.x,this.moveY=(t.clientY?t.clientY:t.touches[0].clientY)-this.y,t.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),2==t.touches.length&&(this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("imgMoving",{moving:!0,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=t.offsetX?t.offsetX:t.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=t.offsetY?t.offsetY:t.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX=t.clientX?t.clientX:t.touches[0].clientX,this.cropY=t.clientY?t.clientY:t.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale:function(t){var e=this;t.preventDefault();var n=this.scale,o={x:this.touches[0].clientX,y:this.touches[0].clientY},i={x:t.touches[0].clientX,y:t.touches[0].clientY},r={x:this.touches[1].clientX,y:this.touches[1].clientY},a={x:t.touches[1].clientX,y:t.touches[1].clientY},s=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),c=Math.sqrt(Math.pow(i.x-a.x,2)+Math.pow(i.y-a.y,2)),p=c-s,l=1;l=l/this.trueWidth>l/this.trueHeight?l/this.trueHeight:l/this.trueWidth,l=l>.1?.1:l;var u=l*p;if(!this.touchNow){if(this.touchNow=!0,p>0?n+=Math.abs(u):p<0&&n>Math.abs(u)&&(n-=Math.abs(u)),this.touches=t.touches,setTimeout(function(){e.touchNow=!1},8),!this.checkoutImgAxis(this.x,this.y,n))return!1;this.scale=n}},cancelTouchScale:function(t){window.removeEventListener("touchmove",this.touchScale)},moveImg:function(t){var e=this;if(t.preventDefault(),t.touches&&2===t.touches.length)return this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;var n=t.clientX?t.clientX:t.touches[0].clientX,o=t.clientY?t.clientY:t.touches[0].clientY,i=void 0,r=void 0;i=n-this.moveX,r=o-this.moveY,this.$nextTick(function(){if(e.centerBox){var t=e.getImgAxis(i,r,e.scale),n=e.getCropAxis(),o=e.trueHeight*e.scale,a=e.trueWidth*e.scale,s=void 0,c=void 0,p=void 0,l=void 0;switch(e.rotate){case 1:case-1:case 3:case-3:s=e.cropOffsertX-e.trueWidth*(1-e.scale)/2+(o-a)/2,c=e.cropOffsertY-e.trueHeight*(1-e.scale)/2+(a-o)/2,p=s-o+e.cropW,l=c-a+e.cropH;break;default:s=e.cropOffsertX-e.trueWidth*(1-e.scale)/2,c=e.cropOffsertY-e.trueHeight*(1-e.scale)/2,p=s-a+e.cropW,l=c-o+e.cropH}t.x1>=n.x1&&(i=s),t.y1>=n.y1&&(r=c),t.x2<=n.x2&&(i=p),t.y2<=n.y2&&(r=l)}e.x=i,e.y=r,e.$emit("imgMoving",{moving:!0,axis:e.getImgAxis()}),e.$emit("img-moving",{moving:!0,axis:e.getImgAxis()})})},leaveImg:function(t){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("imgMoving",{moving:!1,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg:function(){this.canScale&&window.addEventListener(this.support,this.changeSize,{passive:!1})},cancelScale:function(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize:function(t){var e=this;t.preventDefault();var n=this.scale,o=t.deltaY||t.wheelDelta;o=navigator.userAgent.indexOf("Firefox")>0?30*o:o,this.isIE&&(o=-o);var i=this.coe;i=i/this.trueWidth>i/this.trueHeight?i/this.trueHeight:i/this.trueWidth;var r=i*o;r<0?n+=Math.abs(r):n>Math.abs(r)&&(n-=Math.abs(r));var a=r<0?"add":"reduce";if(a!==this.coeStatus&&(this.coeStatus=a,this.coe=.2),this.scaling||(this.scalingSet=setTimeout(function(){e.scaling=!1,e.coe=e.coe+=.01},50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,n))return!1;this.scale=n},changeScale:function(t){var e=this.scale;t=t||1;var n=20;if(n=n/this.trueWidth>n/this.trueHeight?n/this.trueHeight:n/this.trueWidth,t*=n,t>0?e+=Math.abs(t):e>Math.abs(t)&&(e-=Math.abs(t)),!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e},createCrop:function(t){var e=this;t.preventDefault();var n=t.clientX?t.clientX:t.touches?t.touches[0].clientX:0,o=t.clientY?t.clientY:t.touches?t.touches[0].clientY:0;this.$nextTick(function(){var t=n-e.cropX,i=o-e.cropY;if(t>0?(e.cropW=t+e.cropChangeX>e.w?e.w-e.cropChangeX:t,e.cropOffsertX=e.cropChangeX):(e.cropW=e.w-e.cropChangeX+Math.abs(t)>e.w?e.cropChangeX:Math.abs(t),e.cropOffsertX=e.cropChangeX+t>0?e.cropChangeX+t:0),e.fixed){var r=e.cropW/e.fixedNumber[0]*e.fixedNumber[1];r+e.cropOffsertY>e.h?(e.cropH=e.h-e.cropOffsertY,e.cropW=e.cropH/e.fixedNumber[1]*e.fixedNumber[0],e.cropOffsertX=t>0?e.cropChangeX:e.cropChangeX-e.cropW):e.cropH=r,e.cropOffsertY=e.cropOffsertY}else i>0?(e.cropH=i+e.cropChangeY>e.h?e.h-e.cropChangeY:i,e.cropOffsertY=e.cropChangeY):(e.cropH=e.h-e.cropChangeY+Math.abs(i)>e.h?e.cropChangeY:Math.abs(i),e.cropOffsertY=e.cropChangeY+i>0?e.cropChangeY+i:0)})},changeCropSize:function(t,e,n,o,i){t.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=e,this.canChangeY=n,this.changeCropTypeX=o,this.changeCropTypeY=i,this.cropX=t.clientX?t.clientX:t.touches[0].clientX,this.cropY=t.clientY?t.clientY:t.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0)},changeCropNow:function(t){var e=this;t.preventDefault();var n=t.clientX?t.clientX:t.touches?t.touches[0].clientX:0,o=t.clientY?t.clientY:t.touches?t.touches[0].clientY:0,i=this.w,r=this.h,a=0,s=0;if(this.centerBox){var c=this.getImgAxis(),p=c.x2,l=c.y2;a=c.x1>0?c.x1:0,s=c.y1>0?c.y1:0,i>p&&(i=p),r>l&&(r=l)}this.$nextTick(function(){var t=n-e.cropX,c=o-e.cropY;if(e.canChangeX&&(1===e.changeCropTypeX?e.cropOldW-t>0?(e.cropW=i-e.cropChangeX-t<=i-a?e.cropOldW-t:e.cropOldW+e.cropChangeX-a,e.cropOffsertX=i-e.cropChangeX-t<=i-a?e.cropChangeX+t:a):(e.cropW=Math.abs(t)+e.cropChangeX<=i?Math.abs(t)-e.cropOldW:i-e.cropOldW-e.cropChangeX,e.cropOffsertX=e.cropChangeX+e.cropOldW):2===e.changeCropTypeX&&(e.cropOldW+t>0?(e.cropW=e.cropOldW+t+e.cropOffsertX<=i?e.cropOldW+t:i-e.cropOffsertX,e.cropOffsertX=e.cropChangeX):(e.cropW=i-e.cropChangeX+Math.abs(t+e.cropOldW)<=i-a?Math.abs(t+e.cropOldW):e.cropChangeX-a,e.cropOffsertX=i-e.cropChangeX+Math.abs(t+e.cropOldW)<=i-a?e.cropChangeX-Math.abs(t+e.cropOldW):a))),e.canChangeY&&(1===e.changeCropTypeY?e.cropOldH-c>0?(e.cropH=r-e.cropChangeY-c<=r-s?e.cropOldH-c:e.cropOldH+e.cropChangeY-s,e.cropOffsertY=r-e.cropChangeY-c<=r-s?e.cropChangeY+c:s):(e.cropH=Math.abs(c)+e.cropChangeY<=r?Math.abs(c)-e.cropOldH:r-e.cropOldH-e.cropChangeY,e.cropOffsertY=e.cropChangeY+e.cropOldH):2===e.changeCropTypeY&&(e.cropOldH+c>0?(e.cropH=e.cropOldH+c+e.cropOffsertY<=r?e.cropOldH+c:r-e.cropOffsertY,e.cropOffsertY=e.cropChangeY):(e.cropH=r-e.cropChangeY+Math.abs(c+e.cropOldH)<=r-s?Math.abs(c+e.cropOldH):e.cropChangeY-s,e.cropOffsertY=r-e.cropChangeY+Math.abs(c+e.cropOldH)<=r-s?e.cropChangeY-Math.abs(c+e.cropOldH):s))),e.canChangeX&&e.fixed){var p=e.cropW/e.fixedNumber[0]*e.fixedNumber[1];p+e.cropOffsertY>r?(e.cropH=r-e.cropOffsertY,e.cropW=e.cropH/e.fixedNumber[1]*e.fixedNumber[0]):e.cropH=p}if(e.canChangeY&&e.fixed){var l=e.cropH/e.fixedNumber[1]*e.fixedNumber[0];l+e.cropOffsertX>i?(e.cropW=i-e.cropOffsertX,e.cropH=e.cropW/e.fixedNumber[0]*e.fixedNumber[1]):e.cropW=l}})},changeCropEnd:function(t){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},endCrop:function(){0===this.cropW&&0===this.cropH&&(this.cropping=!1),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop:function(){this.crop=!0},stopCrop:function(){this.crop=!1},clearCrop:function(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove:function(t){if(t.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(t),!1;if(t.touches&&2===t.touches.length)return this.crop=!1,this.startMove(t),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);var e=t.clientX?t.clientX:t.touches[0].clientX,n=t.clientY?t.clientY:t.touches[0].clientY,o=void 0,i=void 0;o=e-this.cropOffsertX,i=n-this.cropOffsertY,this.cropX=o,this.cropY=i,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop:function(t,e){var n=this,o=0,i=0;t&&(t.preventDefault(),o=t.clientX?t.clientX:t.touches[0].clientX,i=t.clientY?t.clientY:t.touches[0].clientY),this.$nextTick(function(){var t=void 0,r=void 0,a=o-n.cropX,s=i-n.cropY;if(e&&(a=n.cropOffsertX,s=n.cropOffsertY),t=a<=0?0:a+n.cropW>n.w?n.w-n.cropW:a,r=s<=0?0:s+n.cropH>n.h?n.h-n.cropH:s,n.centerBox){var c=n.getImgAxis();t<=c.x1&&(t=c.x1),t+n.cropW>c.x2&&(t=c.x2-n.cropW),r<=c.y1&&(r=c.y1),r+n.cropH>c.y2&&(r=c.y2-n.cropH)}n.cropOffsertX=t,n.cropOffsertY=r,n.$emit("cropMoving",{moving:!0,axis:n.getCropAxis()}),n.$emit("crop-moving",{moving:!0,axis:n.getCropAxis()})})},getImgAxis:function(t,e,n){t=t||this.x,e=e||this.y,n=n||this.scale;var o={x1:0,x2:0,y1:0,y2:0},i=this.trueWidth*n,r=this.trueHeight*n;switch(this.rotate){case 0:o.x1=t+this.trueWidth*(1-n)/2,o.x2=o.x1+this.trueWidth*n,o.y1=e+this.trueHeight*(1-n)/2,o.y2=o.y1+this.trueHeight*n;break;case 1:case-1:case 3:case-3:o.x1=t+this.trueWidth*(1-n)/2+(i-r)/2,o.x2=o.x1+this.trueHeight*n,o.y1=e+this.trueHeight*(1-n)/2+(r-i)/2,o.y2=o.y1+this.trueWidth*n;break;default:o.x1=t+this.trueWidth*(1-n)/2,o.x2=o.x1+this.trueWidth*n,o.y1=e+this.trueHeight*(1-n)/2,o.y2=o.y1+this.trueHeight*n}return o},getCropAxis:function(){var t={x1:0,x2:0,y1:0,y2:0};return t.x1=this.cropOffsertX,t.x2=t.x1+this.cropW,t.y1=this.cropOffsertY,t.y2=t.y1+this.cropH,t},leaveCrop:function(t){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("cropMoving",{moving:!1,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked:function(t){function e(t,e){o.width=Math.round(t),o.height=Math.round(e)}var n=this,o=document.createElement("canvas"),i=new Image,r=this.rotate,a=this.trueWidth,s=this.trueHeight,c=this.cropOffsertX,p=this.cropOffsertY;i.onload=function(){if(0!==n.cropW){var l=o.getContext("2d"),u=1;n.high&!n.full&&(u=window.devicePixelRatio),1!==n.enlarge&!n.full&&(u=Math.abs(Number(n.enlarge)),console.log(u));var f=n.cropW*u,d=n.cropH*u,h=a*n.scale*u,v=s*n.scale*u,m=(n.x-c+n.trueWidth*(1-n.scale)/2)*u,g=(n.y-p+n.trueHeight*(1-n.scale)/2)*u;switch(e(f,d),l.save(),r){case 0:n.full?(e(f/n.scale,d/n.scale),l.drawImage(i,m/n.scale,g/n.scale,h/n.scale,v/n.scale)):l.drawImage(i,m,g,h,v);break;case 1:case-3:n.full?(e(f/n.scale,d/n.scale),m=m/n.scale+(h/n.scale-v/n.scale)/2,g=g/n.scale+(v/n.scale-h/n.scale)/2,l.rotate(90*r*Math.PI/180),l.drawImage(i,g,-m-v/n.scale,h/n.scale,v/n.scale)):(m+=(h-v)/2,g+=(v-h)/2,l.rotate(90*r*Math.PI/180),l.drawImage(i,g,-m-v,h,v));break;case 2:case-2:n.full?(e(f/n.scale,d/n.scale),l.rotate(90*r*Math.PI/180),m/=n.scale,g/=n.scale,l.drawImage(i,-m-h/n.scale,-g-v/n.scale,h/n.scale,v/n.scale)):(l.rotate(90*r*Math.PI/180),l.drawImage(i,-m-h,-g-v,h,v));break;case 3:case-1:n.full?(e(f/n.scale,d/n.scale),m=m/n.scale+(h/n.scale-v/n.scale)/2,g=g/n.scale+(v/n.scale-h/n.scale)/2,l.rotate(90*r*Math.PI/180),l.drawImage(i,-g-h/n.scale,m,h/n.scale,v/n.scale)):(m+=(h-v)/2,g+=(v-h)/2,l.rotate(90*r*Math.PI/180),l.drawImage(i,-g-h,m,h,v));break;default:n.full?(e(f/n.scale,d/n.scale),l.drawImage(i,m/n.scale,g/n.scale,h/n.scale,v/n.scale)):l.drawImage(i,m,g,h,v)}l.restore()}else{var y=a*n.scale,b=s*n.scale,x=o.getContext("2d");switch(x.save(),r){case 0:e(y,b),x.drawImage(i,0,0,y,b);break;case 1:case-3:e(b,y),x.rotate(90*r*Math.PI/180),x.drawImage(i,0,-b,y,b);break;case 2:case-2:e(y,b),x.rotate(90*r*Math.PI/180),x.drawImage(i,-y,-b,y,b);break;case 3:case-1:e(b,y),x.rotate(90*r*Math.PI/180),x.drawImage(i,-y,0,y,b);break;default:e(y,b),x.drawImage(i,0,0,y,b)}x.restore()}t(o)},"data"!==this.img.substr(0,4)&&(i.crossOrigin="Anonymous"),i.src=this.imgs},getCropData:function(t){var e=this;this.getCropChecked(function(n){t(n.toDataURL("image/"+e.outputType,e.outputSize))})},getCropBlob:function(t){var e=this;this.getCropChecked(function(n){n.toBlob(function(e){return t(e)},"image/"+e.outputType,e.outputSize)})},showPreview:function(){var t=this;if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout(function(){t.isCanShow=!0},16);var e=this.cropW,n=this.cropH,o=this.scale,i={};i.div={width:e+"px",height:n+"px"};var r=(this.x-this.cropOffsertX)/o,a=(this.y-this.cropOffsertY)/o;i.w=e,i.h=n,i.url=this.imgs,i.img={width:this.trueWidth+"px",height:this.trueHeight+"px",transform:"scale("+o+")translate3d("+r+"px, "+a+"px, 0px)rotateZ("+90*this.rotate+"deg)"},i.html='\n
\n
\n \n
\n
',this.$emit("realTime",i),this.$emit("real-time",i)},reload:function(){var t=this,e=new Image;e.onload=function(){t.w=parseFloat(window.getComputedStyle(t.$refs.cropper).width),t.h=parseFloat(window.getComputedStyle(t.$refs.cropper).height),t.trueWidth=e.width,t.trueHeight=e.height,t.original?t.scale=1:t.scale=t.checkedMode(),t.$nextTick(function(){t.x=-(t.trueWidth-t.trueWidth*t.scale)/2+(t.w-t.trueWidth*t.scale)/2,t.y=-(t.trueHeight-t.trueHeight*t.scale)/2+(t.h-t.trueHeight*t.scale)/2,t.loading=!1,t.autoCrop&&t.goAutoCrop(),t.$emit("img-load","success"),t.$emit("imgLoad","success"),setTimeout(function(){t.showPreview()},20)})},e.onerror=function(){t.$emit("imgLoad","error"),t.$emit("img-load","error")},e.src=this.imgs},checkedMode:function(){var t=1,e=this.trueWidth,n=this.trueHeight,o=this.mode.split(" ");switch(o[0]){case"contain":this.trueWidth>this.w&&(t=this.w/this.trueWidth),this.trueHeight*t>this.h&&(t=this.h/this.trueHeight);break;case"cover":e=this.w,t=e/this.trueWidth,n*=t,nn?n:a,s=s>o?o:s,this.fixed&&(s=a/this.fixedNumber[0]*this.fixedNumber[1]),s>this.h&&(s=this.h,a=s/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(a,s)},changeCrop:function(t,e){var n=this;if(this.centerBox){var o=this.getImgAxis();t>o.x2-o.x1&&(t=o.x2-o.x1,e=t/this.fixedNumber[0]*this.fixedNumber[1]),e>o.y2-o.y1&&(e=o.y2-o.y1,t=e/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=t,this.cropH=e,this.cropOffsertX=(this.w-t)/2,this.cropOffsertY=(this.h-e)/2,this.centerBox&&this.$nextTick(function(){n.moveCrop(null,!0)})},refresh:function(){var t=this;this.img;this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.clearCrop(),this.$nextTick(function(){t.checkedImg()})},rotateLeft:function(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight:function(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear:function(){this.rotate=0},checkoutImgAxis:function(t,e,n){t=t||this.x,e=e||this.y,n=n||this.scale;var o=!0;if(this.centerBox){var i=this.getImgAxis(t,e,n),r=this.getCropAxis();i.x1>=r.x1&&(o=!1),i.x2<=r.x2&&(o=!1),i.y1>=r.y1&&(o=!1),i.y2<=r.y2&&(o=!1)}return o}},mounted:function(){this.support="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";var t=this,e=navigator.userAgent;this.isIOS=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,n,o){for(var i=atob(this.toDataURL(n,o).split(",")[1]),r=i.length,a=new Uint8Array(r),s=0;s=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function d(t){var e=parseFloat(t);return isNaN(e)?t:e}function h(t,e){for(var n=Object.create(null),o=t.split(","),i=0;i-1)return t.splice(n,1)}}function m(t,e){return wo.call(t,e)}function g(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function y(t,e){function n(n){var o=arguments.length;return o?o>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function b(t,e){return t.bind(e)}function x(t,e){e=e||0;for(var n=t.length-e,o=new Array(n);n--;)o[n]=t[n+e];return o}function w(t,e){for(var n in e)t[n]=e[n];return t}function _(t){for(var e={},n=0;n-1)if(r&&!m(i,"default"))a=!1;else if(""===a||a===$o(t)){var c=nt(String,i.type);(c<0||s0&&(a=bt(a,(e||"")+"_"+n),yt(a[0])&&yt(p)&&(l[c]=L(p.text+a[0].text),a.shift()),l.push.apply(l,a)):s(a)?yt(p)?l[c]=L(p.text+a):""!==a&&l.push(L(a)):yt(a)&&yt(p)?l[c]=L(p.text+a.text):(r(t._isVList)&&i(a.tag)&&o(a.key)&&i(e)&&(a.key="__vlist"+e+"_"+n+"__"),l.push(a)));return l}function xt(t,e){return(t.__esModule||Ko&&"Module"===t[Symbol.toStringTag])&&(t=t.default),c(t)?e.extend(t):t}function wt(t,e,n,o,i){var r=ii();return r.asyncFactory=t,r.asyncMeta={data:e,context:n,children:o,tag:i},r}function _t(t,e,n){if(r(t.error)&&i(t.errorComp))return t.errorComp;if(i(t.resolved))return t.resolved;if(r(t.loading)&&i(t.loadingComp))return t.loadingComp;if(!i(t.contexts)){var a=t.contexts=[n],s=!0,p=function(){for(var t=0,e=a.length;tTi&&ki[n].id>t.id;)n--;ki.splice(n+1,0,t)}else ki.push(t);Oi||(Oi=!0,ct(Pt))}}function Rt(t,e,n){Ei.get=function(){return this[e][n]},Ei.set=function(t){this[e][n]=t},Object.defineProperty(t,n,Ei)}function Ft(t){t._watchers=[];var e=t.$options;e.props&&Vt(t,e.props),e.methods&&Qt(t,e.methods),e.data?qt(t):W(t._data={},!0),e.computed&&Zt(t,e.computed),e.watch&&e.watch!==Uo&&te(t,e.watch)}function Vt(t,e){var n=t.$options.propsData||{},o=t._props={},i=t.$options._propKeys=[];!t.$parent||H(!1);for(var r in e)!function(r){i.push(r);var a=J(r,e,n,t);X(o,r,a),r in t||Rt(t,"_props",r)}(r);H(!0)}function qt(t){var e=t.$options.data;e=t._data="function"==typeof e?Gt(e,t):e||{},p(e)||(e={});for(var n=Object.keys(e),o=t.$options.props,i=(t.$options.methods,n.length);i--;){var r=n[i];o&&m(o,r)||O(r)||Rt(t,"_data",r)}W(e,!0)}function Gt(t,e){M();try{return t.call(e,e)}catch(t){return ot(t,e,"data()"),{}}finally{E()}}function Zt(t,e){var n=t._computedWatchers=Object.create(null),o=Go();for(var i in e){var r=e[i],a="function"==typeof r?r:r.get;o||(n[i]=new Mi(t,a||C,C,Li)),i in t||Kt(t,i,r)}}function Kt(t,e,n){var o=!Go();"function"==typeof n?(Ei.get=o?Jt(e):n,Ei.set=C):(Ei.get=n.get?o&&!1!==n.cache?Jt(e):n.get:C,Ei.set=n.set?n.set:C),Object.defineProperty(t,e,Ei)}function Jt(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),ti.target&&e.depend(),e.value}}function Qt(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?C:Oo(e[n],t)}function te(t,e){for(var n in e){var o=e[n];if(Array.isArray(o))for(var i=0;i=0||n.indexOf(t[i])<0)&&o.push(t[i]);return o}return t}function Be(t){this._init(t)}function He(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=x(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}function je(t){t.mixin=function(t){return this.options=Z(this.options,t),this}}function Ne(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,o=n.cid,i=t._Ctor||(t._Ctor={});if(i[o])return i[o];var r=t.name||n.options.name,a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=Z(n.options,t),a.super=n,a.options.props&&We(a),a.options.computed&&Xe(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Mo.forEach(function(t){a[t]=n[t]}),r&&(a.options.components[r]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=w({},a.options),i[o]=a,a}}function We(t){var e=t.options.props;for(var n in e)Rt(t.prototype,"_props",n)}function Xe(t){var e=t.options.computed;for(var n in e)Kt(t.prototype,n,e[n])}function Pe(t){Mo.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&p(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}function Ye(t){return t&&(t.Ctor.options.name||t.tag)}function ze(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function De(t,e){var n=t.cache,o=t.keys,i=t._vnode;for(var r in n){var a=n[r];if(a){var s=Ye(a.componentOptions);s&&!e(s)&&Ue(n,r,o,i)}}}function Ue(t,e,n,o){var i=t[e];!i||o&&i.tag===o.tag||i.componentInstance.$destroy(),t[e]=null,v(n,e)}function Re(t){for(var e=t.data,n=t,o=t;i(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(e=Fe(o.data,e));for(;i(n=n.parent);)n&&n.data&&(e=Fe(e,n.data));return Ve(e.staticClass,e.class)}function Fe(t,e){return{staticClass:qe(t.staticClass,e.staticClass),class:i(t.class)?[t.class,e.class]:e.class}}function Ve(t,e){return i(t)||i(e)?qe(t,Ge(e)):""}function qe(t,e){return t?e?t+" "+e:t:e||""}function Ge(t){return Array.isArray(t)?Ze(t):c(t)?Ke(t):"string"==typeof t?t:""}function Ze(t){for(var e,n="",o=0,r=t.length;o-1?or[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:or[t]=/HTMLUnknownElement/.test(e.toString())}function tn(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function en(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function nn(t,e){return document.createElementNS(Qi[t],e)}function on(t){return document.createTextNode(t)}function rn(t){return document.createComment(t)}function an(t,e,n){t.insertBefore(e,n)}function sn(t,e){t.removeChild(e)}function cn(t,e){t.appendChild(e)}function pn(t){return t.parentNode}function ln(t){return t.nextSibling}function un(t){return t.tagName}function fn(t,e){t.textContent=e}function dn(t,e){t.setAttribute(e,"")}function hn(t,e){var n=t.data.ref;if(i(n)){var o=t.context,r=t.componentInstance||t.elm,a=o.$refs;e?Array.isArray(a[n])?v(a[n],r):a[n]===r&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(r)<0&&a[n].push(r):a[n]=[r]:a[n]=r}}function vn(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&i(t.data)===i(e.data)&&mn(t,e)||r(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&o(e.asyncFactory.error))}function mn(t,e){if("input"!==t.tag)return!0;var n,o=i(n=t.data)&&i(n=n.attrs)&&n.type,r=i(n=e.data)&&i(n=n.attrs)&&n.type;return o===r||ir(o)&&ir(r)}function gn(t,e,n){var o,r,a={};for(o=e;o<=n;++o)r=t[o].key,i(r)&&(a[r]=o);return a}function yn(t,e){(t.data.directives||e.data.directives)&&bn(t,e)}function bn(t,e){var n,o,i,r=t===sr,a=e===sr,s=xn(t.data.directives,t.context),c=xn(e.data.directives,e.context),p=[],l=[];for(n in c)o=s[n],i=c[n],o?(i.oldValue=o.value,_n(i,"update",e,t),i.def&&i.def.componentUpdated&&l.push(i)):(_n(i,"bind",e,t),i.def&&i.def.inserted&&p.push(i));if(p.length){var u=function(){for(var n=0;n-1?An(t,e,n):qi(e)?Ji(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Vi(e)?t.setAttribute(e,Ji(n)||"false"===n?"false":"true"):Zi(e)?Ji(n)?t.removeAttributeNS(Gi,Ki(e)):t.setAttributeNS(Gi,e,n):An(t,e,n)}function An(t,e,n){if(Ji(n))t.removeAttribute(e);else{if(Po&&!Yo&&"TEXTAREA"===t.tagName&&"placeholder"===e&&!t.__ieph){var o=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",o)};t.addEventListener("input",o),t.__ieph=!0}t.setAttribute(e,n)}}function $n(t,e){var n=e.elm,r=e.data,a=t.data;if(!(o(r.staticClass)&&o(r.class)&&(o(a)||o(a.staticClass)&&o(a.class)))){var s=Re(e),c=n._transitionClasses;i(c)&&(s=qe(s,Ge(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}function On(t){if(i(t[hr])){var e=Po?"change":"input";t[e]=[].concat(t[hr],t[e]||[]),delete t[hr]}i(t[vr])&&(t.change=[].concat(t[vr],t.change||[]),delete t[vr])}function Sn(t,e,n){var o=zi;return function i(){null!==t.apply(null,arguments)&&In(e,i,n,o)}}function Tn(t,e,n,o,i){e=st(e),n&&(e=Sn(e,t,o)),zi.addEventListener(t,e,Ro?{capture:o,passive:i}:o)}function In(t,e,n,o){(o||zi).removeEventListener(t,e._withTask||e,n)}function Mn(t,e){if(!o(t.data.on)||!o(e.data.on)){var n=e.data.on||{},i=t.data.on||{};zi=e.elm,On(n),ft(n,i,Tn,In,e.context),zi=void 0}}function En(t,e){if(!o(t.data.domProps)||!o(e.data.domProps)){var n,r,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};i(c.__ob__)&&(c=e.data.domProps=w({},c));for(n in s)o(c[n])&&(a[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=r;var p=o(r)?"":String(r);Ln(a,p)&&(a.value=p)}else a[n]=r}}}function Ln(t,e){return!t.composing&&("OPTION"===t.tagName||Bn(t,e)||Hn(t,e))}function Bn(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}function Hn(t,e){var n=t.value,o=t._vModifiers;if(i(o)){if(o.lazy)return!1;if(o.number)return d(n)!==d(e);if(o.trim)return n.trim()!==e.trim()}return n!==e}function jn(t){var e=Nn(t.style);return t.staticStyle?w(t.staticStyle,e):e}function Nn(t){return Array.isArray(t)?_(t):"string"==typeof t?yr(t):t}function Wn(t,e){var n,o={};if(e)for(var i=t;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=jn(i.data))&&w(o,n);(n=jn(t.data))&&w(o,n);for(var r=t;r=r.parent;)r.data&&(n=jn(r.data))&&w(o,n);return o}function Xn(t,e){var n=e.data,r=t.data;if(!(o(n.staticStyle)&&o(n.style)&&o(r.staticStyle)&&o(r.style))){var a,s,c=e.elm,p=r.staticStyle,l=r.normalizedStyle||r.style||{},u=p||l,f=Nn(e.data.style)||{};e.data.normalizedStyle=i(f.__ob__)?w({},f):f;var d=Wn(e,!0);for(s in u)o(d[s])&&wr(c,s,"");for(s in d)(a=d[s])!==u[s]&&wr(c,s,null==a?"":a)}}function Pn(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Yn(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",o=" "+e+" ";n.indexOf(o)>=0;)n=n.replace(o," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function zn(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&w(e,Ar(t.name||"v")),w(e,t),e}return"string"==typeof t?Ar(t):void 0}}function Dn(t){Lr(function(){Lr(t)})}function Un(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Pn(t,e))}function Rn(t,e){t._transitionClasses&&v(t._transitionClasses,e),Yn(t,e)}function Fn(t,e,n){var o=Vn(t,e),i=o.type,r=o.timeout,a=o.propCount;if(!i)return n();var s=i===Or?Ir:Er,c=0,p=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&p()};setTimeout(function(){c0&&(n=Or,l=a,u=r.length):e===Sr?p>0&&(n=Sr,l=p,u=c.length):(l=Math.max(a,p),n=l>0?a>p?Or:Sr:null,u=n?n===Or?r.length:c.length:0),{type:n,timeout:l,propCount:u,hasTransform:n===Or&&Br.test(o[Tr+"Property"])}}function qn(t,e){for(;t.length1}function to(t,e){!0!==e.data.show&&Zn(e)}function eo(t,e,n){no(t,e,n),(Po||zo)&&setTimeout(function(){no(t,e,n)},0)}function no(t,e,n){var o=e.value,i=t.multiple;if(!i||Array.isArray(o)){for(var r,a,s=0,c=t.options.length;s-1,a.selected!==r&&(a.selected=r);else if(k(io(a),o))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function oo(t,e){return e.every(function(e){return!k(e,t)})}function io(t){return"_value"in t?t._value:t.value}function ro(t){t.target.composing=!0}function ao(t){t.target.composing&&(t.target.composing=!1,so(t.target,"input"))}function so(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function co(t){return!t.componentInstance||t.data&&t.data.transition?t:co(t.componentInstance._vnode)}function po(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?po(kt(e.children)):t}function lo(t){var e={},n=t.$options;for(var o in n.propsData)e[o]=t[o];var i=n._parentListeners;for(var r in i)e[Co(r)]=i[r];return e}function uo(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function fo(t){for(;t=t.parent;)if(t.data.transition)return!0}function ho(t,e){return e.key===t.key&&e.tag===t.tag}function vo(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function mo(t){t.data.newPos=t.elm.getBoundingClientRect()}function go(t){var e=t.data.pos,n=t.data.newPos,o=e.left-n.left,i=e.top-n.top;if(o||i){t.data.moved=!0;var r=t.elm.style;r.transform=r.WebkitTransform="translate("+o+"px,"+i+"px)",r.transitionDuration="0s"}}/*! * Vue.js v2.5.17 * (c) 2014-2018 Evan You * Released under the MIT License. */ var yo=Object.freeze({}),bo=Object.prototype.toString,xo=(h("slot,component",!0),h("key,ref,slot,slot-scope,is")),wo=Object.prototype.hasOwnProperty,_o=/-(\w)/g,Co=g(function(t){return t.replace(_o,function(t,e){return e?e.toUpperCase():""})}),ko=g(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),Ao=/\B([A-Z])/g,$o=g(function(t){return t.replace(Ao,"-$1").toLowerCase()}),Oo=Function.prototype.bind?b:y,So=function(t,e,n){return!1},To=function(t){return t},Io="data-server-rendered",Mo=["component","directive","filter"],Eo=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],Lo={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:So,isReservedAttr:So,isUnknownElement:So,getTagNamespace:C,parsePlatformTagName:To,mustUseProp:So,_lifecycleHooks:Eo},Bo=/[^\w.$]/,Ho="__proto__"in{},jo="undefined"!=typeof window,No="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,Wo=No&&WXEnvironment.platform.toLowerCase(),Xo=jo&&window.navigator.userAgent.toLowerCase(),Po=Xo&&/msie|trident/.test(Xo),Yo=Xo&&Xo.indexOf("msie 9.0")>0,zo=Xo&&Xo.indexOf("edge/")>0,Do=(Xo&&Xo.indexOf("android"),Xo&&/iphone|ipad|ipod|ios/.test(Xo)||"ios"===Wo),Uo=(Xo&&/chrome\/\d+/.test(Xo),{}.watch),Ro=!1;if(jo)try{var Fo={};Object.defineProperty(Fo,"passive",{get:function(){Ro=!0}}),window.addEventListener("test-passive",null,Fo)}catch(t){}var Vo,qo,Go=function(){return void 0===Vo&&(Vo=!jo&&!No&&void 0!==t&&"server"===t.process.env.VUE_ENV),Vo},Zo=jo&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Ko="undefined"!=typeof Symbol&&I(Symbol)&&"undefined"!=typeof Reflect&&I(Reflect.ownKeys);qo="undefined"!=typeof Set&&I(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var Jo=C,Qo=0,ti=function(){this.id=Qo++,this.subs=[]};ti.prototype.addSub=function(t){this.subs.push(t)},ti.prototype.removeSub=function(t){v(this.subs,t)},ti.prototype.depend=function(){ti.target&&ti.target.addDep(this)},ti.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e1?x(n):n;for(var o=x(arguments,1),i=0,r=n.length;iparseInt(this.max)&&Ue(c,p[0],p,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Yi={KeepAlive:Pi};!function(t){var e={};e.get=function(){return Lo},Object.defineProperty(t,"config",e),t.util={warn:Jo,extend:w,mergeOptions:Z,defineReactive:X},t.set=P,t.delete=Y,t.nextTick=ct,t.options=Object.create(null),Mo.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,w(t.options.components,Yi),He(t),je(t),Ne(t),Pe(t)}(Be),Object.defineProperty(Be.prototype,"$isServer",{get:Go}),Object.defineProperty(Be.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Be,"FunctionalRenderContext",{value:ge}),Be.version="2.5.17";var zi,Di,Ui=h("style,class"),Ri=h("input,textarea,option,select,progress"),Fi=function(t,e,n){return"value"===n&&Ri(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Vi=h("contenteditable,draggable,spellcheck"),qi=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Gi="http://www.w3.org/1999/xlink",Zi=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Ki=function(t){return Zi(t)?t.slice(6,t.length):""},Ji=function(t){return null==t||!1===t},Qi={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},tr=h("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),er=h("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),nr=function(t){return tr(t)||er(t)},or=Object.create(null),ir=h("text,number,password,search,email,tel,url"),rr=Object.freeze({createElement:en,createElementNS:nn,createTextNode:on,createComment:rn,insertBefore:an,removeChild:sn,appendChild:cn,parentNode:pn,nextSibling:ln,tagName:un,setTextContent:fn,setStyleScope:dn}),ar={create:function(t,e){hn(e)},update:function(t,e){t.data.ref!==e.data.ref&&(hn(t,!0),hn(e))},destroy:function(t){hn(t,!0)}},sr=new ni("",{},[]),cr=["create","activate","update","remove","destroy"],pr={create:yn,update:yn,destroy:function(t){yn(t,sr)}},lr=Object.create(null),ur=[ar,pr],fr={create:Cn,update:Cn},dr={create:$n,update:$n},hr="__r",vr="__c",mr={create:Mn,update:Mn},gr={create:En,update:En},yr=g(function(t){var e={},n=/;(?![^(]*\))/g,o=/:(.+)/;return t.split(n).forEach(function(t){if(t){var n=t.split(o);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}),br=/^--/,xr=/\s*!important$/,wr=function(t,e,n){if(br.test(e))t.style.setProperty(e,n);else if(xr.test(n))t.style.setProperty(e,n.replace(xr,""),"important");else{var o=Cr(e);if(Array.isArray(n))for(var i=0,r=n.length;ih?(u=o(n[g+1])?null:n[g+1].elm,y(t,u,n,d,g,r)):d>g&&x(t,e,f,h)}function C(t,e,n,o){for(var r=n;r=8&&(p=o+i))),p)for(d=f.getUint16(p,r),u=0;u1)for(var n=1;n=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(15),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n(3))},function(t,e,n){"use strict";function o(t){n(23)}var i=n(5),r=n(21),a=n(1),s=o,c=n.i(a.a)(i.a,r.a,r.b,!1,s,"data-v-7a4f1d74",null);e.a=c.exports},function(t,e,n){"use strict";function o(t){n(22)}var i=n(6),r=n(19),a=n(1),s=o,c=n.i(a.a)(i.a,r.a,r.b,!1,s,"data-v-199471f4",null);e.a=c.exports},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return i});var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"cropper",staticClass:"vue-cropper",on:{mouseover:t.scaleImg,mouseout:t.cancelScale}},[n("div",{staticClass:"cropper-box"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"}],staticClass:"cropper-box-canvas",style:{width:t.trueWidth+"px",height:t.trueHeight+"px",transform:"scale("+t.scale+","+t.scale+") translate3d("+t.x/t.scale+"px,"+t.y/t.scale+"px,0)rotateZ("+90*t.rotate+"deg)"}},[n("img",{ref:"cropperImg",attrs:{src:t.imgs,alt:"cropper-img"}})])]),t._v(" "),n("div",{staticClass:"cropper-drag-box",class:{"cropper-move":t.move&&!t.crop,"cropper-crop":t.crop,"cropper-modal":t.cropping},on:{mousedown:t.startMove,touchstart:t.startMove}}),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.cropping,expression:"cropping"}],staticClass:"cropper-crop-box",style:{width:t.cropW+"px",height:t.cropH+"px",transform:"translate3d("+t.cropOffsertX+"px,"+t.cropOffsertY+"px,0)"}},[n("span",{staticClass:"cropper-view-box"},[n("img",{style:{width:t.trueWidth+"px",height:t.trueHeight+"px",transform:"scale("+t.scale+","+t.scale+") translate3d("+(t.x-t.cropOffsertX)/t.scale+"px,"+(t.y-t.cropOffsertY)/t.scale+"px,0)rotateZ("+90*t.rotate+"deg)"},attrs:{src:t.imgs,alt:"cropper-img"}})]),t._v(" "),n("span",{staticClass:"cropper-face cropper-move",on:{mousedown:t.cropMove,touchstart:t.cropMove}}),t._v(" "),t.info?n("span",{staticClass:"crop-info",style:{top:t.cropInfo.top}},[t._v(t._s(this.cropInfo.width)+" × "+t._s(this.cropInfo.height))]):t._e(),t._v(" "),t.fixedBox?t._e():n("span",[n("span",{staticClass:"crop-line line-w",on:{mousedown:function(e){t.changeCropSize(e,!1,!0,0,1)},touchstart:function(e){t.changeCropSize(e,!1,!0,0,1)}}}),t._v(" "),n("span",{staticClass:"crop-line line-a",on:{mousedown:function(e){t.changeCropSize(e,!0,!1,1,0)},touchstart:function(e){t.changeCropSize(e,!0,!1,1,0)}}}),t._v(" "),n("span",{staticClass:"crop-line line-s",on:{mousedown:function(e){t.changeCropSize(e,!1,!0,0,2)},touchstart:function(e){t.changeCropSize(e,!1,!0,0,2)}}}),t._v(" "),n("span",{staticClass:"crop-line line-d",on:{mousedown:function(e){t.changeCropSize(e,!0,!1,2,0)},touchstart:function(e){t.changeCropSize(e,!0,!1,2,0)}}}),t._v(" "),n("span",{staticClass:"crop-point point1",on:{mousedown:function(e){t.changeCropSize(e,!0,!0,1,1)},touchstart:function(e){t.changeCropSize(e,!0,!0,1,1)}}}),t._v(" "),n("span",{staticClass:"crop-point point2",on:{mousedown:function(e){t.changeCropSize(e,!1,!0,0,1)},touchstart:function(e){t.changeCropSize(e,!1,!0,0,1)}}}),t._v(" "),n("span",{staticClass:"crop-point point3",on:{mousedown:function(e){t.changeCropSize(e,!0,!0,2,1)},touchstart:function(e){t.changeCropSize(e,!0,!0,2,1)}}}),t._v(" "),n("span",{staticClass:"crop-point point4",on:{mousedown:function(e){t.changeCropSize(e,!0,!1,1,0)},touchstart:function(e){t.changeCropSize(e,!0,!1,1,0)}}}),t._v(" "),n("span",{staticClass:"crop-point point5",on:{mousedown:function(e){t.changeCropSize(e,!0,!1,2,0)},touchstart:function(e){t.changeCropSize(e,!0,!1,2,0)}}}),t._v(" "),n("span",{staticClass:"crop-point point6",on:{mousedown:function(e){t.changeCropSize(e,!0,!0,1,2)},touchstart:function(e){t.changeCropSize(e,!0,!0,1,2)}}}),t._v(" "),n("span",{staticClass:"crop-point point7",on:{mousedown:function(e){t.changeCropSize(e,!1,!0,0,2)},touchstart:function(e){t.changeCropSize(e,!1,!0,0,2)}}}),t._v(" "),n("span",{staticClass:"crop-point point8",on:{mousedown:function(e){t.changeCropSize(e,!0,!0,2,2)},touchstart:function(e){t.changeCropSize(e,!0,!0,2,2)}}})])])])},i=[]},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return i});var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"wrapper"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.model,expression:"model"}],staticClass:"model"},[n("div",{staticClass:"model-show",on:{click:function(e){t.model=!1}}},[n("img",{attrs:{src:t.modelSrc,alt:""},on:{click:function(e){t.model=!1}}})])]),t._v(" "),n("div",{staticClass:"content"},[t._m(0),t._v(" "),n("iframe",{attrs:{src:"https://ghbtns.com/github-btn.html?user=xyxiao001&repo=vue-cropper&type=star&count=true&size=large",frameborder:"0",scrolling:"0",width:"160px",height:"30px"}}),t._v(" "),n("div",{staticClass:"show-info"},[n("h2",[t._v("install")]),t._v(" "),n("codes",[n("div",{attrs:{slot:"body"},slot:"body"},[t._v(t._s(t.code0))])])],1),t._v(" "),n("div",{staticClass:"show-info"},[n("h2",[t._v("example1 基本例子 无限制")]),t._v(" "),n("div",{staticClass:"test test1"},[n("vueCropper",{ref:"cropper",attrs:{img:t.option.img,outputSize:t.option.size,outputType:t.option.outputType,info:!0,full:t.option.full,canMove:t.option.canMove,canMoveBox:t.option.canMoveBox,fixedBox:t.option.fixedBox,original:t.option.original,autoCrop:t.option.autoCrop,autoCropWidth:t.option.autoCropWidth,autoCropHeight:t.option.autoCropHeight,centerBox:t.option.centerBox,high:t.option.high,infoTrue:t.option.infoTrue,maxImgSize:t.option.maxImageSize,enlarge:t.option.enlarge,mode:t.option.mode},on:{realTime:t.realTime,imgLoad:t.imgLoad,cropMoving:t.cropMoving}})],1),t._v(" "),n("div",{staticClass:"test-button"},[n("button",{staticClass:"btn",on:{click:t.changeImg}},[t._v("changeImg")]),t._v(" "),n("label",{staticClass:"btn",attrs:{for:"uploads"}},[t._v("upload")]),t._v(" "),n("input",{staticStyle:{position:"absolute",clip:"rect(0 0 0 0)"},attrs:{type:"file",id:"uploads",accept:"image/png, image/jpeg, image/gif, image/jpg"},on:{change:function(e){t.uploadImg(e,1)}}}),t._v(" "),t.crap?n("button",{staticClass:"btn",on:{click:t.stopCrop}},[t._v("stop")]):n("button",{staticClass:"btn",on:{click:t.startCrop}},[t._v("start")]),t._v(" "),n("button",{staticClass:"btn",on:{click:t.clearCrop}},[t._v("clear")]),t._v(" "),n("button",{staticClass:"btn",on:{click:t.refreshCrop}},[t._v("refresh")]),t._v(" "),n("button",{staticClass:"btn",on:{click:function(e){t.changeScale(1)}}},[t._v("+")]),t._v(" "),n("button",{staticClass:"btn",on:{click:function(e){t.changeScale(-1)}}},[t._v("-")]),t._v(" "),n("button",{staticClass:"btn",on:{click:t.rotateLeft}},[t._v("rotateLeft")]),t._v(" "),n("button",{staticClass:"btn",on:{click:t.rotateRight}},[t._v("rotateRight")]),t._v(" "),n("button",{staticClass:"btn",on:{click:function(e){t.finish("base64")}}},[t._v("preview(base64)")]),t._v(" "),n("button",{staticClass:"btn",on:{click:function(e){t.finish("blob")}}},[t._v("preview(blob)")]),t._v(" "),n("a",{staticClass:"btn",on:{click:function(e){t.down("base64")}}},[t._v("download(base64)")]),t._v(" "),n("a",{staticClass:"btn",on:{click:function(e){t.down("blob")}}},[t._v("download(blob)")]),t._v(" "),n("a",{ref:"downloadDom",attrs:{href:t.downImg,download:"demo.png"}})]),t._v(" "),n("div",{staticClass:"pre"},[n("section",{staticClass:"pre-item"},[n("p",[t._v("截图框大小")]),t._v(" "),n("div",{staticClass:"show-preview",style:{width:t.previews.w+"px",height:t.previews.h+"px",overflow:"hidden",margin:"5px"}},[n("div",{style:t.previews.div},[n("img",{style:t.previews.img,attrs:{src:t.previews.url}})])])]),t._v(" "),n("section",{staticClass:"pre-item"},[n("p",[t._v("中等大小")]),t._v(" "),n("div",{style:t.previewStyle1},[n("div",{style:t.previews.div},[n("img",{style:t.previews.img,attrs:{src:t.previews.url}})])])]),t._v(" "),n("section",{staticClass:"pre-item"},[n("p",[t._v("迷你大小")]),t._v(" "),n("div",{style:t.previewStyle2},[n("div",{style:t.previews.div},[n("img",{style:t.previews.img,attrs:{src:t.previews.url}})])])]),t._v(" "),n("section",{staticClass:"pre-item",attrs:{title:"zoom: (100 / previews.w)"}},[n("p",[t._v("固定为100宽度")]),t._v(" "),n("div",{style:t.previewStyle3},[n("div",{style:t.previews.div},[n("img",{style:t.previews.img,attrs:{src:t.previews.url}})])])]),t._v(" "),n("section",{staticClass:"pre-item",attrs:{title:"zoom: (100 / previews.h)"}},[n("p",[t._v("固定为100高度")]),t._v(" "),n("div",{style:t.previewStyle4},[n("div",{style:t.previews.div},[n("img",{style:t.previews.img,attrs:{src:t.previews.url}})])])])]),t._v(" "),n("div",{staticStyle:{display:"block",width:"100%"}},[n("label",{staticClass:"c-item"},[n("span",[t._v("图片默认渲染方式")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.option.mode,expression:"option.mode"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.$set(t.option,"mode",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:"contain"}},[t._v("contain")]),t._v(" "),n("option",{attrs:{value:"cover"}},[t._v("cover")]),t._v(" "),n("option",{attrs:{value:"400px auto"}},[t._v("400px auto")]),t._v(" "),n("option",{attrs:{value:"auto 400px"}},[t._v("auto 400px")]),t._v(" "),n("option",{attrs:{value:"50%"}},[t._v("50%")]),t._v(" "),n("option",{attrs:{value:"auto 50%"}},[t._v("auto 50%")])]),t._v(" "),n("section",[t._v("\n\t\t\t\t\t\t\t类似css background属性设置 设置不符合规范不生效, 参照文档说明\n\t\t\t\t\t\t")])]),t._v(" "),n("label",{staticClass:"c-item"},[n("span",[t._v("上传时图片最大大小(默认会压缩尺寸到这个大小)")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.maxImgSize,expression:"option.maxImgSize"}],attrs:{type:"nubmer"},domProps:{value:t.option.maxImgSize},on:{input:function(e){e.target.composing||t.$set(t.option,"maxImgSize",e.target.value)}}})]),t._v(" "),n("label",{staticClass:"c-item"},[n("span",[t._v("上传图片是否显示原始宽高 (针对大图 可以铺满)")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.original,expression:"option.original"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.option.original)?t._i(t.option.original,null)>-1:t.option.original},on:{change:function(e){var n=t.option.original,o=e.target,i=!!o.checked;if(Array.isArray(n)){var r=t._i(n,null);o.checked?r<0&&t.$set(t.option,"original",n.concat([null])):r>-1&&t.$set(t.option,"original",n.slice(0,r).concat(n.slice(r+1)))}else t.$set(t.option,"original",i)}}}),t._v(" "),n("span",[t._v("original: "+t._s(t.option.original))])]),t._v(" "),n("label",{staticClass:"c-item"},[n("span",[t._v("是否根据dpr生成适合屏幕的高清图片")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.high,expression:"option.high"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.option.high)?t._i(t.option.high,null)>-1:t.option.high},on:{change:function(e){var n=t.option.high,o=e.target,i=!!o.checked;if(Array.isArray(n)){var r=t._i(n,null);o.checked?r<0&&t.$set(t.option,"high",n.concat([null])):r>-1&&t.$set(t.option,"high",n.slice(0,r).concat(n.slice(r+1)))}else t.$set(t.option,"high",i)}}}),t._v(" "),n("span",[t._v("high: "+t._s(t.option.high))])]),t._v(" "),n("label",{staticClass:"c-item"},[n("span",[t._v("是否输出原图比例的截图")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.full,expression:"option.full"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.option.full)?t._i(t.option.full,null)>-1:t.option.full},on:{change:function(e){var n=t.option.full,o=e.target,i=!!o.checked;if(Array.isArray(n)){var r=t._i(n,null);o.checked?r<0&&t.$set(t.option,"full",n.concat([null])):r>-1&&t.$set(t.option,"full",n.slice(0,r).concat(n.slice(r+1)))}else t.$set(t.option,"full",i)}}}),t._v(" "),n("span",[t._v("full: "+t._s(t.option.full))])]),t._v(" "),n("label",{staticClass:"c-item"},[n("span",[t._v("截图信息展示是否是真实的输出宽高")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.infoTrue,expression:"option.infoTrue"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.option.infoTrue)?t._i(t.option.infoTrue,null)>-1:t.option.infoTrue},on:{change:function(e){var n=t.option.infoTrue,o=e.target,i=!!o.checked;if(Array.isArray(n)){var r=t._i(n,null);o.checked?r<0&&t.$set(t.option,"infoTrue",n.concat([null])):r>-1&&t.$set(t.option,"infoTrue",n.slice(0,r).concat(n.slice(r+1)))}else t.$set(t.option,"infoTrue",i)}}}),t._v(" "),n("span",[t._v("infoTrue: "+t._s(t.option.infoTrue))])]),t._v(" "),n("label",{staticClass:"c-item"},[n("span",[t._v("能否拖动图片")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.canMove,expression:"option.canMove"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.option.canMove)?t._i(t.option.canMove,null)>-1:t.option.canMove},on:{change:function(e){var n=t.option.canMove,o=e.target,i=!!o.checked;if(Array.isArray(n)){var r=t._i(n,null);o.checked?r<0&&t.$set(t.option,"canMove",n.concat([null])):r>-1&&t.$set(t.option,"canMove",n.slice(0,r).concat(n.slice(r+1)))}else t.$set(t.option,"canMove",i)}}}),t._v(" "),n("span",[t._v("canMove: "+t._s(t.option.canMove))])]),t._v(" "),n("label",{staticClass:"c-item"},[n("span",[t._v("能否拖动截图框")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.canMoveBox,expression:"option.canMoveBox"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.option.canMoveBox)?t._i(t.option.canMoveBox,null)>-1:t.option.canMoveBox},on:{change:function(e){var n=t.option.canMoveBox,o=e.target,i=!!o.checked;if(Array.isArray(n)){var r=t._i(n,null);o.checked?r<0&&t.$set(t.option,"canMoveBox",n.concat([null])):r>-1&&t.$set(t.option,"canMoveBox",n.slice(0,r).concat(n.slice(r+1)))}else t.$set(t.option,"canMoveBox",i)}}}),t._v(" "),n("span",[t._v("canMoveBox: "+t._s(t.option.canMoveBox))])]),t._v(" "),n("label",{staticClass:"c-item"},[n("span",[t._v("截图框固定大小")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.fixedBox,expression:"option.fixedBox"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.option.fixedBox)?t._i(t.option.fixedBox,null)>-1:t.option.fixedBox},on:{change:function(e){var n=t.option.fixedBox,o=e.target,i=!!o.checked;if(Array.isArray(n)){var r=t._i(n,null);o.checked?r<0&&t.$set(t.option,"fixedBox",n.concat([null])):r>-1&&t.$set(t.option,"fixedBox",n.slice(0,r).concat(n.slice(r+1)))}else t.$set(t.option,"fixedBox",i)}}}),t._v(" "),n("span",[t._v("fixedBox: "+t._s(t.option.fixedBox))])]),t._v(" "),n("label",{staticClass:"c-item"},[n("span",[t._v("是否自动生成截图框")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.autoCrop,expression:"option.autoCrop"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.option.autoCrop)?t._i(t.option.autoCrop,null)>-1:t.option.autoCrop},on:{change:function(e){var n=t.option.autoCrop,o=e.target,i=!!o.checked;if(Array.isArray(n)){var r=t._i(n,null);o.checked?r<0&&t.$set(t.option,"autoCrop",n.concat([null])):r>-1&&t.$set(t.option,"autoCrop",n.slice(0,r).concat(n.slice(r+1)))}else t.$set(t.option,"autoCrop",i)}}}),t._v(" "),n("span",[t._v("autoCrop: "+t._s(t.option.autoCrop))])]),t._v(" "),n("label",{staticClass:"c-item"},[n("span",[t._v("自动生成截图框的宽高")]),t._v(" "),n("span",[t._v("宽度: ")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.autoCropWidth,expression:"option.autoCropWidth"}],attrs:{type:"number"},domProps:{value:t.option.autoCropWidth},on:{input:function(e){e.target.composing||t.$set(t.option,"autoCropWidth",e.target.value)}}}),t._v(" "),n("span",[t._v("高度: ")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.autoCropHeight,expression:"option.autoCropHeight"}],attrs:{type:"number"},domProps:{value:t.option.autoCropHeight},on:{input:function(e){e.target.composing||t.$set(t.option,"autoCropHeight",e.target.value)}}})]),t._v(" "),n("label",{staticClass:"c-item"},[n("span",[t._v("截图框是否限制在图片里(只有在自动生成截图框时才能生效)")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.centerBox,expression:"option.centerBox"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.option.centerBox)?t._i(t.option.centerBox,null)>-1:t.option.centerBox},on:{change:function(e){var n=t.option.centerBox,o=e.target,i=!!o.checked;if(Array.isArray(n)){var r=t._i(n,null);o.checked?r<0&&t.$set(t.option,"centerBox",n.concat([null])):r>-1&&t.$set(t.option,"centerBox",n.slice(0,r).concat(n.slice(r+1)))}else t.$set(t.option,"centerBox",i)}}}),t._v(" "),n("span",[t._v("centerBox: "+t._s(t.option.centerBox))])]),t._v(" "),n("label",{staticClass:"c-item"},[n("span",[t._v("是否按照截图框比例输出 默认为1 ")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.enlarge,expression:"option.enlarge"}],attrs:{type:"number"},domProps:{value:t.option.enlarge},on:{input:function(e){e.target.composing||t.$set(t.option,"enlarge",e.target.value)}}})]),t._v(" "),n("p",[t._v("输出图片格式")]),t._v(" "),n("label",{staticClass:"c-item"},[n("label",[t._v("jpg "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.outputType,expression:"option.outputType"}],attrs:{type:"radio",name:"type",value:"jpeg"},domProps:{checked:t._q(t.option.outputType,"jpeg")},on:{change:function(e){t.$set(t.option,"outputType","jpeg")}}})]),t._v(" "),n("label",[t._v("png "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.outputType,expression:"option.outputType"}],attrs:{type:"radio",name:"type",value:"png"},domProps:{checked:t._q(t.option.outputType,"png")},on:{change:function(e){t.$set(t.option,"outputType","png")}}})]),t._v(" "),n("label",[t._v("webp "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.option.outputType,expression:"option.outputType"}],attrs:{type:"radio",name:"type",value:"webp"},domProps:{checked:t._q(t.option.outputType,"webp")},on:{change:function(e){t.$set(t.option,"outputType","webp")}}})])])]),t._v(" "),n("codes",[n("div",{attrs:{slot:"body"},slot:"body"},[t._v(t._s(t.code1))])])],1)])])},i=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h1",[n("a",{staticClass:"title",attrs:{href:"https://github.com/xyxiao001/vue-cropper",target:"_blank"}},[t._v("vue-cropper")])])}]},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return i});var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{class:{preview:!t.all,all:t.all}},[n("code",{staticClass:"language-html"},[t._t("body")],2),t._v(" "),n("div",{staticClass:"show",on:{click:function(){return t.all=!t.all}}},[t._v(t._s(t.msg))])])},i=[]},function(t,e,n){var o=n(11);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=n(2).default;i("70ad5542",o,!0,{})},function(t,e,n){var o=n(12);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=n(2).default;i("0d06521c",o,!0,{})},function(t,e,n){var o=n(13);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=n(2).default;i("474b47a6",o,!0,{})},function(t,e,n){"use strict";function o(t,e){for(var n=[],o={},i=0;i