useAutoAdapt-DYvVhL8q.js 768 B

1
  1. import{f as u}from"./vue-vendor-Be68asQ6.js";import{S as i}from"./index-BFfnEkVs.js";import{useWindowSizeFn as n}from"./useWindowSizeFn-BTSGGcie.js";import"./antd-vue-vendor-DcqS7Wvq.js";import"./vxe-table-vendor-DHF2TRpV.js";function b(e){const t=u((e==null?void 0:e.def)||"600px");n(m,100,{immediate:!0});function m(){let a=document.documentElement.clientWidth;switch(!0){case a>i.XL:t.value=(e==null?void 0:e.xl)||"600px";break;case a>i.LG:t.value=(e==null?void 0:e.lg)||"600px";break;case a>i.MD:t.value=(e==null?void 0:e.md)||"600px";break;case a>i.SM:t.value=(e==null?void 0:e.sm)||"500px";break;case a>i.XS:t.value=(e==null?void 0:e.xs)||"400px";break;default:t.value=(e==null?void 0:e.mindef)||"300px";break}}return{width:t,calcWidth:m}}export{b as useAdapt};