1 |
- import{d as R,n as z,r as m,f as G,o as i,l as c,w as s,i as r,a as e,j as y,C as J,c as K,F as M,k as N,y as L,U as P,H as S,D as X,G as q,K as A,J as B,N as E,_ as O,__tla as Q}from"./index-b2b3c6c4.js";import{_ as T,__tla as W}from"./Dialog-70b24cbf.js";import{b as Y,__tla as Z}from"./index-84f1b74e.js";import{g as $,u as aa,__tla as ea}from"./index-8de5fcb1.js";import{u as la,__tla as ta}from"./useMessage-a5edbb0f.js";let k,sa=Promise.all([(()=>{try{return Q}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return Z}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return ta}catch{}})()]).then(async()=>{k=O(R({name:"MpUserForm",__name:"UserForm",emits:["success"],setup(ra,{expose:V,emit:h}){const{t:b}=z(),U=la(),u=m(!1),o=m(!1),l=m({id:void 0,nickname:void 0,remark:void 0,tagIds:[]}),g=G({}),n=m(),p=m([]);V({open:async d=>{if(u.value=!0,F(),d){o.value=!0;try{l.value=await $(d)}finally{o.value=!1}}p.value=await Y()}});const w=h,I=async()=>{if(n&&await n.value.validate()){o.value=!0;try{await aa(l.value),U.success(b("common.updateSuccess")),u.value=!1,w("success")}finally{o.value=!1}}},F=()=>{var d;l.value={id:void 0,nickname:void 0,remark:void 0,tagIds:[]},(d=n.value)==null||d.resetFields()};return(d,t)=>{const f=P,_=S,x=X,C=q,j=A,v=B,D=T,H=E;return i(),c(D,{modelValue:e(u),"onUpdate:modelValue":t[4]||(t[4]=a=>L(u)?u.value=a:null),title:"\u4FEE\u6539"},{footer:s(()=>[r(v,{disabled:e(o),type:"primary",onClick:I},{default:s(()=>[y("\u786E \u5B9A")]),_:1},8,["disabled"]),r(v,{onClick:t[3]||(t[3]=a=>u.value=!1)},{default:s(()=>[y("\u53D6 \u6D88")]),_:1})]),default:s(()=>[J((i(),c(j,{ref_key:"formRef",ref:n,model:e(l),rules:e(g),"label-width":"80px"},{default:s(()=>[r(_,{label:"\u6635\u79F0",prop:"nickname"},{default:s(()=>[r(f,{modelValue:e(l).nickname,"onUpdate:modelValue":t[0]||(t[0]=a=>e(l).nickname=a),placeholder:"\u8BF7\u8F93\u5165\u6635\u79F0"},null,8,["modelValue"])]),_:1}),r(_,{label:"\u5907\u6CE8",prop:"remark"},{default:s(()=>[r(f,{modelValue:e(l).remark,"onUpdate:modelValue":t[1]||(t[1]=a=>e(l).remark=a),placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1}),r(_,{label:"\u6807\u7B7E",prop:"tagIds"},{default:s(()=>[r(C,{modelValue:e(l).tagIds,"onUpdate:modelValue":t[2]||(t[2]=a=>e(l).tagIds=a),clearable:"",multiple:"",placeholder:"\u8BF7\u9009\u62E9\u6807\u7B7E"},{default:s(()=>[(i(!0),K(M,null,N(e(p),a=>(i(),c(x,{key:a.tagId,label:a.name,value:a.tagId},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[H,e(o)]])]),_:1},8,["modelValue"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mp/user/UserForm.vue"]])});export{sa as __tla,k as default};
|