var d=(o,s,r)=>new Promise((c,i)=>{var l=e=>{try{a(r.next(e))}catch(m){i(m)}},t=e=>{try{a(r.throw(e))}catch(m){i(m)}},a=e=>e.done?c(e.value):Promise.resolve(e.value).then(l,t);a((r=r.apply(o,s)).next())});import{a as C,cB as g,B as h,l as B,H as F,f as b,aP as A,x as I,aQ as p,o as S,aR as w,p as u,j as n,i as _,fa as y,fb as R,q as k}from"./index.0d073eaa.js";/* empty css              */import{B as x}from"./BasicForm.d11b68fd.js";import{u as E}from"./useForm.868c8e81.js";import{a as U}from"./index.f4f1f088.js";import{h as V}from"./header.d801b988.js";import{a as $}from"./account.0cff3e42.js";import{b as M}from"./data.08d7c751.js";import{u as N}from"./upload.1645cad7.js";import{R as P,C as T}from"./index.1d29734e.js";/* empty css              */import"./index.0fb15725.js";import"./index.965098be.js";import"./Checkbox.476f6e92.js";import"./index.1491cab6.js";import"./index.e317a008.js";import"./index.7075e2b7.js";import"./index.04f7e044.js";import"./index.e8daa066.js";import"./get.49a42f2e.js";import"./index.e8b360cf.js";import"./eagerComputed.156e81ff.js";import"./index.2b5ea4f6.js";import"./_baseIteratee.3919e7cf.js";import"./DeleteOutlined.247d1f35.js";import"./index.a8c197b8.js";import"./useRefs.e81831e2.js";import"./Form.48352728.js";import"./Col.a2eadc78.js";import"./useFlexGapSupport.474c31b7.js";import"./useSize.bb4e5ce5.js";import"./index.81899e8a.js";import"./index.c05f9254.js";import"./useWindowSizeFn.ef20ece8.js";import"./FullscreenOutlined.401a7bcd.js";import"./index.ffb8ac7d.js";import"./index.dd1f987c.js";import"./uuid.2b29000c.js";import"./download.bb4c9304.js";import"./base64Conver.08b9f4ec.js";import"./index.31930d74.js";import"./uniqBy.ac0f9c38.js";import"./index.0972fd96.js";import"./index.8680e4c4.js";const j=C({components:{BasicForm:x,CollapseContainer:g,Button:h,ARow:P,ACol:T,CropperAvatar:U},setup(){const{createMessage:o}=I(),s=B(),[r,{setFieldsValue:c}]=E({labelWidth:120,schemas:M,showActionButtonGroup:!1});F(()=>d(this,null,function*(){const t=yield $();c(t)}));const i=b(()=>{const{avatar:t}=s.getUserInfo;return t||V});function l(t){const a=s.getUserInfo;a.avatar=t,s.setUserInfo(a)}return{avatar:i,register:r,uploadApi:N,updateAvatar:l,handleSubmit:()=>{o.success("\u66F4\u65B0\u6210\u529F\uFF01")}}}}),q=o=>(y("data-v-249137cb"),o=o(),R(),o),G={class:"change-avatar"},H=q(()=>_("div",{class:"mb-2"},"\u5934\u50CF",-1)),Q=k(" \u66F4\u65B0\u57FA\u672C\u4FE1\u606F ");function W(o,s,r,c,i,l){const t=p("BasicForm"),a=p("a-col"),e=p("CropperAvatar"),m=p("a-row"),f=p("Button"),v=p("CollapseContainer");return S(),w(v,{title:"\u57FA\u672C\u8BBE\u7F6E",canExpan:!1},{default:u(()=>[n(m,{gutter:24},{default:u(()=>[n(a,{span:14},{default:u(()=>[n(t,{onRegister:o.register},null,8,["onRegister"])]),_:1}),n(a,{span:10},{default:u(()=>[_("div",G,[H,n(e,{uploadApi:o.uploadApi,value:o.avatar,btnText:"\u66F4\u6362\u5934\u50CF",btnProps:{preIcon:"ant-design:cloud-upload-outlined"},onChange:o.updateAvatar,width:"150"},null,8,["uploadApi","value","onChange"])])]),_:1})]),_:1}),n(f,{type:"primary",onClick:o.handleSubmit},{default:u(()=>[Q]),_:1},8,["onClick"])]),_:1})}var Po=A(j,[["render",W],["__scopeId","data-v-249137cb"]]);export{Po as default};
