From f516cb4e7b13a3e484c4024c805ba66bafef6bf9 Mon Sep 17 00:00:00 2001 From: Shigma <33423008+Shigma@users.noreply.github.com> Date: Thu, 14 Mar 2019 00:46:12 +0800 Subject: [PATCH] refactor($theme-default): badge component (#1439) --- .../theme-default/global-components/Badge.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/@vuepress/theme-default/global-components/Badge.vue b/packages/@vuepress/theme-default/global-components/Badge.vue index 0403cbdf21..8255293b56 100644 --- a/packages/@vuepress/theme-default/global-components/Badge.vue +++ b/packages/@vuepress/theme-default/global-components/Badge.vue @@ -14,7 +14,10 @@ export default { }, render (h, { props, slots }) { return h('span', { - class: ['badge', props.type, props.vertical] + class: ['badge', props.type], + style: { + verticalAlign: props.vertical + } }, props.text || slots().default) } } @@ -29,16 +32,13 @@ export default { border-radius 3px padding 0 6px color white - margin-right 5px background-color #42b983 - &.middle - vertical-align middle - &.top - vertical-align top &.tip, &.green background-color #42b983 &.error background-color #DA5961 //#f66 &.warning, &.warn, &.yellow background-color darken(#ffe564, 35%) + & + & + margin-left 5px