File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -117,12 +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 |
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 |
126127
127128### Available slots:
128129| Slot | Description | Default |
Original file line number Diff line number Diff line change 33 class =" lb-demo"
44 :thumbnail =" thumbnail"
55 :images =" images"
6+ :openAtIndex =" 1"
67 >
78 <LightboxDefaultLoader slot =" loader" />
89 <div slot =" content" slot-scope =" { url }" >
Original file line number Diff line number Diff line change 5757 images: {
5858 type: Array ,
5959 },
60+ openAtIndex: {
61+ type: Number ,
62+ default: 0 ,
63+ },
6064 alternateText: {
6165 type: String ,
6266 default: ' ' ,
7276 data () {
7377 return {
7478 visible: this .value ,
75- index: 0 ,
79+ index: this . openAtIndex ,
7680 displayImage: true ,
7781 }
7882 },
9599 methods: {
96100 show () {
97101 this .visible = true
98- this .index = 0
102+ this .index = this . openAtIndex
99103 },
100104 hide () {
101105 this .visible = false
102- this .index = 0
106+ this .index = this . openAtIndex
103107 },
104108 previous () {
105109 if (this .hasPrevious ) {
You can’t perform that action at this time.
0 commit comments