提交 f1abb85b 编写于 作者: D DCloud_LXH

fix(H5): processEvent add contextmenu

上级 3e58ae5d
......@@ -49,6 +49,10 @@ function processTouches (touches) {
return []
}
function isPCEvent (name) {
return name.startsWith('mouse') || ['contextmenu'].includes(name)
}
export function processEvent (name, $event = {}, detail = {}, target = {}, currentTarget = {}) {
if ($event._processed) {
$event.type = detail.type || name
......@@ -90,7 +94,7 @@ export function processEvent (name, $event = {}, detail = {}, target = {}, curre
stopPropagation () {}
})
if (name.startsWith('mouse')) {
if (isPCEvent(name)) {
const {
top
} = getWindowOffset()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册