lcny-vue3-antd-admin/dist/assets/LockModal.1ae4a2e4.js

2 lines
2.8 KiB
JavaScript

var f=(o,m,r)=>new Promise((c,a)=>{var d=e=>{try{s(r.next(e))}catch(i){a(i)}},t=e=>{try{s(r.throw(e))}catch(i){a(i)}},s=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,t);s((r=r.apply(o,m)).next())});import{L as w,a as y,c as $,b as L,s as F,f as _,aG as u,o as M,j as S,z as g,i as l,q as p,t as k,n as h,B as I,aH as N}from"./index.49914b5a.js";import{B as R,a as b}from"./index.a3a40db6.js";import{B as P}from"./BasicForm.2027c882.js";import{u as U}from"./useForm.21d35da4.js";import{u as V}from"./lock.ac3d5d6f.js";import{h as q}from"./header.d801b988.js";import"./useWindowSizeFn.96491139.js";import"./FullscreenOutlined.6747fb97.js";import"./index.0decd79e.js";import"./index.1fea3ddd.js";import"./_baseIteratee.44597bea.js";import"./get.eb15741f.js";import"./useSize.27a2e408.js";import"./index.42090798.js";import"./index.0494ee07.js";import"./Checkbox.e04d03bf.js";import"./index.2d827a95.js";import"./index.ff1266da.js";import"./dayjs.min.ca826dd4.js";import"./index.9920efc8.js";import"./index.b96a740f.js";import"./index.c500def9.js";import"./index.39ba15a9.js";import"./eagerComputed.c4a7a110.js";import"./transButton.b78e55f6.js";import"./useRefs.4a1afb1f.js";import"./_baseEach.cea27e9e.js";import"./download.11a56008.js";import"./index.c6a953b0.js";import"./index.76fa57c1.js";import"./dateUtil.e8f514cd.js";import"./uniqBy.a8ee5355.js";const z=y({name:"LockModal",components:{BasicModal:R,BasicForm:P},setup(){const{t:o}=$(),{prefixCls:m}=L("header-lock-modal"),r=F(),c=V(),a=_(()=>{var n;return(n=r.getUserInfo)==null?void 0:n.realName}),[d,{closeModal:t}]=b(),[s,{validateFields:e,resetFields:i}]=U({showActionButtonGroup:!1,schemas:[{field:"password",label:o("layout.header.lockScreenPassword"),colProps:{span:24},component:"InputPassword",required:!0}]});function v(){return f(this,null,function*(){const C=(yield e()).password;t(),c.setLockInfo({isLock:!0,pwd:C}),yield i()})}const B=_(()=>{const{avatar:n}=r.getUserInfo;return n||q});return{t:o,prefixCls:m,getRealName:a,register:d,registerForm:s,handleLock:v,avatar:B}}}),D=["src"];function G(o,m,r,c,a,d){const t=u("BasicForm"),s=u("a-button"),e=u("BasicModal");return M(),S(e,N({footer:null,title:o.t("layout.header.lockScreen")},o.$attrs,{class:o.prefixCls,onRegister:o.register}),{default:g(()=>[l("div",{class:p(`${o.prefixCls}__entry`)},[l("div",{class:p(`${o.prefixCls}__header`)},[l("img",{src:o.avatar,class:p(`${o.prefixCls}__header-img`)},null,10,D),l("p",{class:p(`${o.prefixCls}__header-name`)},k(o.getRealName),3)],2),h(t,{onRegister:o.registerForm},null,8,["onRegister"]),l("div",{class:p(`${o.prefixCls}__footer`)},[h(s,{type:"primary",block:"",class:"mt-2",onClick:o.handleLock},{default:g(()=>[I(k(o.t("layout.header.lockScreenBtn")),1)]),_:1},8,["onClick"])],2)],2)]),_:1},16,["title","class","onRegister"])}var Bo=w(z,[["render",G]]);export{Bo as default};