11<template >
2- <Lightbox
2+ <Lightbox
33 class =" lb-demo"
44 :thumbnail =" thumbnail"
55 :images =" images"
6- >
6+ >
77 <LightboxDefaultLoader slot =" loader" />
88 <div slot =" content" slot-scope =" { url }" >
9- <iframe
10- v-if =" url.includes('youtube') || url.includes('youtu.be')"
11- :src =" url"
12- frameborder =" 0"
13- allow =" accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
14- allowfullscreen
15- style =" width : 100% ; height : 90vh ;"
16- />
17- <img v-else :src =" url" >
9+ <iframe
10+ v-if =" url.includes('youtube') || url.includes('youtu.be')"
11+ :src =" url"
12+ frameborder =" 0"
13+ allow =" accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
14+ allowfullscreen
15+ style =" width : 100% ; height : 90vh ;"
16+ />
17+ <img v-else :src =" url" >
1818 </div >
19- </Lightbox >
19+ </Lightbox >
2020</template >
2121
2222<script >
23- import Lightbox , { LightboxDefaultLoader } from ' ./Components/Lightbox.vue'
23+ import Lightbox , { LightboxDefaultLoader } from ' ./Components/Lightbox.vue'
2424
25- export default {
26- components: { Lightbox, LightboxDefaultLoader, },
25+ export default {
26+ components: {
27+ Lightbox,
28+ LightboxDefaultLoader,
29+ },
2730 data () {
28- return {
29- thumbnail: " http://placekitten.com/g/100/100" ,
30- images: [
31- " http://placekitten.com/g/200/300" ,
32- " http://placekitten.com/g/600/400" ,
33- " https://bit.ly/2r8tNLH" ,
34- " https://www.youtube.com/watch?v=Z4j5rJQMdOU" ,
35- ]
36- }
31+ return {
32+ thumbnail: " http://placekitten.com/g/100/100" ,
33+ images: [
34+ " http://placekitten.com/g/200/300" ,
35+ " http://placekitten.com/g/600/400" ,
36+ " https://bit.ly/2r8tNLH" ,
37+ " https://www.youtube.com/watch?v=Z4j5rJQMdOU" ,
38+ ]
39+ }
3740 }
38- }
41+ }
3942 </script >
4043
41- <style >
42- .lb-demo {
44+ <style scoped >
45+ .lb-demo {
4346 height : 100px ;
4447 width : 100px ;
45- }
46- </style >
48+ }
49+ </style >
0 commit comments