2 lines
2.8 KiB
JavaScript
2 lines
2.8 KiB
JavaScript
var f=(o,m,r)=>new Promise((c,t)=>{var d=e=>{try{s(r.next(e))}catch(i){t(i)}},a=e=>{try{s(r.throw(e))}catch(i){t(i)}},s=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,a);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 p,q as l,t as k,n as h,B as I,aH as N}from"./index.c32990f8.js";import{B as R,a as b}from"./index.61ed12bd.js";import{B as P}from"./BasicForm.82bac281.js";import{u as U}from"./useForm.8ed2c601.js";import{u as V}from"./lock.5b93a1fe.js";import{h as q}from"./header.d801b988.js";import"./useWindowSizeFn.aeae38b8.js";import"./FullscreenOutlined.c00357d2.js";import"./index.8f815cab.js";import"./index.7581729a.js";import"./_baseIteratee.b53edf8d.js";import"./get.0f83bcc9.js";import"./useSize.4791f091.js";import"./index.b9cb2689.js";import"./index.3edadc16.js";import"./Checkbox.9f8bb87f.js";import"./index.3d7638b8.js";import"./index.e1b76525.js";import"./dayjs.min.78a88238.js";import"./index.89a648c8.js";import"./index.31b8a276.js";import"./index.d9bc5098.js";import"./index.a3dce25b.js";import"./eagerComputed.4b10fdb6.js";import"./index.1733ef64.js";import"./transButton.c32900a3.js";import"./index.f86b5268.js";import"./useRefs.e81244b6.js";import"./_baseEach.8e1e703f.js";import"./download.22e12e21.js";import"./index.f660a0af.js";import"./index.bed474f7.js";import"./dateUtil.27296437.js";import"./uniqBy.ac8c5ce3.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(),t=_(()=>{var n;return(n=r.getUserInfo)==null?void 0:n.realName}),[d,{closeModal:a}]=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;a(),c.setLockInfo({isLock:!0,pwd:C}),yield i()})}const B=_(()=>{const{avatar:n}=r.getUserInfo;return n||q});return{t:o,prefixCls:m,getRealName:t,register:d,registerForm:s,handleLock:v,avatar:B}}}),D=["src"];function G(o,m,r,c,t,d){const a=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(()=>[p("div",{class:l(`${o.prefixCls}__entry`)},[p("div",{class:l(`${o.prefixCls}__header`)},[p("img",{src:o.avatar,class:l(`${o.prefixCls}__header-img`)},null,10,D),p("p",{class:l(`${o.prefixCls}__header-name`)},k(o.getRealName),3)],2),h(a,{onRegister:o.registerForm},null,8,["onRegister"]),p("div",{class:l(`${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 wo=w(z,[["render",G]]);export{wo as default};
|