diff --git a/README.md b/README.md index 2386124..b433d34 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,9 @@ Work on a Vue instance: | auto | Number | Delay of auto slide | 3000 | | continuous | Boolean | Create an infinite slider without endpoints | true | | showIndicators | Boolean | Show indicators on slider bottom | true | +| showArrows | Boolean | Show lateral centered arrows | false | +| leftArrow | String | image to be displayed as left arrow | the char "<" | +| rightArrow | String | image to be displayed as right arrow | the char ">" | | noDragWhenSingle | Boolean | Do not drag when there is only one swipe-item | true | | prevent | Boolean | `preventDefault` when touch start, useful for some lower version Android Browser (4.2, etc) | false | | propagation | Boolean | solve nesting | false | diff --git a/src/swipe.vue b/src/swipe.vue index 35badaf..f945e29 100644 --- a/src/swipe.vue +++ b/src/swipe.vue @@ -43,6 +43,23 @@ .mint-swipe-indicator.is-active { background: #fff; } + .mint-swipe-arrow-left, + .mint-swipe-arrow-right{ + position: absolute; + height: 100%; + top: 0; + font-size: 3em; + display: flex; + justify-content: center; + align-items: center; + padding: 0 20px; + } + .mint-swipe-arrow-left{ + left: 0; + } + .mint-swipe-arrow-right{ + right: 0; + } @@ -128,6 +154,21 @@ propagation: { type: Boolean, default: false + }, + + showArrows: { + type: Boolean, + default: false + }, + + leftArrow: { + type: String, + default: "" + }, + + rightArrow: { + type: String, + default: "" } },