πŸ”” Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

m-message is a small Vue.js plugin to display toast-like info/success/warning/error/loading messages on the applications.

Notification

Documentation

m-message

A message plugin for vue.

Refer to the implementation of ElementUI message component. Style reference ant-message component

δΈ­ζ–‡ζ–‡ζ‘£

Live Demo

import Message from 'vue-m-message'  Vue.use(Message) // will mount `Vue.prototype.$message`
Vue.use(Message, {name: 'msg'}) // will mount `Vue.prototype.$msg`

Message API

  • Message(options) Show a message
  • Massage.info(msg|options) Info type message
  • Massage.success(msg|options) Success type message
  • Massage.error(msg|options) Error type message
  • Massage.warning(msg|options) Warning type message
  • Massage.loading(msg|options) Loading type message

options

Attribute Description Type Accepted Values Default
options message options object β€” β€”
options.type message type string 'info', 'success', 'error', 'warning', 'loading' info
options.message message content string β€” ''
options.showClose show close button false/true β€” false
options.onClose close callback function function β€” β€”
options.duration message display duration, unit ms, -1 not closed number β€” 3000
options.zIndex z-index number β€” 1010
options.align show position string center η©Ί
options.iconImg Img icon URL string β€” β€”

You May Also Like