vue-js-modal icon indicating copy to clipboard operation
vue-js-modal copied to clipboard

TypeError: Cannot read properties of undefined (reading 'show')

Open vesnindev opened this issue 2 years ago • 2 comments

Problem:

Hello.

I get error: TypeError: Cannot read properties of undefined (reading 'show')

Version:

Example & screenshots:

import VModal from 'vue-js-modal'; Vue.use(VModal, { dialog: true, componentName: "foo-modal" });

this.$modal.show('dialog', { title: 'В корзине!', text: 'Товар добавлен в корзину покупок!', buttons: [ { title: '<i class="fas fa-thumbs-up"></i> Продолжить покупки', handler: () => { this.$modal.hide('dialog') } }, { title: '<i class="fas fa-shopping-cart"></i> Перейти в корзину', handler: () => { window.location.href = response.data.cart.cartUrl; } }, // { // title: 'Repost', // handler: () => { // alert('Repost action') // } // } ] })

I have checked stackoverflow for solutions and 100% sure that this issue is not not related to my code.

vesnindev avatar Feb 06 '23 15:02 vesnindev

@vesnindev Have you any solution for this?

akbariandev avatar Jun 01 '23 14:06 akbariandev

@vesnindevУ вас есть какое-нибудь решение для этого?

I use sweetalert2

vesnindev avatar Jun 08 '23 13:06 vesnindev