vmp
vue-mouse-position
npm i vue-mouse-position
vmp

vue-mouse-position

get the current mouse position

by wangshaojie

0.0.2 (see all)License:MITTypeScript:Not FoundCategories:Vue Mouse Events
npm i vue-mouse-position
Readme

vue-mouse-position

get the current mouse position

Build Setup

安装

npm install --save-dev vue-mouse-position

使用

// 导出组件
import Mouse from './assets/common/mouse.js'

// 注册组件
export default{
    components: {
        Mouse
    },
}

// 模板调用
<template>
  <div id="app">
    <Mouse :render="renderPosition"></Mouse>
  </div>
</template>

// 获取下x,y的值
methods:{
    renderPosition({x, y}) {
      return `<h1>当前鼠标的位置是${x}, ${y}</h1>`
    }
}

Downloads/wk

6

GitHub Stars

0
No data available

LAST COMMIT

NaNyrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

0

OPEN PRs

0
No data available
VersionTagPublished
0.0.2
latest
3yrs ago
No tutorials found
Add a tutorial