$ npm i egg-msg-flash --save
// {app_root}/config/plugin.js
exports.flash = {
enable: true,
package: 'egg-msg-flash',
};
// {app_root}/config/config.default.js
exports.flash = {
};
see config/config.default.js for more detail.
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
Please open an issue here.