2 lines
2.9 KiB
JavaScript
2 lines
2.9 KiB
JavaScript
import{d as V,f as N,n as E,r as f,y as F,h as U,c as k,a as i,t as p,u as r,N as l,e as a,w as s,i as v,X as C,W as B,Y as R,E as $,$ as j,a0 as D,_ as P}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{_ as L}from"./index-742b412a.js";import{g as S,s as T}from"./personal-f9857d63.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-5c6c00d9.js";/* empty css */import"./attachment-c69dd9fd.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-9285296e.js";/* empty css */import"./sys-8ead7f22.js";const W={class:"main-container w-full pt-[64px] bg-white"},X={class:"flex justify-between items-center h-[32px] mb-4"},Y={class:"text-[20px]"},q={class:"flex justify-center mt-[50px]"},z=V({__name:"edit_personal",setup(A){const g=N(),t=E({head_img:"",real_name:"",username:""}),d=f(),o=f(!0);(()=>{o.value=!0,S().then(n=>{o.value=!1;const e=n.data;t.head_img=e.head_img,t.real_name=e.real_name,t.username=e.username}).catch(()=>{o.value=!1})})();const h=n=>{o.value||!n||n.validate(e=>{if(e)o.value=!0,T(t).then(u=>{o.value=!1}).catch(()=>{o.value=!1});else return!1})},b=()=>{g.push("/user/center")};return(n,e)=>{const u=L,_=C,x=B,y=R,c=$,w=j,I=D;return F((U(),k("div",W,[i("div",X,[i("span",Y,p(r(l)("editPersonal")),1)]),a(w,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[a(y,{model:t,"label-width":"90px",ref_key:"formRef",ref:d,class:"page-form"},{default:s(()=>[a(_,{label:r(l)("headImg")},{default:s(()=>[a(u,{modelValue:t.head_img,"onUpdate:modelValue":e[0]||(e[0]=m=>t.head_img=m),limit:1},null,8,["modelValue"])]),_:1},8,["label"]),a(_,{label:r(l)("userName")},{default:s(()=>[i("span",null,p(t.username),1)]),_:1},8,["label"]),a(_,{label:r(l)("realName")},{default:s(()=>[a(x,{modelValue:t.real_name,"onUpdate:modelValue":e[1]||(e[1]=m=>t.real_name=m),placeholder:r(l)("realNamePlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"]),i("div",q,[a(c,{type:"primary",onClick:e[2]||(e[2]=m=>h(d.value))},{default:s(()=>[v(p(r(l)("save")),1)]),_:1}),a(c,{type:"primary",onClick:e[3]||(e[3]=m=>b())},{default:s(()=>[v(p(r(l)("cancel")),1)]),_:1})])]),_:1})])),[[I,o.value]])}}});const Ie=P(z,[["__scopeId","data-v-10529817"]]);export{Ie as default};
|