test_lgq/niucloud/public/admin/assets/edit_personal-a071b396.js
2024-01-24 17:36:08 +08:00

2 lines
2.9 KiB
JavaScript

import{d as V,n as N,r as f,y as E,c as F,a as i,t as p,u as r,e as a,w as l,$ as U,a0 as k,h as C,N as s,i as v,f as B,X as R,W as $,Y as j,E 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=B(),t=N({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,_=R,x=$,y=j,c=D,w=U,I=k;return E((C(),F("div",W,[i("div",X,[i("span",Y,p(r(s)("editPersonal")),1)]),a(w,{class:"box-card !border-none",shadow:"never"},{default:l(()=>[a(y,{model:t,"label-width":"90px",ref_key:"formRef",ref:d,class:"page-form"},{default:l(()=>[a(_,{label:r(s)("headImg")},{default:l(()=>[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(s)("userName")},{default:l(()=>[i("span",null,p(t.username),1)]),_:1},8,["label"]),a(_,{label:r(s)("realName")},{default:l(()=>[a(x,{modelValue:t.real_name,"onUpdate:modelValue":e[1]||(e[1]=m=>t.real_name=m),placeholder:r(s)("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:l(()=>[v(p(r(s)("save")),1)]),_:1}),a(c,{type:"primary",onClick:e[3]||(e[3]=m=>b())},{default:l(()=>[v(p(r(s)("cancel")),1)]),_:1})])]),_:1})])),[[I,o.value]])}}});const Ie=P(z,[["__scopeId","data-v-578aa35c"]]);export{Ie as default};