Promise Dialog Component For Vue 3

Description:

Just another Vue 3 dialog component that works as promises.

The dialogs can be opened by calling a function that returns a promise and once the user enters data into the dialog and closes it, the promise resolves with the data the user entered.

Basic Usage:

1. Import and register the promise dialog.

app.use(PromiseDialog);

2. Add the DialogWrapper component to the template.

<template>
  <div id="app">
    <DialogWrapper :transition-attrs="{name: 'dialog'}"/>
    </div>
</template>

3. Open the dialog.

let result = await openDialog(MyDialog, myProps);
// OR
export async function confirm(text: string) {
  return await openDialog(ConfirmDialog, {text});
}
let ok = await confirm("Are you sure ?");

Preview:

Promise Dialog Component For Vue 3

Changelog:

v0.3.4 (04/21/2022)

  • update

Download Details:

Author: rlemaigre

Live Demo: https://rlemaigre.github.io/vue3-promise-dialog/

Download Link: https://github.com/rlemaigre/vue3-promise-dialog/archive/refs/heads/main.zip

Official Website: https://github.com/rlemaigre/vue3-promise-dialog

Install & Download:

You Might Be Interested In:

Tags:

Add Comment