const { body } = document;
let bodyWidth = body.getBoundingClientRect();
获取当前屏幕临界点
const { body } = document
const WIDTH = 992 // refer to Bootstrap's responsive design
function getIsMobile() {
const rect = body.getBoundingClientRect()
return rect.width - 1 < WIDTH
}