获取浏览器窗口大小
function getHeight(){
let height = document.documentElement.clientHeight || document.body.clientHeight || window.innerHeight;
}
onMounted(()=>{
const handleResize=()=>{
getHeight()
})
// 实时监听浏览器窗口大小
window.addEventListener('resize',getHeight)
window.addEventListener('resize',handleResize)
// 注销监听器
window.removeEventListener('resize', getHeight)