import{d as A,f as p,U as s,a2 as n,ad as h,af as u,k as o,a4 as i,a3 as c,V as l,a5 as v}from"./vue-vendor-CxLCUzY4.js";import{P as I}from"./index-D55rh6hR.js";import{C as E}from"./index-DS3utcig.js";import{C as B,a as D}from"./index-BLEw2ljf.js";import{u as k}from"./upload-Dv8bNsjS.js";import{h as y}from"./header-OZa5fSDc.js";import{ab as w,_ as P}from"./index-CLZzJyTP.js";import"./antd-vue-vendor-CahNzUUa.js";import"./useContentHeight-DLfJuPsF.js";import"./useWindowSizeFn-D9PllI8g.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useContentViewHeight-BIb_dTbE.js";import"./usePageContext-FyDvfV_K.js";import"./injectionKey-DPVn4AgL.js";import"./index-BZbg0EjM.js";import"./index-DvqyyN77.js";import"./index-CrdW4fN1.js";import"./useTimeout-KpZCXEcl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./index-XZKTTfG1.js";import"./BasicModal-B8XmAOm7.js";import"./ModalHeader-DIFQSP_0.js";import"./base64Conver-24EVOS6V.js";const V=A({components:{PageWrapper:I,CropperImage:D,CollapseContainer:E,CropperAvatar:B},setup(){var t;const e=p(""),m=p(""),d=p(""),C=p(""),g=w(),F=p(((t=g.getUserInfo)==null?void 0:t.avatar)||"");function f({imgBase64:a,imgInfo:_}){e.value=_,m.value=a}function r({imgBase64:a,imgInfo:_}){d.value=_,C.value=a}return{img:y,info:e,circleInfo:d,cropperImg:m,circleImg:C,handleCropend:f,handleCircleCropend:r,avatar:F,uploadApi:k}}}),$={class:"container p-4"},N={class:"cropper-container mr-10"},S=["src"],U={key:0},W={class:"container p-4"},b={class:"cropper-container mr-10"},j=["src"],q={key:0};function z(e,m,d,C,g,F){const f=s("CropperAvatar"),r=s("CollapseContainer"),t=s("CropperImage"),a=s("PageWrapper");return n(),h(a,{title:"图片裁剪示例",content:"需要开启测试接口服务才能进行上传测试！"},{default:u(()=>[o(r,{title:"头像裁剪"},{default:u(()=>[o(f,{uploadApi:e.uploadApi,value:e.avatar},null,8,["uploadApi","value"])]),_:1}),o(r,{title:"矩形裁剪",class:"my-4"},{default:u(()=>[i("div",$,[i("div",N,[o(t,{ref:"refCropper",src:e.img,onCropend:e.handleCropend,style:{width:"40vw"}},null,8,["src","onCropend"])]),e.cropperImg?(n(),c("img",{key:0,src:e.cropperImg,class:"croppered",alt:""},null,8,S)):l("",!0)]),e.cropperImg?(n(),c("p",U,"裁剪后图片信息："+v(e.info),1)):l("",!0)]),_:1}),o(r,{title:"圆形裁剪"},{default:u(()=>[i("div",W,[i("div",b,[o(t,{ref:"refCropper",src:e.img,onCropend:e.handleCircleCropend,style:{width:"40vw"},circled:""},null,8,["src","onCropend"])]),e.circleImg?(n(),c("img",{key:0,src:e.circleImg,class:"croppered"},null,8,j)):l("",!0)]),e.circleImg?(n(),c("p",q,"裁剪后图片信息："+v(e.circleInfo),1)):l("",!0)]),_:1})]),_:1})}const ie=P(V,[["render",z],["__scopeId","data-v-60aec956"]]);export{ie as default};
