How to load (installed) components in Vue Composition API
P粉010967136
2023-08-28 14:53:31
<p>I'm trying to load <code>vue3-burger-menu</code>, but the documentation is only for the <code>Options API</code>. On the other hand, I'm using the <code>Composition API</code>, but I'm a bit stuck. </p>
<p>The documentation says this:</p>
<pre class="brush:php;toolbar:false;">import { Slide } from 'vue3-burger-menu' // import the CSS transitions you wish to use, in this case we are using `Slide`
export default {
components: {
Slide // Register your component
}
}</pre>
<p>But <code>export defaults</code> doesn't work for me. </p>
<p>So, how do I load <code>slideshows</code>? </p>
Here is a working playground with vue3-burger-menu example.
https://stackblitz.com/edit/vue-wwkpny ?file=src/App.vue
You must put the code in the question into a custom component.
like this:
MyMenu.vue
and use it in your application:
App.vue