fix: 删除无用函数,变量

This commit is contained in:
539943419 committed 2024-08-28 11:52:24 +08:00
1 parent 3a48fd5643
commit d5d9984ae5
1 file changed
+18 -18
+18 -18
View File
@@ -27,7 +27,7 @@ const x = ref(0)
const y = ref(0) const y = ref(0)
const showContextMenu = ref(0) const showContextMenu = ref(0)
// 长按计时器 // 长按计时器
let timer_touch: string | number | NodeJS.Timeout | undefined // let timer_touch: string | number | NodeJS.Timeout | undefined
const onClickoutside = async () => { const onClickoutside = async () => {
showContextMenu.value = 0 showContextMenu.value = 0
@@ -57,25 +57,25 @@ const handleContextMenu = (e: MouseEvent) => {
}) })
} }
const handleTouchStart = (e: TouchEvent) => { // const handleTouchStart = (e: TouchEvent) => {
if(props.touchTimeOut === undefined) { // if(props.touchTimeOut === undefined) {
return // return
} // }
timer_touch ?? clearTimeout(timer_touch) // timer_touch ?? clearTimeout(timer_touch)
timer_touch = setTimeout(() => { // timer_touch = setTimeout(() => {
showContextMenu.value = 1 // showContextMenu.value = 1
x.value = e.targetTouches[0].clientX // x.value = e.targetTouches[0].clientX
y.value = e.targetTouches[0].clientY // y.value = e.targetTouches[0].clientY
}, props.touchTimeOut) // }, props.touchTimeOut)
} // }
const handleTouchEnd = () => { // const handleTouchEnd = () => {
if(timer_touch) { // if(timer_touch) {
clearTimeout(timer_touch) // clearTimeout(timer_touch)
timer_touch = undefined // timer_touch = undefined
} // }
} // }
</script> </script>