Closed cobategit closed 1 year ago
i find how to access $htmlToPaper in script setup,
first me declare in app.js app.provide("nameProvide", app.config.globalProperties.$htmlToPaper);
app.provide("nameProvide", app.config.globalProperties.$htmlToPaper);
and in your file want to generate pdf import { inject } from "vue"; const globalProvide = inject("nameProvide");
import { inject } from "vue";
const globalProvide = inject("nameProvide");
How are you using it after you inject it?
i find how to access $htmlToPaper in script setup,
first me declare in app.js
app.provide("nameProvide", app.config.globalProperties.$htmlToPaper);
and in your file want to generate pdf
import { inject } from "vue";
const globalProvide = inject("nameProvide");