data_center/public/admin/assets/setting.022f9862.js

2 lines
5.2 KiB
JavaScript
Raw Normal View History

2023-10-10 13:46:19 +08:00
import{_ as A}from"./index.2b220ce8.js";import{C as D,B as v,D as b,I as h,w as U}from"./element-plus.54aed4cc.js";import{_ as y}from"./picker.2ed9d59e.js";import{a as k,f as t,s as I}from"./index.58a5fcc1.js";import{d as _,r as x,$ as i,o as S,c as M,U as u,L as s,a as m,S as N}from"./@vue.e8706010.js";import"./@vueuse.1e5a6e21.js";import"./@element-plus.196c7323.js";import"./lodash-es.29c53eac.js";import"./dayjs.f1e4cccc.js";import"./axios.d363e68d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./index.a3400ab9.js";import"./index.c2eeeafa.js";import"./index.vue_vue_type_script_setup_true_lang.fccb4113.js";import"./index.b80822d5.js";import"./index.346f714b.js";import"./index.vue_vue_type_script_setup_true_lang.1d0c0a75.js";import"./usePaging.160b82b8.js";import"./vue3-video-play.4851e3ad.js";import"./vuedraggable.ec665ecc.js";import"./vue.c9c06f7a.js";import"./sortablejs.6297fc7b.js";import"./lodash.c4b79a6f.js";import"./vue-router.12d45bc3.js";import"./pinia.dfca86b4.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.3c571821.js";import"./color.0ff1625c.js";import"./clone.78cb864b.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.a0babc59.js";import"./ms.a9ae1d6d.js";import"./nprogress.046b2704.js";import"./vue-clipboard3.8c1c7368.js";import"./clipboard.5f2f245e.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.2cdc8407.js";const q={class:"user-setting"},R={class:"w-80"},L={class:"w-80"},T={class:"w-80"},$={class:"w-80"},j={class:"w-80"},z=N("\u4FDD\u5B58"),G=_({name:"userSetting"}),To=_({...G,setup(H){const d=x(),n=k(),o=i({avatar:"",account:"",name:"",password_old:"",password:"",password_confirm:""}),c=i({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 l=n.userInfo;for(const r in o)o[r]=l[r]},F=async()=>{if(o.password_old||o.password||o.password_confirm){if(!o.password_old)return t.msgError("\u8BF7\u8F93\u5165\u5F53\u524D\u5BC6\u7801");if(!o.password)return t.msgError("\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801");if(!o.password_confirm)return t.msgError("\u8BF7\u8F93\u5165\u786E\u5B9A\u5BC6\u7801");if(o.password_confirm!=o.password)return t.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 t.msgError("\u5BC6\u7801\u957F\u5EA6\u57286\u523032\u4E4B\u95F4");if(o.password.length<6||o.password.length>32)return t.msgError("\u5BC6\u7801\u957F\u5EA6\u57286\u523032\u4E4B\u95F4");if(o.password_confirm.length<6||o.password_confirm.length>32)return t.msgError("\u5BC6\u7801\u957F\u5EA6\u57286\u523032\u4E4B\u95F4")}await I(o),n.getUserInfo()},w=async()=>{var l;await((l=d.value)==null?void 0:l.validate()),F()};return f(),(l,r)=>{const E=y,a=D,p=v,B=b,g=h,C=U,V=A;return S(),M("div",q,[u(g,{class:"!border-none",shadow:"never"},{default:s(()=>[u(B,{ref_key:"formRef",ref:d,class:"ls-form",model:o,rules:c,"label-width":"100px"},{default:s(()=>[u(a,{label:"\u5934\u50CF\uFF1A",prop:"avatar"},{default:s(()=>[u(E,{modelValue:o.avatar,"onUpdate:modelValue":r[0]||(r[0]=e=>o.avatar=e),limit:1},null,8,["modelValue"])]),_:1}),u(a,{label:"\u8D26\u53F7\uFF1A",prop:"account"},{default:s(()=>[m("div",R,[u(p,{modelValue:o.account,"onUpdate:modelValue":r[1]||(r[1]=e=>o.account=e),disabled:""},null,8,["modelValue"])])]),_:1}),u(a,{label:"\u540D\u79F0\uFF1A",prop:"name"},{default:s(()=>[m("div",L,[u(p,{modelValue:o.name,"onUpdate:modelValue":r[2]||(r[2]=e=>o.name=e),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])])]),_:1}),u(a,{label:"\u5F53\u524D\u5BC6\u7801\uFF1A",prop:"password_old"},{default:s(()=>[m("div",