2 lines
5.6 KiB
JavaScript
2 lines
5.6 KiB
JavaScript
import{_ as D}from"./index.9db9e312.js";import{D as v,C as b,F as h,T as U,w as y}from"./element-plus.bccb9376.js";import{M as k}from"./picker.b20eef45.js";import{a as I,f as a,B as x}from"./index.383cb31f.js";import{d as f,r as M,Z as _,o as S,c as N,U as r,L as s,u as t,a as i,R}from"./@vue.18505fe0.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.a6528143.js";import"./@babel.16688d44.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.5b44360d.js";import"./index.e6088f1a.js";import"./index.vue_vue_type_script_setup_true_lang.120de7ce.js";import"./index.c600a185.js";import"./usePaging.6a6670f9.js";import"./vuedraggable.9f282753.js";import"./vue.e5198d72.js";import"./sortablejs.6fa237f8.js";import"./lodash.466e9fe4.js";import"./axios.4905d81f.js";import"./jspdf.54afd842.js";import"./fflate.fca59393.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.29b71fa4.js";import"./color.87d313dc.js";import"./clone.a63396d9.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./vue-plugin-hiprint.a2d84e76.js";import"./jquery.c3f97e49.js";import"./jsbarcode.39151b53.js";import"./socket.io-client.0b5a7289.js";import"./engine.io-client.81030771.js";import"./engine.io-parser.c748e159.js";import"./@socket.io.77accf6a.js";import"./debug.b392f131.js";import"./socket.io-parser.b7256298.js";import"./html2canvas.0f5947bc.js";import"./canvg.a673c4b2.js";import"./core-js.97b94d69.js";import"./raf.407ad6ad.js";import"./performance-now.a710f6e4.js";import"./rgbcolor.20c71161.js";import"./svg-pathdata.eba17832.js";import"./stackblur-canvas.0fb5df18.js";import"./nprogress.3461658b.js";import"./vue-clipboard3.c63182fd.js";import"./clipboard.dd2c63d0.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const q={class:"user-setting"},T={class:"w-80"},L={class:"w-80"},P={class:"w-80"},Z={class:"w-80"},j={class:"w-80"},z=f({name:"userSetting"}),$o=f({...z,setup(G){const d=M(),n=I(),o=_({avatar:"",account:"",name:"",password_old:"",password:"",password_confirm:""}),c=_({avatar:[{required:!0,message:"\u5934\u50CF\u4E0D\u80FD\u4E3A\u7A7A",trigger:["change"]}],name:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0",trigger:["blur"]}]}),F=async()=>{const p=n.userInfo;for(const u in o)o[u]=p[u]},w=async()=>{if(o.password_old||o.password||o.password_confirm){if(!o.password_old)return a.msgError("\u8BF7\u8F93\u5165\u5F53\u524D\u5BC6\u7801");if(!o.password)return a.msgError("\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801");if(!o.password_confirm)return a.msgError("\u8BF7\u8F93\u5165\u786E\u5B9A\u5BC6\u7801");if(o.password_confirm!=o.password)return a.msgError("\u4E24\u6B21\u8F93\u5165\u7684\u5BC6\u7801\u4E0D\u4E00\u6837")}if(o.password_old&&o.password&&o.password_confirm){if(o.password_old.length<6||o.password_old.length>32)return a.msgError("\u5BC6\u7801\u957F\u5EA6\u57286\u523032\u4E4B\u95F4");if(o.password.length<6||o.password.length>32)return a.msgError("\u5BC6\u7801\u957F\u5EA6\u57286\u523032\u4E4B\u95F4");if(o.password_confirm.length<6||o.password_confirm.length>32)return a.msgError("\u5BC6\u7801\u957F\u5EA6\u57286\u523032\u4E4B\u95F4")}await x(o),n.getUserInfo()},E=async()=>{var p;await((p=d.value)==null?void 0:p.validate()),w()};return F(),(p,u)=>{const B=k,m=v,l=b,C=h,g=U,V=y,A=D;return S(),N("div",q,[r(g,{class:"!border-none",shadow:"never"},{default:s(()=>[r(C,{ref_key:"formRef",ref:d,class:"ls-form",model:t(o),rules:t(c),"label-width":"100px"},{default:s(()=>[r(m,{label:"\u5934\u50CF\uFF1A",prop:"avatar"},{default:s(()=>[r(B,{modelValue:t(o).avatar,"onUpdate:modelValue":u[0]||(u[0]=e=>t(o).avatar=e),limit:1},null,8,["modelValue"])]),_:1}),r(m,{label:"\u8D26\u53F7\uFF1A",prop:"account"},{default:s(()=>[i("div",T,[r(l,{modelValue:t(o).account,"onUpdate:modelValue":u[1]||(u[1]=e=>t(o).account=e),disabled:""},null,8,["modelValue"])])]),_:1}),r(m,{label:"\u540D\u79F0\uFF1A",prop:"name"},{default:s(()=>[i("div",L,[r(l,{modelValue:t(o).name,"onUpdate:modelValue":u[2]||(u[2]=e=>t(o).name=e),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])])]),_:1}),r(m,{label:"\u5F53\u524D\u5BC6\u7801\uFF1A",prop:"password_old"},{default:s(()=>[i("div",P,[r(l,{modelValue:t(o).password_old,"onUpdate:modelValue":u[3]||(u[3]=e=>t(o).password_old=e),modelModifiers:{trim:!0},placeholder:"\u4FEE\u6539\u5BC6\u7801\u65F6\u5FC5\u586B, \u4E0D\u4FEE\u6539\u5BC6\u7801\u65F6\u7559\u7A7A",type:"password","show-password":""},null,8,["modelValue"])])]),_:1}),r(m,{label:"\u65B0\u7684\u5BC6\u7801\uFF1A",prop:"password"},{default:s(()=>[i("div",Z,[r(l,{modelValue:t(o).password,"onUpdate:modelValue":u[4]||(u[4]=e=>t(o).password=e),modelModifiers:{trim:!0},placeholder:"\u4FEE\u6539\u5BC6\u7801\u65F6\u5FC5\u586B, \u4E0D\u4FEE\u6539\u5BC6\u7801\u65F6\u7559\u7A7A",type:"password","show-password":""},null,8,["modelValue"])])]),_:1}),r(m,{label:"\u786E\u5B9A\u5BC6\u7801\uFF1A",prop:"password_confirm"},{default:s(()=>[i("div",j,[r(l,{modelValue:t(o).password_confirm,"onUpdate:modelValue":u[5]||(u[5]=e=>t(o).password_confirm=e),modelModifiers:{trim:!0},placeholder:"\u4FEE\u6539\u5BC6\u7801\u65F6\u5FC5\u586B, \u4E0D\u4FEE\u6539\u5BC6\u7801\u65F6\u7559\u7A7A",type:"password","show-password":""},null,8,["modelValue"])])]),_:1})]),_:1},8,["model","rules"])]),_:1}),r(A,null,{default:s(()=>[r(V,{type:"primary",onClick:E},{default:s(()=>[R("\u4FDD\u5B58")]),_:1})]),_:1})])}}});export{$o as default};
|