2 lines
2.7 KiB
JavaScript
2 lines
2.7 KiB
JavaScript
var f=(o,m,s)=>new Promise((c,a)=>{var d=e=>{try{r(s.next(e))}catch(i){a(i)}},t=e=>{try{r(s.throw(e))}catch(i){a(i)}},r=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,t);r((s=s.apply(o,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.90da037b.js";import{B as b,a as N}from"./index.d04e0ccc.js";import{B as P}from"./BasicForm.f01f971f.js";import{u as U}from"./useForm.0ffa652b.js";import{u as V}from"./lock.6cdd5448.js";import{h as q}from"./header.d801b988.js";import"./useWindowSizeFn.bb7ce060.js";import"./FullscreenOutlined.8b01061e.js";import"./index.62d3fd2c.js";import"./index.025fb97e.js";import"./_baseIteratee.65dd9fdb.js";import"./get.b86e8352.js";import"./useSize.68b929f0.js";import"./index.d233f0c1.js";import"./index.9491c228.js";import"./Checkbox.b0fc94c8.js";import"./index.1e081170.js";import"./index.a6a803ce.js";import"./index.d6a19688.js";import"./index.d4d83420.js";import"./index.4c487898.js";import"./index.8e526329.js";import"./eagerComputed.b8af4151.js";import"./transButton.bec5a66d.js";import"./useRefs.8dda1daa.js";import"./_baseEach.050c37eb.js";import"./download.67ebbd8b.js";import"./index.aa79ca22.js";import"./dateUtil.c2a00df1.js";import"./uniqBy.2bfac54c.js";const A=w({name:"LockModal",components:{BasicModal:b,BasicForm:P},setup(){const{t:o}=$(),{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: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}=s.getUserInfo;return n||q});return{t:o,prefixCls:m,getRealName:a,register:d,registerForm:r,handleLock:v,avatar:B}}}),D=["src"];function j(o,m,s,c,a,d){const t=u("BasicForm"),r=u("a-button"),e=u("BasicModal");return M(),S(e,R({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(r,{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 ho=y(A,[["render",j]]);export{ho as default};
|