UNPKG

uv-ui

Version:

基于vue3的移动端组件库

2 lines (1 loc) 385 B
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),u=t=>t===window,n=(t,e)=>({top:0,left:0,right:t,bottom:e,width:t,height:e}),c=t=>{const e=r.unref(t);if(u(e)){const i=e.innerWidth,o=e.innerHeight;return n(i,o)}return e!=null&&e.getBoundingClientRect?e.getBoundingClientRect():n(0,0)};exports.useRect=c;