提交 8c465081 编写于 作者: D DCloud_LXH

chore(h5): swiper navigation

上级 af4606c1
......@@ -843,9 +843,15 @@ const useSwiperNavigation = /*#__PURE__*/ (
onMouseout: (event: MouseEvent) => navigationHover(event, 'out'),
}
function navigationClick($event: MouseEvent, type: NavigationClickType) {
function navigationClick(
$event: MouseEvent,
type: NavigationClickType,
disabled: boolean
) {
$event.stopPropagation()
if (disabled) return
const swiperItemLength = swiperContext.value.length
let _current = state.current
......@@ -929,7 +935,7 @@ const useSwiperNavigation = /*#__PURE__*/ (
},
navigationClass
)}
onClick={(e) => navigationClick(e, 'prev')}
onClick={(e) => navigationClick(e, 'prev', prevDisabled)}
{...navigationAttr}
>
{createNavigationSVG()}
......@@ -943,7 +949,7 @@ const useSwiperNavigation = /*#__PURE__*/ (
},
navigationClass
)}
onClick={(e) => navigationClick(e, 'next')}
onClick={(e) => navigationClick(e, 'next', nextDisabled)}
{...navigationAttr}
>
{createNavigationSVG()}
......
......@@ -100,8 +100,7 @@ uni-swiper[hidden] {
.uni-swiper-navigation-disabled {
opacity: 0.35;
cursor: auto;
pointer-events: none;
cursor: not-allowed;
}
.uni-swiper-navigation-hide {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册