1.0.3 • Published 7 years ago

@gurinder/vue-confirm v1.0.3

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

@gurinder/vue-confirm

Installation & Usage

    <vue-confirm></vue-confirm>
import Confirm from '@gurinder/vue-confirm';
Vue.component('vue-confirm', Confirm);

Vue.prototype.$confirm = (message, confirmText, cancelText) => {
    return new Promise((resolve, reject) => {
        window.Event.fire("confirm", {
            message: message,
            confirmText: confirmText,
            cancelText: cancelText,
            resolve: resolve,
            reject: reject
        })
    })
};
// Use in vue instance
this.$confirm("Are you ready to delete")


// Bind confirm to vue instance to use like confirm("Are you ready to delete")
const VueApp = new Vue({
    el: '#app'
})

window.confirm = message => VueApp.$confirm(message);
1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago