I have a custom plugin which basically wraps the Notify plugin with some custom config…
import {
Notify
} from 'quasar'
let defaults = {
color: 'white',
textColor: 'black',
timeout: 2000,
position: 'top'
}
let notifyInstance = (options) => {
if (typeof options !== 'object') {
options = Object.assign({}, defaults, { message: options })
}
let optionsToUse = Object.assign({}, defaults, options)
return Notify.create(optionsToUse)
}
export default ({ Vue }) => {
Vue.prototype.$notify = notifyInstance
}
export {
// for use outside components
notifyInstance as Notify
}