import{_ as P}from"./index.vue_vue_type_script_setup_true_name_svgIcon_lang.EO34UlUs.js";import{d as R,r as h,aD as V,Z as z,j as F,Y as H,ai as l,P as y,V as g,o as $,c as B,a as t,I as N,a2 as a,S as W,T as m,U as s,O as r,a9 as U,W as G,n as K}from"./vue.1RczIYhx.js";import{f as u}from"./formatTime.in1fXasu.js";import{u as j,L as J}from"./index.DoJnwA7v.js";import{_ as O}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./elementPlus.CqHltQSO.js";const Z={class:"layout-lock-screen"},Q={class:"layout-lock-screen-date-box"},X={class:"layout-lock-screen-date-box-time"},ee={class:"layout-lock-screen-date-box-minutes"},oe={class:"layout-lock-screen-date-box-info"},te={class:"layout-lock-screen-date-top"},ne={class:"layout-lock-screen-login"},se={class:"layout-lock-screen-login-box"},ie={class:"layout-lock-screen-login-box-value"},ce={class:"layout-lock-screen-login-icon"},le=R({__name:"index",setup(ae){const d=h(),f=h(),L=j(),{themeConfig:i}=V(L),e=z({transparency:1,downClientY:0,moveDifference:0,isShowLoockLogin:!1,isFlags:!1,querySelectorEl:"",time:{hm:"",s:"",mdq:""},setIntervalTime:0,isShowLockScreen:!1,isShowLockScreenIntervalTime:0,lockScreenPassword:""}),T=o=>{e.isFlags=!0,e.downClientY=o.clientY},D=o=>{e.isFlags=!0,e.downClientY=o.touches[0].clientY},x=o=>{e.moveDifference=o.clientY-e.downClientY,p()},C=o=>{e.moveDifference=o.touches[0].clientY-e.downClientY,p()},p=()=>{if(e.isFlags){const o=e.querySelectorEl,n=e.transparency-=1/200;if(e.moveDifference>=0)return!1;o.setAttribute("style",`top:${e.moveDifference}px;cursor:pointer;opacity:${n};`),e.moveDifference<-400&&(o.setAttribute("style",`top:${-o.clientHeight}px;cursor:pointer;transition:all 0.3s ease;`),e.moveDifference=-o.clientHeight,setTimeout(()=>{var c;o&&((c=o.parentNode)==null||c.removeChild(o))},300)),e.moveDifference===-o.clientHeight&&(e.isShowLoockLogin=!0,f.value.focus())}},v=()=>{e.isFlags=!1,e.transparency=1,e.moveDifference>=-400&&e.querySelectorEl.setAttribute("style","top:0px;opacity:1;transition:all 0.3s ease;")},I=()=>{K(()=>{e.querySelectorEl=d.value})},k=()=>{e.time.hm=u(new Date,"HH:MM"),e.time.s=u(new Date,"SS"),e.time.mdq=u(new Date,"mm月dd日，WWW")},b=()=>{k(),e.setIntervalTime=window.setInterval(()=>{k()},1e3)},M=()=>{i.value.isLockScreen?e.isShowLockScreenIntervalTime=window.setInterval(()=>{if(i.value.lockScreenTime<=1)return e.isShowLockScreen=!0,_(),!1;i.value.lockScreenTime--},1e3):clearInterval(e.isShowLockScreenIntervalTime)},_=()=>{i.value.isDrawer=!1,J.set("themeConfig",i.value)},S=()=>{i.value.isLockScreen=!1,i.value.lockScreenTime=30,_()};return F(()=>{I(),b(),M()}),H(()=>{window.clearInterval(e.setIntervalTime),window.clearInterval(e.isShowLockScreenIntervalTime)}),(o,n)=>{const c=P,Y=l("ele-Right"),E=l("el-icon"),q=l("el-button"),A=l("el-input");return y(($(),B("div",null,[n[5]||(n[5]=t("div",{class:"layout-lock-screen-mask"},null,-1)),t("div",{class:N(["layout-lock-screen-img",{"layout-lock-screen-filter":e.isShowLoockLogin}])},null,2),t("div",Z,[t("div",{class:"layout-lock-screen-date",ref_key:"layoutLockScreenDateRef",ref:d,onMousedown:T,onMousemove:x,onMouseup:v,onTouchstart:a(D,["stop"]),onTouchmove:a(C,["stop"]),onTouchend:a(v,["stop"])},[t("div",Q,[t("div",X,[W(m(e.time.hm),1),t("span",ee,m(e.time.s),1)]),t("div",oe,m(e.time.mdq),1)]),t("div",te,[s(c,{name:"ele-Top"}),n[2]||(n[2]=t("div",{class:"layout-lock-screen-date-top-text"},"上滑解锁",-1))])],544),s(G,{name:"el-zoom-in-center"},{default:r(()=>[y(t("div",ne,[t("div",se,[n[3]||(n[3]=t("div",{class:"layout-lock-screen-login-box-img"},[t("img",{src:"https://img2.baidu.com/it/u=1978192862,2048448374&fm=253&fmt=auto&app=138&f=JPEG?w=504&h=500"})],-1)),n[4]||(n[4]=t("div",{class:"layout-lock-screen-login-box-name"},"Administrator",-1)),t("div",ie,[s(A,{placeholder:"请输入密码",ref_key:"layoutLockScreenInputRef",ref:f,modelValue:e.lockScreenPassword,"onUpdate:modelValue":n[0]||(n[0]=w=>e.lockScreenPassword=w),onKeyup:n[1]||(n[1]=U(a(w=>S(),["stop"]),["enter","native"]))},{append:r(()=>[s(q,{onClick:S},{default:r(()=>[s(E,{class:"el-input__icon"},{default:r(()=>[s(Y)]),_:1})]),_:1})]),_:1},8,["modelValue"])])]),t("div",ce,[s(c,{name:"ele-Microphone",size:20}),s(c,{name:"ele-AlarmClock",size:20}),s(c,{name:"ele-SwitchButton",size:20})])],512),[[g,e.isShowLoockLogin]])]),_:1})])],512)),[[g,e.isShowLockScreen]])}}}),ve=O(le,[["__scopeId","data-v-dd599b21"]]);export{ve as default};
