vue-to-any
v0.3.1
Published
Render Vue components to any format (pdf, image, canvas, or even as html string)
Downloads
13
Maintainers
Readme
Vue To Any
Overview
Vue To Any is a simple Vue.js component that allows you to render components as image, PDF (coming soon) or canvas.
Installation
npm install vue-to-any
Usage
The Renderer
component have no props, only a render
method.
For Api reference, take a look at dist build.
Example
Full example with Nuxt (work exactly the same with Vue 3 except for auto imports functions)
components/A.vue
<script setup lang="ts">
const props = defineProps<{ msg: string }>()
</script>
<template>
<div>
A {{ props.msg }}
</div>
</template>
components/B.vue
<template>
<div>
B
</div>
</template>
App.vue
Contributing
Feel free to contribute to the project, I will be happy to review your PR.
- Fork the repository
- Create a branch:
git checkout -b feature/your-feature
. - Make your changes and commit them:
git commit -m 'feat: add an awesome feature'
. (please follow conventional commits) - Push to your fork:
git push origin feature/your-feature
. - Create the pull request.
post-scriptum:
- I personally use nix to manage my development environment, feel free to use anything you want.
- That is my first open-source project, I will be happy to receive feedbacks.
License
MIT