egg-msg-flash-panda
v1.0.0
Published
[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down
Downloads
2
Readme
egg-msg-flash
Install
$ npm i egg-msg-flash --save
Usage
// {app_root}/config/plugin.js
exports.flash = {
enable: true,
package: 'egg-msg-flash',
};
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_succeses({some: 'one'});
ctx.flash_error();
ctx.flash_info();
ctx.flash_wanring();
ctx.request.flash(type, message);
// get flash by
ctx.flash
Questions & Suggestions
Please open an issue here.