pipwerks / pdfobject-vue

A PDFObject component for Vue 3 projects
MIT License
7 stars 1 forks source link

Export the component directly from the package #2

Open urkle opened 2 months ago

urkle commented 2 months ago

As I only want to use this component in a few select locations (that are dynamically imported) I would rather not have to install the component globally in my Vue instance. Instead it would be preferable to simply import the component directly where I need to use it. e.g.

<script setup>
import { ref } from 'vue';
import { PdfObject } from 'pdfobject-vue';

const myURL = ref('someURL');
</script>

<template>
<div>
   <PdfObject :url="myURL"/>
</div>
</template>
pipwerks commented 1 month ago

Fair point, I will look into it when I get some spare time. Thanks

urkle commented 1 month ago

@pipwerks I created a PR that should do the trick..