mycurelabs / vue-html-to-paper

Vue mixin for paper printing html elements.
MIT License
298 stars 102 forks source link

πŸš€ refactor: add support for vue version 3 #121

Closed jofftiquez closed 1 year ago

jofftiquez commented 1 year ago

Closes #104

πŸ› fix(vue-html-to-paper.js, index.js): change install function parameter from Vue to app The install function parameter has been changed from Vue to app to improve consistency with the naming conventions. This change ensures that the function is more descriptive and easier to understand.

πŸš€ chore(index.html): upgrade Vue.js to version 3 The Vue.js library has been upgraded to version 3, which provides better performance and new features. The script tag for Vue.js has been updated to use the unpkg.com CDN. The VueHtmlToPaper plugin is now imported using the ES6 module syntax. The Vue instance is now created using the createApp function instead of the Vue constructor. The print and printLandscape methods have been updated to use the this keyword instead of the vm variable.

πŸ› fix(index.html): change method declarations to arrow functions The methods in the Vue component were declared using function expressions instead of arrow functions. This commit changes the method declarations to arrow functions to improve consistency and readability.

πŸ”¨ refactor(index.js): change Vue to app in install function The install function now uses app instead of Vue to improve consistency with the naming conventions. This change does not affect the functionality of the code.