refactor
parent
84fc44ceff
commit
5f7d9ee0a9
|
@ -12,9 +12,9 @@
|
|||
<div class="card">
|
||||
<div style="height: 800px">Scroll down to lazy load an image and the DataTable which initiates a query that is not executed on initial page load to speed up load performance.</div>
|
||||
|
||||
<!-- <DeferredContent @load="onImageLoad">
|
||||
<img src="/demo/images/nature/nature4.jpg" alt="Nature"/>
|
||||
</DeferredContent> -->
|
||||
<DeferredContent @load="onImageLoad">
|
||||
<img src="/demo/images/nature/nature4.jpg" alt="Nature" />
|
||||
</DeferredContent>
|
||||
|
||||
<div style="height: 500px"></div>
|
||||
|
||||
|
|
|
@ -250,15 +250,11 @@ export default {
|
|||
created() {
|
||||
this.galleriaService = new PhotoService();
|
||||
},
|
||||
async mounted() {
|
||||
await this.test();
|
||||
mounted() {
|
||||
this.galleriaService.getImages().then((data) => (this.images = data));
|
||||
this.bindDocumentListeners();
|
||||
},
|
||||
methods: {
|
||||
async test() {
|
||||
const data = await this.galleriaService.getImages();
|
||||
this.images = data;
|
||||
},
|
||||
onThumbnailButtonClick() {
|
||||
this.showThumbnails = !this.showThumbnails;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue