This commit is contained in:
Alf
2020-12-22 14:39:05 -08:00
parent 16d930c36e
commit 4c14fe9858
4 changed files with 11 additions and 14 deletions

View File

@@ -13,7 +13,12 @@
align="right"
></b-pagination>
<b-table striped hover :items="data.frames">
<b-table striped hover :items="data.frames" :busy="isBusy">
<template #table-busy>
<div class="text-center text-primary my-2">
<b-spinner class="align-middle"></b-spinner>
</div>
</template>
<template #cell(pict_type)="data">
{{ String.fromCharCode(data.value) }}
</template>
@@ -39,6 +44,7 @@ export default {
data: null,
currentPage: 1,
perPage: 48,
isBusy: false,
};
},
computed: {
@@ -49,12 +55,14 @@ export default {
created() {
this.$worker.onmessage = (e) => {
this.data = e.data;
this.isBusy = false;
}
this.$worker.postMessage([ 'get_frames', this.file, 0 ]);
},
methods: {
onPageChanged(page) {
this.isBusy = true;
this.$worker.postMessage([ 'get_frames', this.file, this.perPage * (page - 1) ]);
window.scrollTo(0, 0);
},