suyuan/public/admin/assets/setting.886e10d2.js

2 lines
5.2 KiB
JavaScript

import{_ as A}from"./index.f2c29013.js";import{C as D,B as v,D as b,I as h,w as U}from"./element-plus.5df6f736.js";import{_ as y}from"./picker.966d5ace.js";import{a as k,f as s,w as I}from"./index.1f78e617.js";import{d as _,r as x,_ as i,o as S,c as M,T as u,K as t,a as m,R as N}from"./@vue.108c970a.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.50c3b6f7.js";import"./axios.c2a2014a.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.5f547370.js";import"./index.39d7fad9.js";import"./index.vue_vue_type_script_setup_true_lang.1938e45e.js";import"./index.75a5ec45.js";import"./index.301703a6.js";import"./index.vue_vue_type_script_setup_true_lang.dc1b37d1.js";import"./usePaging.2a59f422.js";import"./vue3-video-play.5aacf00d.js";import"./vuedraggable.882c7954.js";import"./vue.d688b76a.js";import"./sortablejs.1b122128.js";import"./lodash.33f675f2.js";import"./vue-router.ed788fee.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.5d5b8bda.js";import"./color.da05fa89.js";import"./clone.06747a68.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.1c707d7b.js";import"./ms.a9ae1d6d.js";import"./nprogress.fc605139.js";import"./vue-clipboard3.dc900a40.js";import"./clipboard.6beb87aa.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";const R={class:"user-setting"},q={class:"w-80"},T={class:"w-80"},K={class:"w-80"},j={class:"w-80"},z={class:"w-80"},G=N("\u4FDD\u5B58"),H=_({name:"userSetting"}),Ko=_({...H,setup(J){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",R,[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",q,[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",T,[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",K,[u(p,{modelValue:o.password_old,"onUpdate:modelValue":r[3]||(r[3]=e=>o.password_old=e),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(a,{label:"\u65B0\u7684\u5BC6\u7801\uFF1A",prop:"password"},{default:t(()=>[m("div",j,[u(p,{modelValue:o.password,"onUpdate:modelValue":r[4]||(r[4]=e=>o.password=e),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(a,{label:"\u786E\u5B9A\u5BC6\u7801\uFF1A",prop:"password_confirm"},{default:t(()=>[m("div",z,[u(p,{modelValue:o.password_confirm,"onUpdate:modelValue":r[5]||(r[5]=e=>o.password_confirm=e),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(V,null,{default:t(()=>[u(C,{type:"primary",onClick:w},{default:t(()=>[G]),_:1})]),_:1})])}}});export{Ko as default};