Install & Download:
npm install vue-konva konva --saveDescription:
Vue Konva is a JavaScript library for drawing complex canvas graphics using Vue 2+.
Usage:
Install and import the vue-konva into your project.
import Vue from 'vue'; import VueKonva from 'vue-konva'
Create a new app.
Vue.use(VueKonva)
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
render: function(h){ return h(App)}
})The example app.
<template>
<div id="app">
<Stars />
</div>
</template>
<script>
import Stars from "./components/Stars";
export default {
name: "app",
components: {
Stars
}
};
</script>Preview: