Closed tungnk1993 closed 5 years ago
I'm having the same exact problem...
You do not need to define ToggleButton component,
{ ToggleButton }
Plugin does it for you.
After use
ing plugin you can just do:
<template>
<div id="app">
<toggle-button :value="false" color="#82C7EB" :sync="true" :labels="true"/>
</div>
</template>
<script>
export default {
name: 'app'
}
</script>
It kind of defines it globally. And when you try to import it, you actually import a plugin, not a component. This way you replace global definition of ToggleButton: ToggleButtonComponent
with ToggleButton: ToggleButtonPlugin
. And then vue tries to render plugin and obviously fails.
This fixes it, thank you!
Sorry I've read the other closed issues, but I still can't figure it out
App.vue
main.js
Have tried several variations but none of them seem to be working. Appreciate if you could help give me a basic sample. I'm very new to VueJS