UNPKG

pdfobject-vue

Version:

Official PDFObject component for Vue 3

26 lines (25 loc) 581 B
import { ref as r, onMounted as c, onUpdated as p, openBlock as i, createElementBlock as l } from "vue"; import u from "pdfobject"; const s = { __name: "PDFObject", props: { url: { type: String, required: !0 }, options: { type: Object, required: !1 } }, setup(e) { const t = e, n = r(null), o = () => { u.embed(t.url, n.value, t.options); }; return c(o), p(o), (a, d) => (i(), l("div", { ref_key: "pdfContainer", ref: n }, null, 512)); } }, _ = { install(e) { e.component("PdfObject", s); } }; export { _ as default };