Former-commit-id: fc65cf0bd59f74c49907a522afa9e361e146541d [formerly fc65cf0bd59f74c49907a522afa9e361e146541d [formerly fc65cf0bd59f74c49907a522afa9e361e146541d [formerly fc65cf0bd59f74c49907a522afa9e361e146541d [formerly b498093f53a934dc50b75119539c83487e113f54 [formerly 1939f3aa2584edd9b039e99f12f2c7da2982ae16]]]]] Former-commit-id: 15bb624d48dd47ee69b0b14bd8f0030568f66e35 Former-commit-id: 59df8c756c782130b28a9f50c33745b213598432 Former-commit-id: ebdf0a259d07c99ef06a320063abc890b1e47c24 [formerly dc5b000425cf19943862055f6bcc1e5f5b50baea] Former-commit-id: 1fe49134e36d5c4867af6fab32bb91853895665f Former-commit-id: e23ed3d4dd3c917c0c932a2c826b721fed4b8225 Former-commit-id: 2f99de3613031f448756f57458220348b16f4c86 Former-commit-id: a58fe5e45946e35c32985808d7e729cfe638f050 Former-commit-id: ddf471f9aeb24ce8d38a0c8af5716c9f6beabdca
970 B
970 B
控制台打印优化
使用 $log 可以在控制台输出美观的日志信息
胶囊
此方法打印一行“胶囊”样式的信息,即上图前四条
参数:
$log.capsule( 左侧文字, 右侧文字, 主题样式 )
示例:
this.$log.capsule('title', 'success', 'success')
彩色文字
此方法可以随意组合打印文字的颜色顺序
this.$log.colorful([
{ text: 'H', type: 'default' },
{ text: 'e', type: 'primary' },
{ text: 'l', type: 'success' },
{ text: 'l', type: 'warning' },
{ text: 'o', type: 'danger' }
])
上面的代码效果为效果图中第五行
快速方法
- $log.default
- $log.primary
- $log.success
- $log.warning
- $log.danger
示例:
this.$log.primary('primary style')
这五个快速方法的效果为效果图中第六至十行