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

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.66fda55f.js";import{B as R,a as b}from"./index.fb202374.js";import{B as P}from"./BasicForm.7215824d.js";import{u as U}from"./useForm.81e8a6d3.js";import{u as V}from"./lock.a41847f4.js";import{h as q}from"./header.d801b988.js";import"./useWindowSizeFn.543fbdda.js";import"./FullscreenOutlined.9844a14c.js";import"./index.524bdfb4.js";import"./index.1c5c6f49.js";import"./_baseIteratee.d3cd63c9.js";import"./get.6f471eb6.js";import"./useSize.9f5f1887.js";import"./index.b2ee3398.js";import"./index.ad8d11f3.js";import"./Checkbox.ec3c0e07.js";import"./index.e2c8ad68.js";import"./index.b379690e.js";import"./dayjs.min.7f9108ce.js";import"./index.fd2371d9.js";import"./index.7d1539a0.js";import"./index.b819a5e0.js";import"./index.d7005326.js";import"./eagerComputed.4d1213a9.js";import"./index.55a537a1.js";import"./transButton.4ef39013.js";import"./index.23217f71.js";import"./useRefs.023c9fad.js";import"./_baseEach.2882dd1b.js";import"./download.df7371cc.js";import"./index.d6426751.js";import"./index.c95ac475.js";import"./dateUtil.9b9e915e.js";import"./uniqBy.300580fe.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};