1. Vue3中如何用 JS 获取插槽内容:
const defaults = context.slots.default()
2. 获取元素的宽高和位置
const { width , height , top , left } = el.getBoundingClientRect()
3. ES 6 析构赋值的重命名语法
const { left: left1 } = x. getBoundingClientRect()
const { left: left2 } = y. getBoundingClientRect()