moreShopAdmin/build/admin/assets/setting.96a0f79e.js

2 lines
5.2 KiB
JavaScript

import{_ as D}from"./index.f122b62f.js";import{D as v,C as b,F as U,L as h,w as y}from"./element-plus.91c68cc0.js";import{_ as k}from"./picker.bb96af0c.js";import{a as I,f as a,G as x}from"./index.d12b3af4.js";import{d as f,r as S,Z as _,o as M,c as N,U as r,L as t,u as e,a as n,R}from"./@vue.76ce7aa3.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.e03c2e5b.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./index.f2e66d1e.js";import"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import"./index.839c505b.js";import"./usePaging.f8c888e4.js";import"./vuedraggable.c04c7c0c.js";import"./vue.3299ef77.js";import"./sortablejs.c62bcaf8.js";import"./lodash.4e6d2a38.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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"./nprogress.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";const q={class:"user-setting"},L={class:"w-80"},G={class:"w-80"},T={class:"w-80"},Z={class:"w-80"},j={class:"w-80"},z=f({name:"userSetting"}),qo=f({...z,setup(H){const d=S(),i=I(),o=_({avatar:"",account:"",name:"",password_old:"",password:"",password_confirm:""}),F=_({avatar:[{required:!0,message:"\u5934\u50CF\u4E0D\u80FD\u4E3A\u7A7A",trigger:["change"]}],name:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0",trigger:["blur"]}]}),c=async()=>{const p=i.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),i.getUserInfo()},E=async()=>{var p;await((p=d.value)==null?void 0:p.validate()),w()};return c(),(p,u)=>{const B=k,l=v,m=b,g=U,C=h,V=y,A=D;return M(),N("div",q,[r(C,{class:"!border-none",shadow:"never"},{default:t(()=>[r(g,{ref_key:"formRef",ref:d,class:"ls-form",model:e(o),rules:e(F),"label-width":"100px"},{default:t(()=>[r(l,{label:"\u5934\u50CF\uFF1A",prop:"avatar"},{default:t(()=>[r(B,{modelValue:e(o).avatar,"onUpdate:modelValue":u[0]||(u[0]=s=>e(o).avatar=s),limit:1},null,8,["modelValue"])]),_:1}),r(l,{label:"\u8D26\u53F7\uFF1A",prop:"account"},{default:t(()=>[n("div",L,[r(m,{modelValue:e(o).account,"onUpdate:modelValue":u[1]||(u[1]=s=>e(o).account=s),disabled:""},null,8,["modelValue"])])]),_:1}),r(l,{label:"\u540D\u79F0\uFF1A",prop:"name"},{default:t(()=>[n("div",G,[r(m,{modelValue:e(o).name,"onUpdate:modelValue":u[2]||(u[2]=s=>e(o).name=s),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])])]),_:1}),r(l,{label:"\u5F53\u524D\u5BC6\u7801\uFF1A",prop:"password_old"},{default:t(()=>[n("div",T,[r(m,{modelValue:e(o).password_old,"onUpdate:modelValue":u[3]||(u[3]=s=>e(o).password_old=s),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(l,{label:"\u65B0\u7684\u5BC6\u7801\uFF1A",prop:"password"},{default:t(()=>[n("div",Z,[r(m,{modelValue:e(o).password,"onUpdate:modelValue":u[4]||(u[4]=s=>e(o).password=s),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(l,{label:"\u786E\u5B9A\u5BC6\u7801\uFF1A",prop:"password_confirm"},{default:t(()=>[n("div",j,[r(m,{modelValue:e(o).password_confirm,"onUpdate:modelValue":u[5]||(u[5]=s=>e(o).password_confirm=s),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:t(()=>[r(V,{type:"primary",onClick:E},{default:t(()=>u[6]||(u[6]=[R("\u4FDD\u5B58")])),_:1})]),_:1})])}}});export{qo as default};