提交 f516cb4e 编写于 作者: S Shigma 提交者: ULIVZ

refactor($theme-default): badge component (#1439)

上级 9c354bee
...@@ -14,7 +14,10 @@ export default { ...@@ -14,7 +14,10 @@ export default {
}, },
render (h, { props, slots }) { render (h, { props, slots }) {
return h('span', { return h('span', {
class: ['badge', props.type, props.vertical] class: ['badge', props.type],
style: {
verticalAlign: props.vertical
}
}, props.text || slots().default) }, props.text || slots().default)
} }
} }
...@@ -29,16 +32,13 @@ export default { ...@@ -29,16 +32,13 @@ export default {
border-radius 3px border-radius 3px
padding 0 6px padding 0 6px
color white color white
margin-right 5px
background-color #42b983 background-color #42b983
&.middle
vertical-align middle
&.top
vertical-align top
&.tip, &.green &.tip, &.green
background-color #42b983 background-color #42b983
&.error &.error
background-color #DA5961 //#f66 background-color #DA5961 //#f66
&.warning, &.warn, &.yellow &.warning, &.warn, &.yellow
background-color darken(#ffe564, 35%) background-color darken(#ffe564, 35%)
& + &
margin-left 5px
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册