moreShopAdmin/build/admin/assets/setting.0816dbda.js

2 lines
5.2 KiB
JavaScript

import{_ as D}from"./index.f0fc91fc.js";import{D as v,C as b,F as h,L as U,w as y}from"./element-plus.2c2b06a1.js";import{_ as k}from"./picker.9a5caa4c.js";import{a as I,f as a,G as x}from"./index.3ccf3a31.js";import{d as f,r as S,Z as _,o as M,c as N,U as u,L as t,u as e,a as n,R}from"./@vue.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.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.4dc74392.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.ed96cede.js";import"./index.vue_vue_type_script_setup_true_lang.7141614b.js";import"./index.6808573b.js";import"./usePaging.6a6670f9.js";import"./vuedraggable.c5026861.js";import"./vue.1715f83d.js";import"./sortablejs.c62bcaf8.js";import"./lodash.4e6d2a38.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.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.b0c09b66.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:""}),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=i.userInfo;for(const r in o)o[r]=p[r]},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 F(),(p,r)=>{const B=k,l=v,m=b,g=h,C=U,V=y,A=D;return M(),N("div",q,[u(C,{class:"!border-none",shadow:"never"},{default:t(()=>[u(g,{ref_key:"formRef",ref:d,class:"ls-form",model:e(o),rules:e(c),"label-width":"100px"},{default:t(()=>[u(l,{label:"\u5934\u50CF\uFF1A",prop:"avatar"},{default:t(()=>[u(B,{modelValue:e(o).avatar,"onUpdate:modelValue":r[0]||(r[0]=s=>e(o).avatar=s),limit:1},null,8,["modelValue"])]),_:1}),u(l,{label:"\u8D26\u53F7\uFF1A",prop:"account"},{default:t(()=>[n("div",L,[u(m,{modelValue:e(o).account,"onUpdate:modelValue":r[1]||(r[1]=s=>e(o).account=s),disabled:""},null,8,["modelValue"])])]),_:1}),u(l,{label:"\u540D\u79F0\uFF1A",prop:"name"},{default:t(()=>[n("div",G,[u(m,{modelValue:e(o).name,"onUpdate:modelValue":r[2]||(r[2]=s=>e(o).name=s),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])])]),_:1}),u(l,{label:"\u5F53\u524D\u5BC6\u7801\uFF1A",prop:"password_old"},{default:t(()=>[n("div",T,[u(m,{modelValue:e(o).password_old,"onUpdate:modelValue":r[3]||(r[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}),u(l,{label:"\u65B0\u7684\u5BC6\u7801\uFF1A",prop:"password"},{default:t(()=>[n("div",Z,[u(m,{modelValue:e(o).password,"onUpdate:modelValue":r[4]||(r[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}),u(l,{label:"\u786E\u5B9A\u5BC6\u7801\uFF1A",prop:"password_confirm"},{default:t(()=>[n("div",j,[u(m,{modelValue:e(o).password_confirm,"onUpdate:modelValue":r[5]||(r[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}),u(A,null,{default:t(()=>[u(V,{type:"primary",onClick:E},{default:t(()=>[R("\u4FDD\u5B58")]),_:1})]),_:1})])}}});export{qo as default};