Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
 
 
 
 
 
 

22 lines
342 B

  1. <template>
  2. <div ref="doc" v-if="estimate">{{estimate}}
  3. <button @click="makePDF">Generate</button>
  4. </div>
  5. </template>
  6. <script setup>
  7. import { ref } from "vue"
  8. import html2pdf from "html2pdf.js";
  9. const doc = ref(null)
  10. const props = defineProps(['token', 'estimate'])
  11. function makePDF() {
  12. html2pdf(doc.value)
  13. }
  14. </script>
  15. <style>
  16. </style>