Non-Production Machines

    shapla-confirm-dialog

    1.2.0 • Public • Published

    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/>

    Install

    npm i shapla-confirm-dialog

    DownloadsWeekly Downloads

    3

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    115 kB

    Total Files

    12

    Last publish

    Collaborators

    • sayful