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-CRgSyMPH.js";import{C as E}from"./index-CYoRlduV.js";import{C as B,a as D}from"./index-Cc69gAuV.js";import{u as k}from"./upload-Dy5FKYXA.js";import{h as y}from"./header-OZa5fSDc.js";import{ab as w,_ as P}from"./index-Cy4uayzW.js";import"./antd-vue-vendor-CahNzUUa.js";import"./useContentHeight-XU-h1taH.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useContentViewHeight-Qm4QNm5l.js";import"./usePageContext-CXQdt-5h.js";import"./injectionKey-DPVn4AgL.js";import"./index-DYB8Ashr.js";import"./index-Bdn0r8CG.js";import"./index-CrdW4fN1.js";import"./useTimeout-gJpgadD6.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./index-zKZnG1QC.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.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};
