data_center/public/admin/assets/setting.2504061f.js

2 lines
5.2 KiB
JavaScript
Raw Normal View History

2023-11-13 17:02:10 +08:00
import{_ as A}from"./index.e75f4c41.js";import{C as D,B as v,D as b,I as h,w as U}from"./element-plus.bb5d129a.js";import{_ as y}from"./picker.3c05fae0.js";import{a as k,f as s,z as I}from"./index.69ffdd93.js";import{d as _,r as x,$ as i,o as S,c as M,U as u,L as t,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.c5177e7a.js";import"./axios.ba5f746b.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.a82f0063.js";import"./index.dbc95a91.js";import"./index.vue_vue_type_script_setup_true_lang.cb18df50.js";import"./index.dff175ed.js";import"./index.214f57a6.js";import"./index.vue_vue_type_script_setup_true_lang.8129ffa5.js";import"./usePaging.160b82b8.js";import"./vue3-video-play.4851e3ad.js";import"./vuedraggable.26a22b59.js";import"./vue.65cbc413.js";import"./sortablejs.26e78ba5.js";import"./lodash.5226da61.js";import"./vue-router.12d45bc3.js";import"./pinia.dfca86b4.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.ee641d3d.js";import"./color.cbc2f3a9.js";import"./clone.7fddbad2.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.a7d78d4d.js";import"./ms.a9ae1d6d.js";import"./nprogress.cc41886d.js";import"./vue-clipboard3.7988db4f.js";import"./clipboard.cb7a871d.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"},z={class:"w-80"},L={class:"w-80"},T={class:"w-80"},$={class:"w-80"},j=N("\u4FDD\u5B58"),G=_({name:"userSetting"}),Lo=_({...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 s.msgError("\u8BF7\u8F93\u5165\u5F53\u524D\u5BC6\u7801");if(!o.password)return s.msgError("\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801");if(!o.password_confirm)return s.msgError("\u8BF7\u8F93\u5165\u786E\u5B9A\u5BC6\u7801");if(o.password_confirm!=o.password)return s.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 s.msgError("\u5BC6\u7801\u957F\u5EA6\u57286\u523032\u4E4B\u95F4");if(o.password.length<6||o.password.length>32)return s.msgError("\u5BC6\u7801\u957F\u5EA6\u57286\u523032\u4E4B\u95F4");if(o.password_confirm.length<6||o.password_confirm.length>32)return s.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:t(()=>[u(B,{ref_key:"formRef",ref:d,class:"ls-form",model:o,rules:c,"label-width":"100px"},{default:t(()=>[u(a,{label:"\u5934\u50CF\uFF1A",prop:"avatar"},{default:t(()=>[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:t(()=>[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:t(()=>[m("div",z,[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:t(()=>[m("div",