mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-27 03:01:14 +08:00
fix(slider): fix slider can't drag in mobile (#1299)
This commit is contained in:
parent
89bc84e5e5
commit
09041347bf
@ -106,7 +106,7 @@ export const useSliderButton = (props: ISliderButtonProps, initData: ISliderButt
|
||||
const getClientXY = (event: MouseEvent | TouchEvent) => {
|
||||
let clientX: number
|
||||
let clientY: number
|
||||
if (event.type === 'touchstart') {
|
||||
if (event.type.startsWith('touch')) {
|
||||
clientY = (event as TouchEvent).touches[0].clientY
|
||||
clientX = (event as TouchEvent).touches[0].clientX
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user