1.2.0 • Published 3 years ago

shapla-confirm-dialog v1.2.0

Weekly downloads
10
License
MIT
Repository
github
Last release
3 years ago

shapla-confirm-dialog

A simple confirm dialog/modal based on modal component for Vue.

Table of contents

Installation

npm install --save shapla-confirm-dialog

Usage

Use plugins by calling the Vue.use() global method. This has to be done before you start your app by calling new Vue():

Note

Use only one 'DialogContainer' component in the app.

import {Dialog, DialogContainer} from 'shapla-confirm-dialog'

Vue.use(Dialog);

new Vue({
    el: '#app',
    components:{DialogContainer},
    methods: {
        confirm() {
            this.$dialog.confirm({
                message: 'Are you sure to delete this item permanently?',
                cancelButton: 'Cancel',
                confirmButton: 'Yes'
            }).then(confirmed => {
                console.log('Do somethings', confirmed);
            });
        }
    }
});
<button @click="confirm">Confirm</button>
<dialog-container/>
1.2.0

3 years ago

1.1.0

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago