Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

How to use Simplert with CDN #57

Open
Laranjeiras opened this issue Mar 9, 2019 · 2 comments
Open

How to use Simplert with CDN #57

Laranjeiras opened this issue Mar 9, 2019 · 2 comments

Comments

@Laranjeiras
Copy link

I I am trying to use by CDN, but i receive erro.

<script src="https://unpkg.com/vue2-simplert@0.5.1/dist/simplert.bundle.js"></script>

<script>
Vue.use(Simplert);
new Vue({
            el: '#app',  
            mounted() {
                let obj = {
                    title: 'Alert Title',
                    message: 'Alert Message',
                    type: 'info'
                }
                this.$refs.simplert.openSimplert(obj)
            }
});  
</script>

Error message in console

[Vue warn]: Error in mounted hook: "TypeError: Cannot read property 'openSimplert' of undefined"

@paulodiogo
Copy link

paulodiogo commented May 14, 2019

You need to add <simplert :useRadius="false" :useIcon="false" ref="simplert"></simplert> inside your app.

Check this: https://codepen.io/paulodiogo/pen/VOPjMN?editors=1010

@amchconsult
Copy link

why is it not working with CDN on 1.1.0?
can you add global? example please.

Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants