this.$notify.default('Message')
this.$notify.success({
position: 'bottom right',
title: 'Good job!',
msg: 'Very nicely done',
timeout: 0
})
this.$notify.default
this.$notify.warning
this.$notify.error
this.$notify.success
this.$notify.info
import { notify } from 'vuejs-notify'
notify.default({})
Vue.use(VueNotify, {
max: 100,
timeout: 0,
position: 'bottom center',
transition: 450,
marginY: 10,
marginX: 20,
opacity: 0.95,
title: 'Title',
msg: 'Message',
closeOnClick: true,
touch: false,
treshold: 60,
component: MyVueComponent,
componentProps: {},
classes: ['my-class'],
styles: {
minWidth: null,
maxWidth: 'calc(100% - 40px)',
width: 250
},
appear: {
'top left':'NotifyFromLeft',
'top right':'NotifyFromRight',
'top center':'NotifyFromTop',
'bottom left':'NotifyFromLeft',
'bottom right':'NotifyFromRight',
'bottom center':'NotifyFromBottom',
},
buttons: [
{
html: '<i class="material-icons">face</i>',
text: 'Ok',
click(notify){ notify.close(true) },
classes: 'my-button-class'
}
],
presets: {
error: {
title: 'Error!',
classes: ['my-error']
},
myPreset: {
classes: ['my-preset'],
position: 'bottom right',
msg: 'My preset'
}
},
events: {
'before-close': [
function(notify) {
notify.preventClose = true
}
],
'destroyed': [],
'mounted': [],
'click': []
}
})
this.$notify.default({
msg: 'Check console',
events: {
mounted: [ function(notify){ console.log(notify) } ]
}
})
this.$notify.default('Check console').then( notify => {
console.log(notify)
notify.on('destroyed', function(notify){
console.log('Destroyed')
})
})