Owl 轮播鼠标拖动在我的浏览器和移动设备上不起作用

Owl Carousel mouse drag not working in my browser and mobile

当我尝试使用鼠标拖动滑块时,滑块总是从第一个位置开始。它不能正常工作。我正在使用下面的代码:

$("#owl-carousel1").owlCarousel({
        loop: false,
        margin: 30,
        responsiveClass: true,
        dots: false,
        nav: true,
        mouseDrag: true,
        touchDrag: true,
        slideBy: 1,
        responsive: {
            0: {
                items: 1.25
            },
            500: {
                items: 1.5
            },
            700: {
                items: 2.5
            },
            1200: {
                items: 3.5,
                margin: 30
            },
            1400: {
                items: 3.5,
                margin: 30
            },
            1600: {
                items: 3.5,
                margin: 30
            }
        }
    });

我发现使用 {items:1.X} 会导致拖拽问题,尝试如下所示将其移除,它会恢复正常工作。
对于您尝试使用“1.X”十进制值执行的操作,请尝试使用 'stagePadding:30' 并将值 30 替换为适合您的情况的值。

responsive: {
        0: {
            items: 1
        },
        500: {
            items: 1
        },
        700: {
            items: 2
        },
        1200: {
            items: 3,
            margin: 30
        },
        1400: {
            items: 3,
            margin: 30
        },
        1600: {
            items: 3,
            margin: 30
        }
    }