pipwerks / pdfobject-vue

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

Export the component directly from the package #2

Open urkle opened 1 week ago

urkle commented 1 week 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 6 days ago

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

urkle commented 4 days ago

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