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.1ceafab0.js";import{B as R,a as b}from"./index.81144ce2.js";import{B as P}from"./BasicForm.a227e1d1.js";import{u as U}from"./useForm.c535a8d0.js";import{u as V}from"./lock.edf0c2a6.js";import{h as q}from"./header.d801b988.js";import"./useWindowSizeFn.dcec5864.js";import"./FullscreenOutlined.b2e66962.js";import"./index.177e8dbb.js";import"./index.28ab0fd4.js";import"./_baseIteratee.33440f54.js";import"./get.475835b7.js";import"./useSize.b1261285.js";import"./index.0b4a6c4b.js";import"./index.5859dca7.js";import"./Checkbox.8cfd7201.js";import"./index.939659e0.js";import"./index.9ef0cd85.js";import"./dayjs.min.702260c1.js";import"./index.18ec4be7.js";import"./index.7f7bfc59.js";import"./index.95870a43.js";import"./index.6d26019d.js";import"./eagerComputed.7ecbb6b7.js";import"./index.01ac6c22.js";import"./transButton.884c1f35.js";import"./index.706e184c.js";import"./useRefs.00ac041c.js";import"./_baseEach.13e95206.js";import"./download.a98cd929.js";import"./index.30dd6fdb.js";import"./index.9c7d8093.js";import"./dateUtil.42536331.js";import"./uniqBy.870e07d1.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};
|