egg-msg-flash-dx

1.0.1 • Public • Published

egg-msg-flash

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-msg-flash --save

Usage

// {app_root}/config/plugin.js
exports.flash = {
  enable: true,
  package: 'egg-msg-flash-dx'
}

Configuration

// {app_root}/config/config.default.js
exports.flash = {}

see config/config.default.js for more detail.

Example

ctx.flash = {
  type: 'success',
  message: {
    some: 'one
  }
}

// or
ctx.flash_success({some: 'one'})
ctx.flash_error()
ctx.flash_info()
ctx.flash_warning()

ctx.request.flash(type, message)

// get flash by
ctx.flash

License

MIT

Dependencies (0)

    Dev Dependencies (8)

    Package Sidebar

    Install

    npm i egg-msg-flash-dx

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    5.31 kB

    Total Files

    6

    Last publish

    Collaborators

    • inspiration520