An open API service indexing awesome lists of open source software.

https://github.com/c4software/vuetify-vuejs-messagedialog

Vuetify VueJS message dialog Component
https://github.com/c4software/vuetify-vuejs-messagedialog

Last synced: 5 days ago
JSON representation

Vuetify VueJS message dialog Component

Awesome Lists containing this project

README

          

# vuetify-vuejs-messagedialog

[![npm version](https://badge.fury.io/js/vuetify-vuejs-messagedialog.svg)](https://www.npmjs.com/package/vuetify-vuejs-messagedialog)

Vuetify VueJS message dialog Component with Promise support

## Installation

```sh
npm install vuetify-vuejs-messagedialog --save
```

## Quick Promise Usage

```javascript
this.$vuetifyMessageDialog.open("Example Title", "Example Content", "OK", "green").then(state => {
console.log(state);
});
```

## Detailed Promise Usage

Enable the plugin in your Project

```javascript

import Vue from 'vue';
import messageDialog from 'vuetify-vuejs-messagedialog';
Vue.use(messageDialog);

// …

```

Use the plugin in any Vue file :

```vue

export default{
name: "…",
// …
methods: {
sample: function(){
this.$vuetifyMessageDialog.open("Example Title", "Example Content", "OK", "green").then(state => {
console.log(state);
});
}
}
}

```

## Component Usage

```vue

import Vue from 'vue';
import messageDialog from 'vuetify-vuejs-messagedialog';
Vue.use(messageDialog);

export default {
name: 'example',
data(){
return {
"showConfirm": true
}
}
}

```