From c2ffca2f14b564362f9acd9695e0766cd5d38668 Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Thu, 2 Aug 2018 14:48:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9B=E7=A7=8D=E5=BF=AB=E9=80=9F=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E5=BD=A9=E8=89=B2=E6=96=87=E5=AD=97=E7=9A=84=E5=B7=A5?= =?UTF-8?q?=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/libs/util.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/libs/util.js b/src/libs/util.js index bac289d6..74ac78b7 100644 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -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 样式的文字 */ -util.log.error = function (text) { +util.log.danger = function (text) { util.log.colorful([{ text, type: 'danger' }]) }