Небольшая поправка
This commit is contained in:
@@ -63,8 +63,8 @@
|
|||||||
<div class="row item q-px-sm no-wrap">
|
<div class="row item q-px-sm no-wrap">
|
||||||
<div class="col row clickable" @click="setBookPos(item.offset)">
|
<div class="col row clickable" @click="setBookPos(item.offset)">
|
||||||
<div class="image-thumb-box row justify-center items-center">
|
<div class="image-thumb-box row justify-center items-center">
|
||||||
<div v-show="!imageLoaded" class="image-thumb column justify-center"><i class="loading-img-icon la la-images"></i></div>
|
<div v-show="!imageLoaded[item.imageId]" class="image-thumb column justify-center"><i class="loading-img-icon la la-images"></i></div>
|
||||||
<img v-show="imageLoaded" class="image-thumb" :src="imageSrc[item.imageId]"/>
|
<img v-show="imageLoaded[item.imageId]" class="image-thumb" :src="imageSrc[item.imageId]"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="no-expand-button column justify-center items-center">
|
<div class="no-expand-button column justify-center items-center">
|
||||||
<div v-show="item.type == 'image/jpeg'" class="image-type it-jpg-color row justify-center">JPG</div>
|
<div v-show="item.type == 'image/jpeg'" class="image-type it-jpg-color row justify-center">JPG</div>
|
||||||
@@ -112,7 +112,7 @@ class ContentsPage extends Vue {
|
|||||||
contents = [];
|
contents = [];
|
||||||
images = [];
|
images = [];
|
||||||
imageSrc = [];
|
imageSrc = [];
|
||||||
imageLoaded = false;
|
imageLoaded = [];
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
}
|
}
|
||||||
@@ -220,16 +220,16 @@ class ContentsPage extends Vue {
|
|||||||
|
|
||||||
//асинхронная загрузка изображений
|
//асинхронная загрузка изображений
|
||||||
this.imageSrc = [];
|
this.imageSrc = [];
|
||||||
this.imageLoaded = false;
|
this.imageLoaded = [];
|
||||||
await utils.sleep(50);
|
await utils.sleep(50);
|
||||||
(async() => {
|
(async() => {
|
||||||
for (i = 0; i < ims.length; i++) {
|
for (i = 0; i < ims.length; i++) {
|
||||||
const id = ims[i].id;
|
const id = ims[i].id;
|
||||||
const bin = this.parsed.binary[id];
|
const bin = this.parsed.binary[id];
|
||||||
this.$set(this.imageSrc, id, (bin ? `data:${bin.type};base64,${bin.data}` : ''));
|
this.$set(this.imageSrc, id, (bin ? `data:${bin.type};base64,${bin.data}` : ''));
|
||||||
|
this.imageLoaded[id] = true;
|
||||||
await utils.sleep(5);
|
await utils.sleep(5);
|
||||||
}
|
}
|
||||||
this.imageLoaded = true;
|
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user