fixed add bug. added push test
This commit is contained in:
parent
77d460e8c4
commit
5e8be9b390
2 changed files with 15 additions and 2 deletions
|
@ -147,7 +147,8 @@
|
|||
add (offset) {
|
||||
let index = this.currentIndex;
|
||||
index += offset;
|
||||
if (index === this.slides.length) index = 0;
|
||||
while (index < 0) index += this.slides.length;
|
||||
index = index % this.slides.length;
|
||||
this.currentIndex = index;
|
||||
},
|
||||
slide () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue