2023-05-09 18:19:28 +08:00
|
|
|
import{_ as x,r as k,d as u,o as y,k as N,w as l,e,m as n,f as U,s as C}from"./index.75ecb6e9.js";import{a as h}from"./user.d8095814.js";const v={__name:"userInfo",props:{user:{type:Object}},setup(r){const c=r,{proxy:s}=C(),p=k({nickName:[{required:!0,message:"\u7528\u6237\u6635\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],email:[{required:!0,message:"\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"},{type:"email",message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u5730\u5740",trigger:["blur","change"]}],phonenumber:[{required:!0,message:"\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"},{pattern:/^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801",trigger:"blur"}]});function g(){s.$refs.userRef.validate(d=>{d&&h(c.user).then(t=>{s.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F")})})}function b(){s.$tab.closePage()}return(d,t)=>{const m=u("el-input"),a=u("el-form-item"),i=u("el-radio"),_=u("el-radio-group"),f=u("el-button"),V=u("el-form");return y(),N(V,{ref:"userRef",model:r.user,rules:U(p),"label-width":"80px"},{default:l(()=>[e(a,{label:"\u7528\u6237\u6635\u79F0",prop:"nickName"},{default:l(()=>[e(m,{modelValue:r.user.nickName,"onUpdate:modelValue":t[0]||(t[0]=o=>r.user.nickName=o),maxlength:"30"},null,8,["modelValue"])]),_:1}),e(a,{label:"\u624B\u673A\u53F7\u7801",prop:"phonenumber"},{default:l(()=>[e(m,{modelValue:r.user.phonenumber,"onUpdate:modelValue":t[1]||(t[1]=o=>r.user.phonenumber=o),maxlength:"11"},null,8,["modelValue"])]),_:1}),e(a,{label:"\u90AE\u7BB1",prop:"email"},{default:l(()=>[e(m,{modelValue:r.user.email,"onUpdate:modelValue":t[2]||(t[2]=o=>r.user.email=o),maxlength:"50"},null,8,["modelValue"])]),_:1}),e(a,{label:"\u6027\u522B"},{default:l(()=>[e(_,{modelValue:r.user.sex,"onUpdate:modelValue":t[3]||(t[3]=o=>r.user.sex=o)},{default:l(()=>[e(i,{label:"0"},{default:l(()=>[n("\u7537")]),_:1}),e(i,{label:"1"},{default:l(()=>[n("\u5973")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(a,null,{default:l(()=>[e(f,{type:"primary",onClick:g},{default:l(()=>[n("\u4FDD\u5B58")]),_:1}),e(f,{type:"danger",onClick:b},{default:l(()=>[n("\u5173\u95ED")]),_:1})]),_:1})]),_:1},8,["model","rules"])}}},$=x(v,[["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/system/user/profile/userInfo.vue"]]);export{$ as default};
|