lcny-vue3-antd-admin/dist/assets/LockModal.e65eb8c9.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.867f48c0.js";import{B as R,a as b}from"./index.3d0fa94f.js";import{B as P}from"./BasicForm.c0f0b49b.js";import{u as U}from"./useForm.413d35f8.js";import{u as V}from"./lock.c6a9bed2.js";import{h as q}from"./header.d801b988.js";import"./useWindowSizeFn.08bc7e9a.js";import"./FullscreenOutlined.292b4326.js";import"./index.01a64ec5.js";import"./index.0f994cf1.js";import"./_baseIteratee.79381cc0.js";import"./get.b0df836b.js";import"./useSize.835cb72d.js";import"./index.f860d291.js";import"./index.199517fa.js";import"./Checkbox.5aee0e0a.js";import"./index.75d7abb9.js";import"./index.b0cce4ac.js";import"./dayjs.min.926ac847.js";import"./index.0a1c386f.js";import"./index.40993466.js";import"./index.68c934d6.js";import"./index.fcdf1093.js";import"./eagerComputed.f744c165.js";import"./transButton.5575d623.js";import"./useRefs.01fce650.js";import"./_baseEach.57aa181c.js";import"./download.08584bfb.js";import"./index.4b42bb76.js";import"./index.fa64e4c7.js";import"./dateUtil.9afc73f8.js";import"./uniqBy.d1706606.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};