2 lines
2.7 KiB
JavaScript
2 lines
2.7 KiB
JavaScript
var f=(e,m,s)=>new Promise((c,a)=>{var d=o=>{try{r(s.next(o))}catch(i){a(i)}},t=o=>{try{r(s.throw(o))}catch(i){a(i)}},r=o=>o.done?c(o.value):Promise.resolve(o.value).then(d,t);r((s=s.apply(e,m)).next())});import{J as y,a as w,c as $,b as F,q as L,f as _,aA as u,o as M,j as S,x as g,i as l,n as p,t as k,p as h,y as I,aB as R}from"./index.23f86b42.js";import{B as b,a as N}from"./index.ce4963bd.js";import{B as P,u as U}from"./useForm.734f4522.js";import{u as V}from"./lock.77e3de3d.js";import{h as q}from"./header.d801b988.js";import"./useWindowSizeFn.dc8b642f.js";import"./FullscreenOutlined.d44748c7.js";import"./index.857e94a9.js";import"./index.9148dd62.js";import"./_baseIteratee.7924d535.js";import"./get.71aee113.js";import"./useSize.6d147c0a.js";import"./index.6ef040ec.js";import"./index.6957a726.js";import"./Checkbox.f1224077.js";import"./index.6e70dcea.js";import"./index.d4048f94.js";import"./index.b6be911e.js";import"./index.59842561.js";import"./index.45e287b3.js";import"./index.e23875ea.js";import"./eagerComputed.be0a89ff.js";import"./transButton.6f568b87.js";import"./index.d3d0344d.js";import"./useRefs.b7a3f06c.js";import"./_baseEach.842f04de.js";import"./download.5fb5f686.js";import"./index.3ae09c55.js";import"./dateUtil.0c502567.js";import"./uniqBy.6f7459a8.js";const A=w({name:"LockModal",components:{BasicModal:b,BasicForm:P},setup(){const{t:e}=$(),{prefixCls:m}=F("header-lock-modal"),s=L(),c=V(),a=_(()=>{var n;return(n=s.getUserInfo)==null?void 0:n.username}),[d,{closeModal:t}]=N(),[r,{validateFields:o,resetFields:i}]=U({showActionButtonGroup:!1,schemas:[{field:"password",label:e("layout.header.lockScreenPassword"),colProps:{span:24},component:"InputPassword",required:!0}]});function v(){return f(this,null,function*(){const C=(yield o()).password;t(),c.setLockInfo({isLock:!0,pwd:C}),yield i()})}const B=_(()=>{const{avatar:n}=s.getUserInfo;return n||q});return{t:e,prefixCls:m,getRealName:a,register:d,registerForm:r,handleLock:v,avatar:B}}}),D=["src"];function j(e,m,s,c,a,d){const t=u("BasicForm"),r=u("a-button"),o=u("BasicModal");return M(),S(o,R({footer:null,title:e.t("layout.header.lockScreen")},e.$attrs,{class:e.prefixCls,onRegister:e.register}),{default:g(()=>[l("div",{class:p(`${e.prefixCls}__entry`)},[l("div",{class:p(`${e.prefixCls}__header`)},[l("img",{src:e.avatar,class:p(`${e.prefixCls}__header-img`)},null,10,D),l("p",{class:p(`${e.prefixCls}__header-name`)},k(e.getRealName),3)],2),h(t,{onRegister:e.registerForm},null,8,["onRegister"]),l("div",{class:p(`${e.prefixCls}__footer`)},[h(r,{type:"primary",block:"",class:"mt-2",onClick:e.handleLock},{default:g(()=>[I(k(e.t("layout.header.lockScreenBtn")),1)]),_:1},8,["onClick"])],2)],2)]),_:1},16,["title","class","onRegister"])}var ke=y(A,[["render",j]]);export{ke as default};
|