How to load (installed) components in Vue Composition API
P粉010967136
P粉010967136 2023-08-28 14:53:31
0
1
419

I'm trying to load vue3-burger-menu, but the documentation is only for the Options API. On the other hand, I'm using the Composition API, but I'm a bit stuck.

The documentation says this:

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 } }

But export defaults doesn't work for me.

So, how do I load slideshows?

P粉010967136
P粉010967136

reply all (1)
P粉151466081

Here is aworking playgroundwithvue3-burger-menuexample.

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

 
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!