gtsoft-snail-job-server/snail-job-server/snail-job-server-starter/src/main/resources/admin/assets/detail-drawer-CaKEzTf2.js
2024-06-15 09:02:56 +08:00

2 lines
1.7 KiB
JavaScript

import{d as V,Q as w,R as M,c0 as $,C,r as N,z as W,a as D,aN as B,bd as E,o as i,c,w as d,f as z,c1 as U,g as L,t as T,h,b as j,af as q,b3 as f,c2 as A,c3 as F,c4 as I,c5 as Q,bj as R}from"./index-BztLELzb.js";const G=V({name:"DetailDrawer",__name:"detail-drawer",props:w({title:{},width:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:w(["update:modelValue"],["update:modelValue"]),setup(u,{emit:v}){const e=u,x=v,m=M(u,"modelValue"),b=$(),p=C(),a=N({width:0}),n=W(!1),y=D(()=>{if(e.width)return n.value?e.width[1]:e.width[0];const t=360,o=600;if(p.isMobile)return a.width*.9>=t?`${t}px`:"90%";let s=a.width*.3>=t?`${t}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}),r=()=>{a.width=document.documentElement.clientWidth};B(()=>{r(),window.addEventListener("resize",r)}),E(()=>{window.removeEventListener("resize",r)});const g=t=>{x("update:modelValue",t)};return(t,o)=>{const s=A,l=F,k=I,S=Q;return i(),c(S,{show:m.value,"onUpdate:show":[o[1]||(o[1]=_=>m.value=_),g],"display-directive":"if",width:y.value},{default:d(()=>[z(k,{title:e.title,"native-scrollbar":!1,closable:"","header-class":"operate-dawer-header"},U({header:d(()=>[L(T(e.title)+" ",1),!h(p).isMobile&&(!e.width||e.width&&e.width[0]!==e.width[1])?(i(),j("div",{key:0,quaternary:"",class:"fullscreen text-18px color-#6a6a6a",onClick:o[0]||(o[0]=_=>n.value=!n.value)},[n.value?(i(),c(s,{key:0})):(i(),c(l,{key:1}))])):q("",!0)]),default:d(()=>[f(t.$slots,"default",{},void 0,!0)]),_:2},[h(b).footer?{name:"footer",fn:d(()=>[f(t.$slots,"footer",{},void 0,!0)]),key:"0"}:void 0]),1032,["title"])]),_:3},8,["show","width"])}}}),J=R(G,[["__scopeId","data-v-c74d83e9"]]);export{J as _};