You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
696 B
38 lines
696 B
2 months ago
|
<template>
|
||
|
<div class="pdf-container">
|
||
|
<vue-office-docx
|
||
|
:src="pdfUrl"
|
||
|
/>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script setup lang="ts">
|
||
|
import { ref, onMounted, nextTick } from 'vue';
|
||
|
//引入VueOfficeDocx组件
|
||
|
//引入相关样式
|
||
|
import { message } from 'ant-design-vue';
|
||
|
import { MinusOutlined, PlusOutlined } from '@ant-design/icons-vue';
|
||
|
|
||
|
// Props 定义
|
||
|
interface Props {
|
||
|
id: string;
|
||
|
}
|
||
|
const props = defineProps<Props>();
|
||
|
|
||
|
const currentPage = ref(1);
|
||
|
const pageCount = ref(0);
|
||
|
const documentLoaded = ref(false);
|
||
|
|
||
|
const handleError = (error: Error) => {
|
||
|
message.error('PDF显示出错:' + error.message);
|
||
|
};
|
||
|
|
||
|
|
||
|
onMounted(() => {
|
||
|
loadPdf();
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
<style scoped>
|
||
|
|
||
|
</style>
|