1.0.1 • Published 5 years ago
beck-msg-flash v1.0.1
beck-msg-flash
Install
$ npm i beck-msg-flash --save
Usage
// {app_root}/config/plugin.js
exports.msgFlash = {
enable: true,
package: 'beck-msg-flash',
};
Configuration
// {app_root}/config/config.default.js
exports.msgFlash = {
};
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
Questions & Suggestions
Please open an issue here.