【发布时间】:2020-06-30 14:51:07
【问题描述】:
我在输入事件时遇到问题。如果我这样做:
function(e: MouseEvent | TouchEvent) {
const coords = e.touches ? e.touches[0].clientX : e.clientX
}
我收到此错误
1. Cannot get e.clientX because property clientX is missing in TouchEvent
2. Cannot get e.touches[0] because an index signature declaring the expected key / value type is
missing in property touches of unknown type
感谢您的帮助。
【问题讨论】:
标签: javascript reactjs flowtype