Godofbrowser / vuejs-dialog

A lightweight, promise based alert, prompt and confirm dialog
351 stars 109 forks source link

"export 'default' (imported as 'VuejsDialog') was not found in 'vuejs-dialog' #89

Closed amym-li closed 1 month ago

amym-li commented 1 month ago

Hi, I installed version 2.0.0-rc.0 but when I try to import it like in the documentation:

import VuejsDialog from 'vuejs-dialog';

I get a compiler warning:

"export 'default' (imported as 'VuejsDialog') was not found in 'vuejs-dialog'

The warning goes away if I import the module like this instead:

import * as VuejsDialog from 'vuejs-dialog';
Godofbrowser commented 1 month ago

Hello @amym-li , Thanks for reporting this. The release candidate is a bit unstable at the moment and the API's are changing. You can use it this way:

import {PromiseDialog as VuejsDialog} from "vuejs-dialog"; then,

app.use(VuejsDialog, {
    message: {
        title: 'Quick one',
        body: 'Please confirm that you wish to proceed'
    }
})

or: import {PromiseDialog} from "vuejs-dialog";

app.use(PromiseDialog, {
    message: {
        title: 'Quick one',
        body: 'Please confirm that you wish to proceed'
    }
})

while I will also release a patch to export PromiseDialog as the default as well.