123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <template>
- <VuePdfEmbed
- :source="pdfSource"
- annotation-layer
- text-layer
- @click="showPdf"
- />
- <el-drawer
- v-model="visible"
- :footer="false"
- :header="false"
- :show-close="false"
- destroy-on-close
- direction="rtl"
- size="972px"
- >
- <VuePdfEmbed :source="pdfSource" annotation-layer text-layer />
- </el-drawer>
- </template>
- <script lang="ts" setup>
- import VuePdfEmbed from "vue-pdf-embed";
- // essential styles
- import "vue-pdf-embed/dist/style/index.css";
- // optional styles
- import "vue-pdf-embed/dist/style/annotationLayer.css";
- import "vue-pdf-embed/dist/style/textLayer.css";
- // either URL, Base64, binary, or document proxy
- const props = defineProps({
- pdfSource: {
- type: String,
- required: true,
- },
- });
- const visible = ref(false);
- const showPdf = () => {
- visible.value = true;
- };
- </script>
- <style lang="scss" scoped></style>
|