gtsoft-snail-job-server/snail-job-server/snail-job-server-starter/src/main/resources/admin/assets/operate-drawer-B2Yn2ELy.js

2 lines
1.6 KiB
JavaScript
Raw Normal View History

2024-05-15 23:40:27 +08:00
import{_ as k,a as S}from"./close-fullscreen-rounded-Cdf1DUar.js";import{d as V,U as h,V as $,cx as C,s as N,r as B,p as D,a as E,aF as U,bc as z,o as i,c as r,w as l,f as F,cy as L,h as f,aX as w,g as T,t as q,b as A,S as I,cd as O,ce as X,bg as j}from"./index-DydImCNJ.js";const G=V({name:"OperateDrawer",__name:"operate-drawer",props:h({title:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:h(["update:modelValue"],["update:modelValue"]),setup(c,{emit:x}){const m=c,v=x,u=$(c,"modelValue"),M=C(),p=N(),e=B({width:0}),s=D(!1),W=E(()=>{if(p.isMobile)return e.width*.9>=360?"360px":"90%";let a=e.width*.3>=360?"360px":"30%";a=e.width<=420?"90%":a;let n=e.width*.5>=600?"600px":"50%";return n=e.width<=420?"90%":n,s.value?n:a}),d=()=>{e.width=document.documentElement.clientWidth};U(()=>{d(),window.addEventListener("resize",d)}),z(()=>{window.removeEventListener("resize",d)});const y=t=>{v("update:modelValue",t)};return(t,o)=>{const a=k,n=S,b=O,g=X;return i(),r(g,{show:u.value,"onUpdate:show":[o[1]||(o[1]=_=>u.value=_),y],"display-directive":"if",width:W.value},{default:l(()=>[F(b,{title:m.title,"native-scrollbar":!1,closable:"","header-class":"operate-dawer-header"},L({header:l(()=>[T(q(m.title)+" ",1),f(p).isMobile?I("",!0):(i(),A("div",{key:0,quaternary:"",class:"fullscreen text-18px color-#6a6a6a",onClick:o[0]||(o[0]=_=>s.value=!s.value)},[s.value?(i(),r(a,{key:0})):(i(),r(n,{key:1}))]))]),default:l(()=>[w(t.$slots,"default",{},void 0,!0)]),_:2},[f(M).footer?{name:"footer",fn:l(()=>[w(t.$slots,"footer",{},void 0,!0)]),key:"0"}:void 0]),1032,["title"])]),_:3},8,["show","width"])}}}),K=j(G,[["__scopeId","data-v-b580de2e"]]);export{K as _};