Commit 087424b 1 parent 3c1f556 commit 087424b Copy full SHA for 087424b
File tree 4 files changed +16
-8
lines changed
4 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ How to use:
148
148
<tr>
149
149
<td>siteLoading</td>
150
150
<td></td>
151
- <td>null </td>
151
+ <td>String </td>
152
152
<td>default image when your image is error or loading</td>
153
153
</tr>
154
154
<tr>
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-image-lightbox" ,
3
3
"description" : " A Vue.js package to display an image gallery lightbox" ,
4
- "version" : " 7.1.0 " ,
4
+ "version" : " 7.1.1 " ,
5
5
"author" :
" Nguyen P. Thien Dzung <[email protected] >" ,
6
6
"license" : " MIT" ,
7
7
"main" : " dist/vue-image-lightbox.min.js" ,
Original file line number Diff line number Diff line change 24
24
:media =" media"
25
25
:show-caption =" true"
26
26
:show-light-box =" false"
27
+ :site-loading =" siteLoading"
27
28
/>
28
29
</div >
29
30
</div >
Original file line number Diff line number Diff line change 31
31
<img
32
32
v-if =" media[select].type !== 'video'"
33
33
:key =" media[select].src"
34
- :src =" media[select].src"
34
+ v-lazy =" {
35
+ src: media[select].src,
36
+ loading: media[select].src,
37
+ error: media[select].src,
38
+ }"
35
39
:srcset =" media[select].srcset || ''"
36
40
class =" vue-lb-modal-image"
37
41
:alt =" media[select].caption"
99
103
<div
100
104
v-for =" (image, index) in imagesThumb"
101
105
v-show =" index >= thumbIndex.begin && index <= thumbIndex.end"
102
- :key =" typeof image.thumb === 'string' ? `${image.thumb }${index}` : index"
103
- v-lazy:background-image =" image.thumb "
106
+ :key =" typeof image.src === 'string' ? `${image.src }${index}` : index"
107
+ v-lazy:background-image =" image"
104
108
:class =" 'vue-lb-modal-thumbnail' + (select === index ? '-active' : '')"
105
109
@click.stop =" showImage(index)"
106
110
>
@@ -220,8 +224,8 @@ export default {
220
224
},
221
225
222
226
siteLoading: {
223
- type: Object ,
224
- default: null ,
227
+ type: String ,
228
+ default: ' ' ,
225
229
},
226
230
227
231
showCaption: {
@@ -300,7 +304,10 @@ export default {
300
304
}))
301
305
}
302
306
303
- return this .media .map (({ thumb, type }) => ({ thumb, type }))
307
+ return this .media .map (({ thumb, type }) => ({
308
+ src: thumb,
309
+ type,
310
+ }))
304
311
}
305
312
},
306
313
You can’t perform that action at this time.
0 commit comments