visma-meglerfront / sweet-modal-vue

The sweetest library to happen to modals.
Other
757 stars 85 forks source link

Global Installation #92

Closed Lavendar77 closed 4 years ago

Lavendar77 commented 4 years ago

So, I tried installing this in my project, but the global installation from the documentation is wrong.

import SweetModal from 'sweet-modal-vue/plugin.js'
Vue.use(SweetModal)

The above will generate errors after compilation.

Compiles with this import SweetModal from 'sweet-modal-vue/src/plugin.js'

but gives an error when using the component <sweet-modal>This is a message</sweet-modal>

seriousran commented 4 years ago

import VueFullPage from 'vue-fullpage.js' works for me

maparker21 commented 4 years ago

None of what you just put in here is relevant to the documentation. Where in the heck did "VueFullPage" come from? We simply want to include the modal globally as per the instructions provided, but that does't work

Lavendar77 commented 4 years ago

I was wondering that myself. Anyway, has anyone been able to find a solution for the global configuration?

seriousran commented 4 years ago

Try this import SweetModal from 'sweet-modal-vue'

Lavendar77 commented 4 years ago

Nice trick! But it still does not work.

The import works, but Vue.use(SweetModal) gives a compilation error.

Using the component <sweet-modal>This is an alert.</sweet-modal> is also not doing anything, just a normal HTML tag.

Thanks though @seriousmac I guess I am just going to have to settle for another plugin. 👋