mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 19:10:40 +00:00
Added spinner when pdf is loading
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
## Version 2.2.0.9
|
## Version 2.2.0.9
|
||||||
#### Release date: 22. Jun 2022
|
#### Release date: 22. Jun 2022
|
||||||
|
- Added spinner when pdf is loading
|
||||||
- Set sandbox/live mode in PayPal key configuration setup form
|
- Set sandbox/live mode in PayPal key configuration setup form
|
||||||
- Fixed issue when after deleting user, the related subscription wasn't deleted
|
- Fixed issue when after deleting user, the related subscription wasn't deleted
|
||||||
- Fixed issue when you perform composer update with private repository
|
- Fixed issue when you perform composer update with private repository
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
class="absolute bottom-0 top-0 left-0 right-0 z-10 mx-auto overflow-y-auto rounded-xl md:p-5"
|
class="absolute bottom-0 top-0 left-0 right-0 z-10 mx-auto overflow-y-auto rounded-xl md:p-5"
|
||||||
:style="{ width: documentSize + '%' }"
|
:style="{ width: documentSize + '%' }"
|
||||||
>
|
>
|
||||||
|
<div
|
||||||
|
v-if="isLoading"
|
||||||
|
class="mx-auto fixed left-0 right-0 top-1/2 translate-y-5 w-full z-10"
|
||||||
|
>
|
||||||
|
<Spinner />
|
||||||
|
</div>
|
||||||
<pdf
|
<pdf
|
||||||
:src="pdfData"
|
:src="pdfData"
|
||||||
v-for="i in numPages"
|
v-for="i in numPages"
|
||||||
@@ -12,39 +18,43 @@
|
|||||||
scale="page-width"
|
scale="page-width"
|
||||||
id="printable-file"
|
id="printable-file"
|
||||||
class="mx-auto mb-6 w-full overflow-hidden md:rounded-xl md:shadow-lg"
|
class="mx-auto mb-6 w-full overflow-hidden md:rounded-xl md:shadow-lg"
|
||||||
>
|
@loading="documentLoaded"
|
||||||
<template slot="loading">
|
/>
|
||||||
<b>
|
|
||||||
{{ $t('loading_content') }}
|
|
||||||
</b>
|
|
||||||
</template>
|
|
||||||
</pdf>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Spinner from "../../UI/Others/Spinner"
|
||||||
import { events } from '../../../bus'
|
import { events } from '../../../bus'
|
||||||
import pdf from 'pdfvuer'
|
import pdf from 'pdfvuer'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PdfFile',
|
name: 'PdfFile',
|
||||||
components: {
|
components: {
|
||||||
|
Spinner,
|
||||||
pdf,
|
pdf,
|
||||||
},
|
},
|
||||||
props: ['file'],
|
props: [
|
||||||
|
'file'
|
||||||
|
],
|
||||||
watch: {
|
watch: {
|
||||||
file() {
|
file() {
|
||||||
this.getPdf()
|
this.getPdf()
|
||||||
|
this.isLoading = true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pdfData: undefined,
|
pdfData: undefined,
|
||||||
documentSize: 50,
|
documentSize: 50,
|
||||||
|
isLoading: true,
|
||||||
numPages: 0,
|
numPages: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
documentLoaded() {
|
||||||
|
this.isLoading = false
|
||||||
|
},
|
||||||
getPdf() {
|
getPdf() {
|
||||||
this.pdfData = undefined
|
this.pdfData = undefined
|
||||||
this.numPages = 0
|
this.numPages = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user