四种快速打印彩色文字的工具
Former-commit-id: 35179f73b9531b2525331d0a9815df6fb8d64bde [formerly 09d5ded45c36c36a811e3fe25c34856abc98f092] [formerly 35179f73b9531b2525331d0a9815df6fb8d64bde [formerly 09d5ded45c36c36a811e3fe25c34856abc98f092] [formerly 35179f73b9531b2525331d0a9815df6fb8d64bde [formerly 09d5ded45c36c36a811e3fe25c34856abc98f092] [formerly 09d5ded45c36c36a811e3fe25c34856abc98f092 [formerly 4c018feec65dbbda9026f0c6fc911cf42f290eac [formerly 4cf28c7a2788ee5b985a6707e94fe698782a6efb]]]]] Former-commit-id: 012f63e69f8fdbc177021b43ecb591c0f85841b8 Former-commit-id: 185c9af381750eef11c663b860b29d44d54128fc Former-commit-id: dbed36b0c90d46e0f48ab155986bc798a18ee0e2 [formerly 6e05d568fd23bb4b59179eeeac5722dfcf7bca33] Former-commit-id: 8068579e0c30280518dca37c2176623a522d1094 Former-commit-id: f77e82a8a9c1621d6022eb7687adccb68b00d45d Former-commit-id: 628d1680af0687a1eff97c9b4ca44e271ba13273 Former-commit-id: d962816743d7f8518e5a6258261ee456fe2aa5ac Former-commit-id: 14ac0e88b6525cb206a3bc7e1431006e64f5a9ec
This commit is contained in:
@@ -116,10 +116,31 @@ util.log.colorful = function (textArr) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 打印 primary 样式的文字
|
||||||
|
*/
|
||||||
|
util.log.primary = function (text) {
|
||||||
|
util.log.colorful([{ text, type: 'primary' }])
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 打印 success 样式的文字
|
||||||
|
*/
|
||||||
|
util.log.success = function (text) {
|
||||||
|
util.log.colorful([{ text, type: 'success' }])
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 打印 warning 样式的文字
|
||||||
|
*/
|
||||||
|
util.log.warning = function (text) {
|
||||||
|
util.log.colorful([{ text, type: 'warning' }])
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 打印 danger 样式的文字
|
* @description 打印 danger 样式的文字
|
||||||
*/
|
*/
|
||||||
util.log.error = function (text) {
|
util.log.danger = function (text) {
|
||||||
util.log.colorful([{ text, type: 'danger' }])
|
util.log.colorful([{ text, type: 'danger' }])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user