Directives
Open pdf directive
This directive uses navigator's method openPdf to open the pdf in CLM compatible format.
Installation
To install the directive, open the command prompt and run the following command:
wiz install --save wiz-open-pdf
To specify the dependency for the component open the package.json and add:
To specify the dependency for the component open the package.json and add the following string:
"wiz-open-pdf": git+https://git.qapint.com/ewizardjs/edetailer/components/wiz-open-pdf.git#VERSION
Registration
After installing the directive, you have to registrate it. For this, add the code below to the app.js
file:
import openPDF from 'wiz-open-pdf';
Vue.directive('open-pdf', openPDF);
Usage
<template>
<wiz-button v-open-pdf="somePDF"></wiz-button>
</template>
<script>
import somePDF from './common/media/pdfs/some.pdf';
export default {
data() {
return {
somePDF
}
}
}
</script>