提交 7822d933 编写于 作者: Q qiang

feat: swiper 组件优化鼠标操作

上级 73271e2a
......@@ -34,6 +34,7 @@ uni-swiper-item {
position: absolute;
width: 100%;
height: 100%;
cursor: grab;
}
uni-swiper-item[hidden] {
......
......@@ -596,6 +596,11 @@ export default {
for (let index = 0, length = swiperItems.length; index < length; index++) {
let currentSync = this.currentSync
slidesDots.push(createElement('div', {
on: {
click: () => {
this._animateViewport(this.currentSync = index, this.currentChangeSource = 'click', this.circularEnabled ? 1 : 0)
}
},
class: {
'uni-swiper-dot': true,
'uni-swiper-dot-active': (index < currentSync + this.displayMultipleItemsNumber && index >= currentSync) || (index < currentSync + this.displayMultipleItemsNumber - length)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册