提交 07418505 编写于 作者: D DCloud_LXH

chore(h5): swiper navigation

上级 f377deee
...@@ -638,9 +638,11 @@ export default { ...@@ -638,9 +638,11 @@ export default {
this.circularEnabled ? 1 : 0 this.circularEnabled ? 1 : 0
) )
}, },
_navigationClick ($event, type) { _navigationClick ($event, type, disabled) {
$event.stopPropagation() $event.stopPropagation()
if (disabled) return
const swiperItemLength = this.items.length const swiperItemLength = this.items.length
let _current = this.currentSync let _current = this.currentSync
...@@ -796,7 +798,7 @@ export default { ...@@ -796,7 +798,7 @@ export default {
'div', 'div',
{ {
on: { on: {
click: (e) => this._navigationClick(e, 'prev'), click: (e) => this._navigationClick(e, 'prev', this.prevDisabled),
...navigationEvent ...navigationEvent
}, },
class: [ class: [
...@@ -814,7 +816,7 @@ export default { ...@@ -814,7 +816,7 @@ export default {
'div', 'div',
{ {
on: { on: {
click: (e) => this._navigationClick(e, 'next'), click: (e) => this._navigationClick(e, 'next', this.nextDisabled),
...navigationEvent ...navigationEvent
}, },
class: [ class: [
...@@ -949,8 +951,7 @@ uni-swiper .uni-swiper-navigation { ...@@ -949,8 +951,7 @@ uni-swiper .uni-swiper-navigation {
uni-swiper .uni-swiper-navigation-disabled { uni-swiper .uni-swiper-navigation-disabled {
opacity: 0.35; opacity: 0.35;
cursor: auto; cursor: not-allowed;
pointer-events: none;
} }
uni-swiper .uni-swiper-navigation-hide { uni-swiper .uni-swiper-navigation-hide {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册