@@ -220,18 +220,17 @@ export const Swiper = React.forwardRef<SwiperRef, Partial<SwiperProps>>(
220220 const y = ( springs . y . get ( ) / 100 ) * slideSize
221221 return [ - x , - y ]
222222 } ,
223- triggerAllEvents : true ,
224223 bounds : ( ) => {
225224 if ( loop ) return { }
226225 const slideSize = getSlideSize ( )
227- const swiperSize = getSwiperSize ( )
228226 if ( isVertical ) {
229227 return { top : 0 , bottom : ( count - 1 ) * slideSize }
230228 }
231229 return { left : 0 , right : ( count - 1 ) * slideSize }
232230 } ,
233- preventDefault : true ,
234231 rubberband : true ,
232+ triggerAllEvents : true ,
233+ preventScroll : isVertical ,
235234 axis : isVertical ? 'y' : 'x' ,
236235 pointer : {
237236 touch : true ,
@@ -288,9 +287,9 @@ export const Swiper = React.forwardRef<SwiperRef, Partial<SwiperProps>>(
288287 return (
289288 < div
290289 ref = { stageRef }
291- className = { classNames ( 'nut-swiper- inner' , {
292- 'nut-swiper- inner-vertical' : isVertical ,
293- 'nut-swiper- inner-horizontal' : ! isVertical ,
290+ className = { classNames ( ` ${ classPrefix } - inner` , {
291+ [ ` ${ classPrefix } - inner-vertical` ] : isVertical ,
292+ [ ` ${ classPrefix } - inner-horizontal` ] : ! isVertical ,
294293 } ) }
295294 style = { {
296295 ...( props . slideSize
@@ -304,7 +303,11 @@ export const Swiper = React.forwardRef<SwiperRef, Partial<SwiperProps>>(
304303 }
305304 return (
306305 < div
307- className = { classNames ( 'nut-swiper' , className ) }
306+ className = { classNames (
307+ classPrefix ,
308+ `${ classPrefix } -canmove-${ direction } ` ,
309+ className
310+ ) }
308311 style = { style }
309312 ref = { swiperRef }
310313 { ...bind ( ) }
0 commit comments