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

2 lines
2.7 KiB
JavaScript

var f=(e,m,s)=>new Promise((c,a)=>{var d=o=>{try{r(s.next(o))}catch(i){a(i)}},t=o=>{try{r(s.throw(o))}catch(i){a(i)}},r=o=>o.done?c(o.value):Promise.resolve(o.value).then(d,t);r((s=s.apply(e,m)).next())});import{q as y,a as w,c as $,b as F,r as L,f as _,aC as u,o as M,j as S,y as g,i as l,n as p,t as k,p as h,z as I,aD as R}from"./index.2d67f695.js";import{B as b,a as N}from"./index.668f43cb.js";import{B as P,u as D}from"./useForm.6d8c74d3.js";import{u as U}from"./lock.a07fb9dd.js";import{h as V}from"./header.d801b988.js";import"./useWindowSizeFn.a1de7260.js";import"./FullscreenOutlined.944e5604.js";import"./index.60bd948f.js";import"./index.47269ecc.js";import"./_baseIteratee.35e8d02a.js";import"./get.fedb4b7c.js";import"./useSize.afbbf7a8.js";import"./index.46989e11.js";import"./index.be50a083.js";import"./Checkbox.7aeabef3.js";import"./index.ed73334e.js";import"./index.96fc7f2a.js";import"./index.067e7536.js";import"./index.052c8775.js";import"./index.a6c30269.js";import"./index.47e70fdb.js";import"./eagerComputed.a263e8bc.js";import"./transButton.caaf42fd.js";import"./index.9f588f5b.js";import"./useRefs.593a31cc.js";import"./_baseEach.ffda1513.js";import"./download.d8a7eb76.js";import"./index.de5f8d2c.js";import"./dateUtil.411279a6.js";import"./uniqBy.34ebbb75.js";const q=w({name:"LockModal",components:{BasicModal:b,BasicForm:P},setup(){const{t:e}=$(),{prefixCls:m}=F("header-lock-modal"),s=L(),c=U(),a=_(()=>{var n;return(n=s.getUserInfo)==null?void 0:n.username}),[d,{closeModal:t}]=N(),[r,{validateFields:o,resetFields:i}]=D({showActionButtonGroup:!1,schemas:[{field:"password",label:e("layout.header.lockScreenPassword"),colProps:{span:24},component:"InputPassword",required:!0}]});function v(){return f(this,null,function*(){const B=(yield o()).password;t(),c.setLockInfo({isLock:!0,pwd:B}),yield i()})}const C=_(()=>{const{avatar:n}=s.getUserInfo;return n||V});return{t:e,prefixCls:m,getRealName:a,register:d,registerForm:r,handleLock:v,avatar:C}}}),z=["src"];function j(e,m,s,c,a,d){const t=u("BasicForm"),r=u("a-button"),o=u("BasicModal");return M(),S(o,R({footer:null,title:e.t("layout.header.lockScreen")},e.$attrs,{class:e.prefixCls,onRegister:e.register}),{default:g(()=>[l("div",{class:p(`${e.prefixCls}__entry`)},[l("div",{class:p(`${e.prefixCls}__header`)},[l("img",{src:e.avatar,class:p(`${e.prefixCls}__header-img`)},null,10,z),l("p",{class:p(`${e.prefixCls}__header-name`)},k(e.getRealName),3)],2),h(t,{onRegister:e.registerForm},null,8,["onRegister"]),l("div",{class:p(`${e.prefixCls}__footer`)},[h(r,{type:"primary",block:"",class:"mt-2",onClick:e.handleLock},{default:g(()=>[I(k(e.t("layout.header.lockScreenBtn")),1)]),_:1},8,["onClick"])],2)],2)]),_:1},16,["title","class","onRegister"])}var ke=y(q,[["render",j]]);export{ke as default};