-
+const goNext = () => {
+ if (isLast.value) return
-
{{ field.description }}
+ transitionName.value = 'left'
-
-
- {{ error.$message }}
-
-
-
+ goToNext()
+}
+
+const goPrevious = () => {
+ if (isFirst.value) return
+
+ transitionName.value = 'right'
+
+ goToPrevious()
+}
+
+useEventListener('wheel', (event) => {
+ if (Math.abs(event.deltaX) < Math.abs(event.deltaY)) {
+ // Scrolling more vertically than horizontally
+ return
+ }
+
+ if (event.deltaX < -10) {
+ goPrevious()
+ } else if (event.deltaX > 10) {
+ goNext()
+ }
+})
+
+useEventListener(
+ 'touchmove',
+ (e) => {
+ e.preventDefault()
+ console.log('touchmove')
+ },
+ { passive: false },
+)
+
-