log
Former-commit-id: bab2bb15589539f4140f4582da09eb0069b873b9 [formerly bab2bb15589539f4140f4582da09eb0069b873b9 [formerly bab2bb15589539f4140f4582da09eb0069b873b9 [formerly bab2bb15589539f4140f4582da09eb0069b873b9 [formerly 8974b2fc64f21f240a768ff8657e83556de421d9 [formerly 7b4e1a2a70627488f945eba98d288a79a0a243cb]]]]] Former-commit-id: 7620f9c9ddad400fbe6fc9042ca9690ad159093f Former-commit-id: 4d857c13ead50fb0bd6869544b1c3dcdebd18874 Former-commit-id: aa6de588166ddb8fb649b072122f8b4ff2f7b6fa [formerly e2fbfc36ab2f2c86f6e12778c00c381d7f38db33] Former-commit-id: 07cf29d93eba7745d9c8736c72582f1771b537a8 Former-commit-id: 09fa896073d1b3ebf06ef568f995f6a25e689974 Former-commit-id: 9823ce618d492cb49fb9bf35e4e35733b5580de7 Former-commit-id: b67e2c71b4b7d29f3a40c11f893db0df1a456642 Former-commit-id: 305b824f25acf280a145e9250ac376c17bb2589c
This commit is contained in:
@@ -37,11 +37,18 @@ log.capsule = function (title, info, type = 'primary') {
|
||||
*/
|
||||
log.colorful = function (textArr) {
|
||||
console.log(
|
||||
`%c ${textArr.map(t => t.text).join(' %c ')}`,
|
||||
`%c ${textArr.map(t => t.text || '').join(' %c ')}`,
|
||||
...textArr.map(t => `color: ${typeColor(t.type)};`)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 打印 default 样式的文字
|
||||
*/
|
||||
log.default = function (text) {
|
||||
log.colorful([{ text }])
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 打印 primary 样式的文字
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,7 @@ export default {
|
||||
})
|
||||
// 显示在控制台
|
||||
if (show && process.env.NODE_ENV === 'development') {
|
||||
console.log(info)
|
||||
util.log.default(info)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user