lcny-vue3-antd-admin/dist/assets/LockModal.b92fef28.js

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.15bf95a0.js";import{B as R,a as b}from"./index.7202328b.js";import{B as P}from"./BasicForm.2c365a17.js";import{u as U}from"./useForm.266d6458.js";import{u as V}from"./lock.aa41b2e8.js";import{h as q}from"./header.d801b988.js";import"./useWindowSizeFn.496bb47f.js";import"./FullscreenOutlined.dca4c038.js";import"./index.c1fc898b.js";import"./index.4bba8946.js";import"./_baseIteratee.08430898.js";import"./get.05ad8139.js";import"./useSize.ddd952c6.js";import"./index.b95f149a.js";import"./index.df7cd357.js";import"./Checkbox.c8b0f008.js";import"./index.b8a6ac82.js";import"./index.ef1a8685.js";import"./dayjs.min.11553ab0.js";import"./index.2fa6a24d.js";import"./index.326e44e1.js";import"./index.cc426235.js";import"./index.6f837330.js";import"./eagerComputed.2aa9aabd.js";import"./transButton.c69fcfd0.js";import"./useRefs.5c9b400e.js";import"./_baseEach.ae87de7c.js";import"./download.8641eee6.js";import"./index.2589f34c.js";import"./index.5cc5de85.js";import"./dateUtil.55a85352.js";import"./uniqBy.b7a1b0f6.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};