2024-08-13 15:26:03 +08:00
|
|
|
import{_ as D}from"./index.d57005c1.js";import{F as v,D as b,G as h,J as U,w as y}from"./element-plus.6b125791.js";import{_ as k}from"./picker.c7bd8459.js";import{a as I,f as a,G as x}from"./index.f3fea0a5.js";import{d as f,r as S,$ as _,o as M,c as N,W as u,Q as t,u as e,a as n,U as q}from"./@vue.340249d8.js";import"./lodash-es.edba6135.js";import"./@vueuse.e3650918.js";import"./@element-plus.558a564d.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.6b964ca4.js";import"./axios.ebd1d4d0.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.0f9ce7c3.js";import"./index.7d5c2e85.js";import"./index.f2f94302.js";import"./index.vue_vue_type_script_setup_true_lang.305bb481.js";import"./index.09b95a8e.js";import"./index.124ef29b.js";import"./index.vue_vue_type_script_setup_true_lang.236700ef.js";import"./usePaging.fff444fa.js";import"./vue3-video-play.fb56db8a.js";import"./vuedraggable.d9ca47e8.js";import"./vue.46727b3c.js";import"./sortablejs.ae45557f.js";import"./lodash.ab1d8f92.js";import"./vue-router.9ddb0e92.js";import"./pinia.97fe9b12.js";import"./css-color-function.7a4c1284.js";import"./color.10b8b3bd.js";import"./clone.623e4e2d.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.518a19eb.js";import"./vue-clipboard3.c098b37d.js";import"./clipboard.a67a48a7.js";import"./echarts.8535e5a6.js";import"./zrender.3eba8991.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.309a94da.js";const G={class:"user-setting"},R={class:"w-80"},J={class:"w-80"},Q={class:"w-80"},T={class:"w-80"},W={class:"w-80"},$=f({name:"userSetting"}),Ro=f({...$,setup(j){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",G,[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",R,[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",J,[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",Q,[u(m,{model
|