Skip to content

Latest commit

 

History

History
25 lines (24 loc) · 739 Bytes

README.md

File metadata and controls

25 lines (24 loc) · 739 Bytes

vue-confirm

confirm popup global component

usage:
clone this repo to your vue-cli project
and then in your main.js

import Confirm from './xxx/confirm'
Vue.use(Confirm)

in your vue components

/**
 * this.$confirm(obj[, callback1, callback2])
 * if you don't pass obj.cancelBtn, then there will be only submit button
 */
this.$confirm({
    title: 'this is title',
    content: 'contents here',
    confirmBtn: 'submit text',
    cancelBtn: 'cancel text'
}, callbackSubmit, callbackCancel)

img-1 img-2