// console样式
const __getStyle = bgColor => {
return [
`background:${bgColor} ; height: 18px;line-height: 18px; padding: 1px; border-radius: 3px 0 0 3px; color: #fff`,
"background:#169fe6 ; height: 18px;line-height: 18px; padding: 1px; border-radius: 0 3px 3px 0; color: #fff"
];
};
const CONSOLE_INFO = "Info";
const CONSOLE_WARN = "Warn";
const CONSOLE_ERROR = "Error";
const CONSOLE_STYLE = {
[CONSOLE_INFO]: __getStyle("#333"),
[CONSOLE_WARN]: __getStyle("#f90"),
[CONSOLE_ERROR]: __getStyle("#f00")
};
const OUT_LOG = (msg, type) => {
console.log(`%c GridManager ${type} %c ${msg} `, ...CONSOLE_STYLE[type]);
};