debian-mirror-gitlab/app/assets/javascripts/blob/pdf/index.js
2020-04-08 18:37:08 +05:30

17 lines
330 B
JavaScript

import Vue from 'vue';
import PdfViewer from './pdf_viewer.vue';
export default () => {
const el = document.getElementById('js-pdf-viewer');
return new Vue({
el,
render(createElement) {
return createElement(PdfViewer, {
props: {
pdf: el.dataset.endpoint,
},
});
},
});
};