LockModal.c3171609.js 3.1 KB

1
  1. var f=(o,l,r)=>new Promise((c,s)=>{var d=e=>{try{t(r.next(e))}catch(i){s(i)}},a=e=>{try{t(r.throw(e))}catch(i){s(i)}},t=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,a);t((r=r.apply(o,l)).next())});import{aw as w,a as y,c as $,b as F,r as L,f as _,w as u,o as M,j as S,z as g,m as p,q as m,t as k,n as h,B as I,b0 as b}from"./index.7e08ba81.js";import{B as N,a as R}from"./index.aef1b210.js";import{B as P}from"./BasicForm.09fa6853.js";import{u as U}from"./useForm.e12ea52c.js";import{u as V}from"./lock.19cea2d5.js";import{h as q}from"./header.b3b1e10f.js";import"./useWindowSizeFn.9cd1b73f.js";import"./FullscreenOutlined.3ea9a56b.js";/* empty css *//* empty css */import"./index.0fba574f.js";import"./index.a9463ec3.js";import"./Checkbox.2b7c666a.js";import"./index.0d1117cf.js";import"./index.db9b952c.js";import"./Group.ea437422.js";import"./index.0e13704b.js";import"./eagerComputed.41f917f7.js";import"./FileOutlined.1ba59fec.js";import"./index.7bbcc8f3.js";import"./Form.0777dffc.js";import"./Col.dccd6464.js";import"./useFlexGapSupport.ba88ba25.js";import"./_baseIteratee.cd40e9ab.js";import"./get.06058cdc.js";import"./useSize.1210be5f.js";import"./useRefs.9e0a4abb.js";import"./index.673e5955.js";import"./index.7fe36cdd.js";import"./index.756c7042.js";import"./DeleteOutlined.12ba33eb.js";import"./index.1016abaf.js";import"./index.821e0528.js";import"./index.01b7ee47.js";import"./download.ef0c06e3.js";import"./base64Conver.08b9f4ec.js";import"./index.e102b091.js";import"./index.7e5abc0c.js";import"./transButton.38e068f8.js";import"./index.20008ed6.js";import"./index.51fe0c69.js";import"./uniqBy.e8d75d01.js";const z=y({name:"LockModal",components:{BasicModal:N,BasicForm:P},setup(){const{t:o}=$(),{prefixCls:l}=F("header-lock-modal"),r=L(),c=V(),s=_(()=>{var n;return(n=r.getUserInfo)==null?void 0:n.realName}),[d,{closeModal:a}]=R(),[t,{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:l,getRealName:s,register:d,registerForm:t,handleLock:v,avatar:B}}}),D=["src"];function j(o,l,r,c,s,d){const a=u("BasicForm"),t=u("a-button"),e=u("BasicModal");return M(),S(e,b({footer:null,title:o.t("layout.header.lockScreen")},o.$attrs,{class:o.prefixCls,onRegister:o.register}),{default:g(()=>[p("div",{class:m(`${o.prefixCls}__entry`)},[p("div",{class:m(`${o.prefixCls}__header`)},[p("img",{src:o.avatar,class:m(`${o.prefixCls}__header-img`)},null,10,D),p("p",{class:m(`${o.prefixCls}__header-name`)},k(o.getRealName),3)],2),h(a,{onRegister:o.registerForm},null,8,["onRegister"]),p("div",{class:m(`${o.prefixCls}__footer`)},[h(t,{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",j]]);export{bo as default};