gtsoft-snail-job-server/snail-job-server/snail-job-server-ui/src/main/resources/admin/assets/detail-drawer-BRsrBMA8.js
2025-03-23 10:26:50 +08:00

2 lines
1.8 KiB
JavaScript

import{d as b,a0 as h,a1 as L,cT as M,L as N,n as W,r as $,a as C,an as D,p as B,c as u,o as d,cN as E,w as i,f as U,cO as T,cU as z,cK as f,g as A,b as j,Q as q,t as F,h as I,di as K,dj as O,l as Q}from"./index-mUIrqFZO.js";const G=b({name:"DetailDrawer",__name:"detail-drawer",props:h({title:{},width:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:h(["update:modelValue","update:show","afterLeave"],["update:modelValue"]),setup(p,{emit:v}){const t=p,r=v,m=L(p,"modelValue"),x=M(),_=N(),a=W({width:0}),n=$(!1),y=C(()=>{if(t.width)return n.value?t.width[1]:t.width[0];const e=360,o=600;if(_.isMobile)return a.width*.9>=e?`${e}px`:"90%";let s=a.width*.3>=e?`${e}px`:"30%";s=a.width<=420?"90%":s;let l=a.width*.5>=o?`${o}px`:"50%";return l=a.width<=420?"90%":l,n.value?l:s}),c=()=>{a.width=document.documentElement.clientWidth};D(()=>{c(),window.addEventListener("resize",c)}),B(()=>{window.removeEventListener("resize",c)});const g=e=>{r("update:modelValue",e),r("update:show",e)},k=()=>{r("afterLeave")};return(e,o)=>{const s=K,l=O,S=T,V=E;return d(),u(V,{show:m.value,"onUpdate:show":[o[1]||(o[1]=w=>m.value=w),g],"display-directive":"if",width:y.value,onAfterLeave:k},{default:i(()=>[U(S,{title:t.title,"native-scrollbar":!1,closable:"","header-class":"operate-dawer-header"},z({header:i(()=>[A(F(t.title)+" ",1),!I(_).isMobile&&(!t.width||t.width&&t.width[0]!==t.width[1])?(d(),j("div",{key:0,quaternary:"",class:"fullscreen text-18px color-#6a6a6a",onClick:o[0]||(o[0]=w=>n.value=!n.value)},[n.value?(d(),u(s,{key:0})):(d(),u(l,{key:1}))])):q("",!0)]),default:i(()=>[f(e.$slots,"default",{},void 0,!0)]),_:2},[x.footer?{name:"footer",fn:i(()=>[f(e.$slots,"footer",{},void 0,!0)]),key:"0"}:void 0]),1032,["title"])]),_:3},8,["show","width"])}}}),J=Q(G,[["__scopeId","data-v-ef3922d0"]]);export{J as _};