lcny-vue3-antd-admin/dist/assets/LockModal.96954def.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 R}from"./index.10d06543.js";import{B as b,a as N}from"./index.0e3cf717.js";import{B as P}from"./BasicForm.a6a69c7e.js";import{u as U}from"./useForm.7d736709.js";import{u as V}from"./lock.09621c9c.js";import{h as q}from"./header.d801b988.js";import"./useWindowSizeFn.a9703094.js";import"./FullscreenOutlined.bc4a08a6.js";import"./index.9df737e3.js";import"./index.5ba3a90f.js";import"./_baseIteratee.ce67176e.js";import"./get.bd6d3db4.js";import"./useSize.d9326d8e.js";import"./index.a5e82843.js";import"./index.6605206d.js";import"./Checkbox.955ea262.js";import"./index.cb13c93f.js";import"./index.b2ec9148.js";import"./dayjs.min.cf2171ab.js";import"./index.3d06ecbb.js";import"./index.e30a4152.js";import"./index.1dd41060.js";import"./index.fd538503.js";import"./index.4af0e149.js";import"./eagerComputed.7fba5e3b.js";import"./transButton.7319b884.js";import"./useRefs.335cb825.js";import"./_baseEach.e644a8bc.js";import"./download.51a64bb1.js";import"./index.2ce8ed60.js";import"./index.f5075019.js";import"./dateUtil.d25fd49f.js";import"./uniqBy.eed4f041.js";const z=y({name:"LockModal",components:{BasicModal:b,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.username}),[d,{closeModal:a}]=N(),[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,R({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 Co=w(z,[["render",G]]);export{Co as default};