多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## useMouseInElement ``` <template> <div ref="target"> <h1>Hello world</h1> </div> </template> <script> import { ref } from 'vue' import { useMouseInElement } from '@vueuse/core' export default { setup() { const target = ref(null) // isOutside 鼠标是否在元素中外 const { x, y, isOutside } = useMouseInElement(target) return { x, y, isOutside } } } </script> ```