forked from forks/ffprobe-wasm
0.3.0
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user