Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6038122

Browse files
committed
Thumbnail progressive loading fixed.
1 parentc976f96 commit6038122

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"laravel-frontend-file-manager",
3-
"version":"3.0.159",
3+
"version":"3.0.169",
44
"description":"File manager for Laravel",
55
"keywords": [
66
"laravel",

‎src/components/manager/Thumbnail.vue

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
<template>
2-
<!--<figure class="fm-thumbnail">
3-
<transition name="fade" mode="out-in">
4-
<i v-if="!src" class="far fa-file-image fa-5x pb-2" />
5-
<img v-else v-bind:src="src" v-bind:alt="file.filename" class="img-thumbnail" />
6-
</transition>
7-
</figure>-->
8-
<divclass="fm-thumbnail">
2+
<figureclass="fm-thumbnail">
93
<transitionname="fade"mode="out-in">
104
<divclass="spinner-border spinner-border-lg text-muted my-2"v-if="!src">
115
<spanclass="visually-hidden">Loading...</span>
126
</div>
137
<imgv-elsev-bind:src="src"v-bind:alt="file.filename"class="img-thumbnail" />
148
</transition>
15-
</div>
9+
</figure>
1610
</template>
1711

1812
<script>
@@ -39,28 +33,34 @@ export default {
3933
'file.timestamp':'loadImage',
4034
},
4135
mounted() {
42-
/*if (window.IntersectionObserver) {
43-
const observer = new IntersectionObserver(
44-
(entries, obs) => {
45-
entries.forEach((entry) => {
46-
if (entry.isIntersecting) {
47-
this.loadImage();
48-
obs.unobserve(this.$el);
49-
}
50-
});
51-
},
52-
{
53-
root: null,
54-
threshold: '0.5',
55-
}
56-
);
36+
if (window.IntersectionObserver) {
37+
try {
38+
constobserver=newIntersectionObserver(
39+
(entries,obs)=> {
40+
entries.forEach((entry)=> {
41+
if (entry.isIntersecting) {
42+
this.loadImage();
43+
obs.unobserve(this.$el);
44+
}
45+
});
46+
},
47+
{
48+
root:null,
49+
/*threshold: '0.5',*/
50+
threshold:'0.1',
51+
}
52+
);
53+
54+
// add observer for template
55+
observer.observe(this.$el);
56+
}catch(e) {
57+
this.loadImage();
58+
}
5759
58-
// add observer for template
59-
observer.observe(this.$el);
6060
}else {
6161
this.loadImage();
62-
}*/
63-
this.loadImage();
62+
}
63+
//this.loadImage();
6464
},
6565
computed: {
6666
/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp