lcny-vue3-antd-admin/dist/assets/LockModal.6c1a84f8.js

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.dd827b71.js";import{B as b,a as N}from"./index.cdd91f6d.js";import{B as P}from"./BasicForm.0e72f23d.js";import{u as U}from"./useForm.68345e35.js";import{u as V}from"./lock.86349f6e.js";import{h as q}from"./header.d801b988.js";import"./useWindowSizeFn.c1778fa8.js";import"./FullscreenOutlined.fedd27b4.js";import"./index.06ffe71a.js";import"./index.adc36847.js";import"./_baseIteratee.cc5f2be6.js";import"./get.42c89643.js";import"./useSize.4c5db25e.js";import"./index.79c8ec65.js";import"./index.7a983e9a.js";import"./Checkbox.55147e18.js";import"./index.d1f0b398.js";import"./index.90c2cf95.js";import"./index.818a6d8e.js";import"./index.738f0b57.js";import"./index.5b57ea9d.js";import"./index.71abedeb.js";import"./eagerComputed.e5fe8744.js";import"./transButton.bb592e69.js";import"./useRefs.c0e9fe8e.js";import"./_baseEach.86e1fb41.js";import"./download.fb6e5477.js";import"./index.2b5ab95e.js";import"./dateUtil.67a735e0.js";import"./uniqBy.2d625f11.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};