You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
2.4 KiB
JavaScript

var _=(u,s,o)=>new Promise((l,m)=>{var p=a=>{try{r(o.next(a))}catch(n){m(n)}},d=a=>{try{r(o.throw(a))}catch(n){m(n)}},r=a=>a.done?l(a.value):Promise.resolve(a.value).then(p,d);r((o=o.apply(u,s)).next())});import{p as B,c as I,l as $}from"./entry/index-C2Ijy48E-1723706691540.js";import{a as C,B as L}from"./index-fya05jI8.js";import{u as M,_ as N}from"./useForm-fILnWqWp.js";import"./BasicForm.vue_vue_type_style_index_0_lang-D499EpF5.js";import"./componentMap-zBHKqdNc.js";import{c as R}from"./index-DF_o0PAQ.js";import{h as b}from"./header-OZa5fSDc.js";import{d as x,c as f,_ as P,a8 as F,a9 as k,ad as U,u as e,aa as V,a0 as c,a2 as i,a1 as g,k as h,G as D}from"./vue-aEZWZQSa.js";import"./antd-BY-1PcYE.js";import"./useWindowSizeFn-CjdUjzGl.js";import"./FormItem.vue_vue_type_script_lang-CKJUw6EQ.js";import"./helper-D0Efh3UP.js";import"./RadioButtonGroup.vue_vue_type_script_setup_true_lang-CVQ-sEzT.js";import"./index-DVy1eUzr.js";import"./useSortable-Bra4jKJL.js";import"./download-Cu3oizbN.js";import"./useLoading-C2GeNIUj.js";import"./copyTextToClipboard-BBFF3Y3I.js";import"./onMountedOrActivated-BIJ0U1R1.js";import"./style-apcQnL4e.js";import"./createAsyncComponent-CCw68KNm.js";import"./index-BCWxk4Sz.js";import"./useContentViewHeight-BBd42TOY.js";import"./index-C8bZxGin.js";const G=["src"],pe=x({name:"LockModal",__name:"LockModal",setup(u){const{t:s}=$(),{prefixCls:o}=B("header-lock-modal"),l=I(),m=R(),p=f(()=>{var t;return(t=l.getUserInfo)==null?void 0:t.realName}),[d,{closeModal:r}]=C(),[a,{validate:n,resetFields:v}]=M({showActionButtonGroup:!1,schemas:[{field:"password",label:s("layout.header.lockScreenPassword"),colProps:{span:24},component:"InputPassword",required:!0}]}),w=()=>_(this,null,function*(){const{password:t=""}=yield n();r(),m.setLockInfo({isLock:!0,pwd:t}),yield v()}),y=f(()=>{const{avatar:t}=l.getUserInfo;return t||b});return(t,q)=>{const S=V("a-button");return P(),F(e(L),U({footer:null,title:e(s)("layout.header.lockScreen")},t.$attrs,{class:e(o),onRegister:e(d)}),{default:k(()=>[c("div",{class:i(`${e(o)}__entry`)},[c("div",{class:i(`${e(o)}__header`)},[c("img",{src:y.value,class:i(`${e(o)}__header-img`)},null,10,G),c("p",{class:i(`${e(o)}__header-name`)},g(p.value),3)],2),h(e(N),{onRegister:e(a)},null,8,["onRegister"]),c("div",{class:i(`${e(o)}__footer`)},[h(S,{type:"primary",block:"",class:"mt-2",onClick:w},{default:k(()=>[D(g(e(s)("layout.header.lockScreenBtn")),1)]),_:1})],2)],2)]),_:1},16,["title","class","onRegister"])}}});export{pe as default};