fix:
This commit is contained in:
parent
6288114e78
commit
3d5405d676
3 changed files with 47 additions and 175 deletions
|
|
@ -174,6 +174,27 @@ async function fetchPDF(data: any, type: string = "docx?folder=command") {
|
|||
});
|
||||
}
|
||||
|
||||
/** Navigate to previous page*/
|
||||
function goToPreviousPage() {
|
||||
if (canGoPrevious.value) {
|
||||
page.value--;
|
||||
}
|
||||
}
|
||||
|
||||
/** Navigate to next page*/
|
||||
function goToNextPage() {
|
||||
if (canGoNext.value) {
|
||||
page.value++;
|
||||
}
|
||||
}
|
||||
|
||||
function cleanupObjectUrl() {
|
||||
if (currentObjectUrl.value) {
|
||||
URL.revokeObjectURL(currentObjectUrl.value);
|
||||
currentObjectUrl.value = null;
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => modal.value,
|
||||
async () => {
|
||||
|
|
@ -188,6 +209,7 @@ watch(
|
|||
hideLoader();
|
||||
});
|
||||
} else {
|
||||
cleanupObjectUrl();
|
||||
tab.value = "main";
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
|
|
@ -195,24 +217,6 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Navigate to previous page
|
||||
*/
|
||||
function goToPreviousPage() {
|
||||
if (canGoPrevious.value) {
|
||||
page.value--;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigate to next page
|
||||
*/
|
||||
function goToNextPage() {
|
||||
if (canGoNext.value) {
|
||||
page.value++;
|
||||
}
|
||||
}
|
||||
|
||||
/** check tab เมื่อมีการเปลี่ยน tab*/
|
||||
watch(
|
||||
() => tab.value,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue