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-DaObvZxT.js";import{C as E}from"./index-Dz2zbQB_.js";import{C as B,a as D}from"./index-weROJe7c.js";import{u as k}from"./upload-ChdKO_td.js";import{h as y}from"./header-OZa5fSDc.js";import{ab as w,_ as P}from"./index-B_2CoVdl.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./useContentHeight-BWLGvKEC.js";import"./useWindowSizeFn-C3WExEpc.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useContentViewHeight-DlpfApuB.js";import"./usePageContext-HMYqek-Q.js";import"./injectionKey-DPVn4AgL.js";import"./index-exs4VcBw.js";import"./index-DAURrYyA.js";import"./index-ByLO0zSl.js";import"./useTimeout-CB9F1PLu.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./index-D2AmS0aU.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.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};
