Skip to content

Commit 5002708

Browse files
committed
Rename the prop
1 parent 05c610d commit 5002708

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ import styles from 'vue-pure-lightbox/dist/VuePureLightbox.css'
117117

118118
### Available props:
119119

120-
| Prop | Type | Value |
121-
| -------------- | ----------------- | ----------------------------------------------- |
122-
| thumbnail | string | Path to a file being your thumbnail |
123-
| images | string[] or array | Array of paths to files visible in the lightbox |
124-
| alternate-text | string | **(Optional)** alt="" text for your image |
125-
| value | boolean | **(Optional)** reactive visibility prop |
126-
| openAt | integer | **(Optional)** index of image to show on open |
120+
| Prop | Type | Value |
121+
| -------------- | ----------------- | --------------------------------------------------------------- |
122+
| thumbnail | string | Path to a file being your thumbnail |
123+
| images | string[] or array | Array of paths to files visible in the lightbox |
124+
| alternate-text | string | **(Optional)** alt="" text for your image |
125+
| value | boolean | **(Optional)** reactive visibility prop |
126+
| open-at-index | integer | **(Optional)** index of an image to show when opening the modal |
127127

128128
### Available slots:
129129
| Slot | Description | Default |

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class="lb-demo"
44
:thumbnail="thumbnail"
55
:images="images"
6-
:openAt="1"
6+
:openAtIndex="1"
77
>
88
<LightboxDefaultLoader slot="loader" />
99
<div slot="content" slot-scope="{ url }">

src/Components/Lightbox.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
images: {
5858
type: Array,
5959
},
60-
openAt: {
60+
openAtIndex: {
6161
type: Number,
6262
default: 0,
6363
},
@@ -76,7 +76,7 @@
7676
data() {
7777
return {
7878
visible: this.value,
79-
index: this.openAt,
79+
index: this.openAtIndex,
8080
displayImage: true,
8181
}
8282
},
@@ -99,11 +99,11 @@
9999
methods: {
100100
show() {
101101
this.visible = true
102-
this.index = this.openAt
102+
this.index = this.openAtIndex
103103
},
104104
hide() {
105105
this.visible = false
106-
this.index = this.openAt
106+
this.index = this.openAtIndex
107107
},
108108
previous() {
109109
if (this.hasPrevious) {

0 commit comments

Comments
 (0)