vue-toast-confirm
v1.2.4
Published
A simple dialog plugin that supports both dialog and toast modes, with customizable types and button texts, etc.
Downloads
28
Readme
vue-toast-confirm
A simple dialog plugin that supports both dialog and toast modes, with customizable types and button texts, etc.
this.$toast()
this.$toast({
type: 'error',
msg: 'hahahaha',
duration: 3000
})
this.$side()
this.$side({
type: 'error',
msg: 'hahahaha',
duration: 3000
})
this.$confirm()
this.$confirm({
type: 'error',
title: 'This is title',
content: 'This is the message area!',
confirmText: 'ok',
cancelText: 'no',
confirm: () => {
console.log('Your callback')
this.$close() //If you don't want to close the dialog, you can not use it.
},
cancel: () => {
console.log('Your callback')
this.$close() //If you don't want to close the dialog, you can not use it.
}
})
type | toast | confirm | side ---|---|---|--- (null)| | | error | | | success | | | warnning | | |