From b6eeda7b38d72aa26641035d199efcaf4cf40599 Mon Sep 17 00:00:00 2001 From: Henrique Deodato Date: Wed, 10 Jul 2019 16:43:37 -0300 Subject: [PATCH 1/4] Update swipe.vue Added support for lateral arrows Added support for click inside the indicators --- src/swipe.vue | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/swipe.vue b/src/swipe.vue index 35badaf..543612d 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 +148,11 @@ propagation: { type: Boolean, default: false + }, + + showArrows: { + type: Boolean, + default: false } }, From fd86083cf597edcf633cd4acd031589eb94fb3b6 Mon Sep 17 00:00:00 2001 From: Henrique Deodato Date: Wed, 10 Jul 2019 16:48:03 -0300 Subject: [PATCH 2/4] Update README.md added documentation for arrows --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2386124..d2eab1d 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ 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 | | 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 | From 80fb0af0929add7426184448098d27894ad2efad Mon Sep 17 00:00:00 2001 From: Henrique Deodato Date: Wed, 10 Jul 2019 17:20:08 -0300 Subject: [PATCH 3/4] Update swipe.vue added support to change the arrows by props --- src/swipe.vue | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/swipe.vue b/src/swipe.vue index 543612d..f945e29 100644 --- a/src/swipe.vue +++ b/src/swipe.vue @@ -59,7 +59,7 @@ } .mint-swipe-arrow-right{ right: 0; - } + } @@ -149,10 +155,20 @@ type: Boolean, default: false }, - + showArrows: { type: Boolean, default: false + }, + + leftArrow: { + type: String, + default: "" + }, + + rightArrow: { + type: String, + default: "" } }, From 037aa66e98db260285226af15ac6a71986aa5261 Mon Sep 17 00:00:00 2001 From: Henrique Deodato Date: Wed, 10 Jul 2019 17:23:42 -0300 Subject: [PATCH 4/4] Update README.md left and right arrow documentation --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d2eab1d..b433d34 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,8 @@ Work on a Vue instance: | 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 |