2 lines
2.8 KiB
JavaScript
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.32c07267.js";import{B as R,a as b}from"./index.d51279de.js";import{B as P}from"./BasicForm.75df0d2e.js";import{u as U}from"./useForm.47ba83ac.js";import{u as V}from"./lock.36982ba5.js";import{h as q}from"./header.d801b988.js";import"./useWindowSizeFn.4882e42a.js";import"./FullscreenOutlined.ed8a6514.js";import"./index.596e1e64.js";import"./index.0a16179d.js";import"./_baseIteratee.67f8f2a9.js";import"./get.3e9b8a69.js";import"./useSize.461a5969.js";import"./index.0f130bbc.js";import"./index.7fa3a616.js";import"./Checkbox.2f1eed1e.js";import"./index.551d44e4.js";import"./index.5c899175.js";import"./dayjs.min.1a2f02d8.js";import"./index.c4f04bdf.js";import"./index.f7d9f1b6.js";import"./index.0a07f7b1.js";import"./index.c9aabb5b.js";import"./eagerComputed.79a5dacc.js";import"./transButton.63fab756.js";import"./useRefs.23253e0b.js";import"./_baseEach.27604e9d.js";import"./download.b7e5a7a4.js";import"./index.6ab28e80.js";import"./index.7337ce8e.js";import"./dateUtil.3435ac89.js";import"./uniqBy.0c96aa5b.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};
|