Commit bfeab68fc24cb4b6e75abc31f805124e43ad217d
1 parent
a61acfdc
update Button Icon style
Showing
2 changed files
with
13 additions
and
0 deletions
Show diff stats
examples/routers/button.vue
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | + <Button type="primary" icon="ios-information-circle" size="small">Search</Button> | ||
| 4 | + <Button type="primary" icon="ios-information-circle" size="default">Search</Button> | ||
| 5 | + <Button type="primary" icon="ios-information-circle" size="large">Search</Button> | ||
| 6 | + <br><br><br> | ||
| 3 | <Button to="/menu" @click="hc">Open Menu</Button> | 7 | <Button to="/menu" @click="hc">Open Menu</Button> |
| 4 | <Button to="/menu" replace>Open Menu Replace</Button> | 8 | <Button to="/menu" replace>Open Menu Replace</Button> |
| 5 | <Button to="//iviewui.com" target="_blank">Open iView</Button> | 9 | <Button to="//iviewui.com" target="_blank">Open iView</Button> |
src/styles/mixins/button.less
| @@ -139,6 +139,15 @@ | @@ -139,6 +139,15 @@ | ||
| 139 | 139 | ||
| 140 | > .@{css-prefix-iconfont} { | 140 | > .@{css-prefix-iconfont} { |
| 141 | line-height: 1; | 141 | line-height: 1; |
| 142 | + vertical-align: middle; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + &-icon-only > .@{css-prefix-iconfont}{ | ||
| 146 | + vertical-align: baseline; | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + > span{ | ||
| 150 | + vertical-align: middle; | ||
| 142 | } | 151 | } |
| 143 | 152 | ||
| 144 | &, | 153 | &, |