1.0.82 • Published 2 years ago

@prostreyd/vue-dialog v1.0.82

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Vue dialog modal box (alert, prompt, confirm)

A dialog for alerts, prompts, and confirms that is lightweight and based on promises with Typescript support (only supports vue 2).

Install

$ npm install --save @prostreyd/vue-dialog

Quick Start Usage

//in main.ts or main.js
import Vue from 'vue'
import VuejsDialogBox from "@prostreyd/vue-dialog";
import "@prostreyd/vue-dialog/dist/style.css";

Vue.use(VuejsDialogBox);

Alert

await this.$dialogBox.title({
  // bottom default values
  title: "This is alert", // String. Title of dialog
  okText: "Ok" // String. Confirm button text
});
//...your code

Prompt

const text = await this.$dialogBox.prompt({
  // bottom default values
  title: "Write something", // String. Title of dialog.
  okText: "Yes", // String. Confirm button text.
  cancelText: "No", // String. Cancel button text.
  placeholder: "", // String. Input placeholder text.
  allowConfirmEmptyString: false, // Boolean. Is it possible to click on the confirm button if the text is empty. 
});

//...your code

Confirm

const ok = await this.$dialogBox.confirm({
  // bottom default values
  title: "Are you sure?", // String. Title of dialog.
  okText: "Yes", // String. Confirm button text.
  cancelText: "No", // String. Cancel button text.
});

if (ok) {
  //...your code
}
1.0.82

2 years ago

1.0.81

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago