@wiwo/widget-vue2
v1.1.0
Published
This embeds a [Widget Works](https://www.widgetworks.com.au/) Widget inside a [Vue 2](https://v2.vuejs.org/) component or [NuxtJS v2.x](https://nuxtjs.org/) site.
Downloads
3
Readme
@wiwo/widget-vue2
This embeds a Widget Works Widget inside a Vue 2 component or NuxtJS v2.x site.
Installation
Add @wiwo/widget-vue2
to your package.json
:
npm install --save @wiwo/widget-vue2
then follow the examples below to use in your project.
Example: Vue 2
<script>
import { WiwoWidget } from '@wiwo/widget-vue2'
export default Vue.extend({
components: {
WiwoWidget,
},
});
</script>
<template>
<div>
<WiwoWidget licenseId="yourLicenseId" />
</div>
</template>
Example: NuxtJS 2
Register the library with Nuxt:
// nuxt.config.js
buildModules: [
// Use components as Nuxt module
'@wiwo/widget-vue2/nuxt',
]
Render the components in your site:
(The required licenseId
will be provided to you separately)
// /pages/examplepage.vue
<template>
<div>
<WiwoWidget licenseId="yourLicenseId"/>
</div>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
name: 'ExamplePage',
})
</script>