Close dialogs programmable
Sometimes you need to close dialogs and don't want to wait for the user's action. For these purposes, dialog instance provides method close
.
import Alert from './Alert.vue'import { createConfirmDialog } from 'vuejs-confirm-dialog'const dialog = createConfirmDialog(Alert)dialog.reveal()setTimeout(() => { dialog.close()}, 3000)
It also doesn't trigger any hooks.
If you need to close all dialog just call dialog.closeAll()
.