|
@@ -4,11 +4,13 @@ import VuePdfApp from "vue3-pdf-app";
|
|
|
import "vue3-pdf-app/dist/icons/main.css";
|
|
|
|
|
|
const pdfSource = ref("");
|
|
|
+const pageNumber = ref(1);
|
|
|
|
|
|
const visible = ref(false);
|
|
|
|
|
|
-const showPdf = (url) => {
|
|
|
+const showPdf = (url: string, pageN: number = 1) => {
|
|
|
pdfSource.value = url;
|
|
|
+ pageNumber.value = pageN;
|
|
|
|
|
|
visible.value = true;
|
|
|
};
|
|
@@ -94,7 +96,7 @@ const config = ref({
|
|
|
class="mid-pdf-box"
|
|
|
:pdf="pdfSource"
|
|
|
page-scale="page-fit"
|
|
|
- :page-number="1"
|
|
|
+ :page-number="pageNumber"
|
|
|
:config="config"
|
|
|
></VuePdfApp>
|
|
|
</el-drawer>
|