1.0.6 • Published 4 years ago
wiredrop-components-library v1.0.6
Refactor components to make it autonomous:
<script>
import Quasar from "quasar";
export default {
beforeCreate() {
window.Vue.use(Quasar);
},
}
</script>
<style lang="stylus">
@import '~quasar-styl'
</style>
Import library to project:
- add dependecy to package.json
- in vue app in main.js add following:
import Vue from './vue'
import components from "wiredrop-components";
Vue.use(components);
!add vue.js to src/ with following content:
import Vue from 'vue';
window.Vue = Vue;
export default Vue;
Usage in templates - library name + component name
Example:
<template>
<div>
<wiredrop-button :label="'Azaza'"></wiredrop-button>
<wiredrop-avatar></wiredrop-avatar>
</div>
</template>