Skip to content

Commit 3484e60

Browse files
update async for libs
1 parent 2a4d5db commit 3484e60

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ <h2 class="title">{{infos.title}}</h2>
4747
</button>
4848
</div>
4949
</body>
50-
50+
<script src="./dist/img-previewer.js"></script>
5151
<script type="module">
5252
const app = new Vue({
5353
el: '#app',
@@ -72,10 +72,12 @@ <h2 class="title">{{infos.title}}</h2>
7272
});
7373
},
7474
initImgPreviewer() {
75-
const imgPreviewer = new ImgPreviewer('#app', {
76-
scrollbar: true
75+
this.$nextTick(() => {
76+
const imgPreviewer = new ImgPreviewer('#app', {
77+
scrollbar: true
78+
});
7779
});
78-
},
80+
}
7981
albumsCountAnimation() {
8082
const albumCount = document.querySelector('.album-count span');
8183
const totalImages = this.totalImages;
@@ -121,6 +123,4 @@ <h2 class="title">{{infos.title}}</h2>
121123
}
122124
});
123125
</script>
124-
<script src="./dist/img-previewer.js"></script>
125-
126126
</html>

0 commit comments

Comments
 (0)