We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I cant access htmlToPaper in vue 3 composition API
async function print() { row.value = rows.value[2]; htmlToPaper("print"); // cant access this }
The text was updated successfully, but these errors were encountered:
@prasetyo-jeanu you can use provide/inject to access it, I've try it
provide/inject
/* your main.js*/ ... app.provide("$htmlToPaper", app.config.globalProperties.$htmlToPaper); ...
<script> /*where you want to print*/ ... const $htmlToPaper = inject("$htmlToPaper"); const printThis = () => { $htmlToPaper("printArea"); }; </script>
It works !
ps: getCurrentInstance is deprecated in latest Vue version
getCurrentInstance
Sorry, something went wrong.
No branches or pull requests
I cant access htmlToPaper in vue 3 composition API
The text was updated successfully, but these errors were encountered: