-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to display vue components withing swal #2
Comments
You're going to have to take this example to do this. import Vue from 'vue'
import UserComp from '/path/to/user-compoennt'
let UserCompInstance = new (Vue.extend(UserComp))
export default {
methods: {
showUser() {
this.$swal({
content: UserCompInstance.$mount().$el
})
}
}
} |
@anteriovieira thanks for your reply. I tried your solution but when I use a plugin in the loaded component -such as vue-i18ns- it throws an error.
Any clue? |
Can you reproduce this int the codesandbox? |
tried to get this working, I don't receive any errors when using your example @anteriovieira, however the body is still blank This is my code: SwalContent.vue
Home.vue
any idea what I'm doing wrong? |
hrmm.. it seems that your package just doesn't support the if you replace the above example by change |
I have a component for modifying user information, sway
if i do something like
this.$swal({ title: 'Edit user', html: '<user-component></user-component>' })
The body turns out to be blank
The text was updated successfully, but these errors were encountered: