File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 4
4
</div >
5
5
</template >
6
6
7
+ <style lang="css">
8
+ .vue-avatar--wrapper {
9
+ display : flex ;
10
+ align-items : center ;
11
+ justify-content : center ;
12
+ }
13
+ </style >
14
+
7
15
<script >
8
16
export default {
9
17
name: ' avatar' ,
@@ -72,9 +80,7 @@ export default {
72
80
const style = {
73
81
width: ` ${ this .size } px` ,
74
82
height: ` ${ this .size } px` ,
75
- borderRadius: this .rounded ? ' 50%' : 0 ,
76
- textAlign: ' center' ,
77
- verticalAlign: ' middle'
83
+ borderRadius: this .rounded ? ' 50%' : 0
78
84
}
79
85
80
86
const imgBackgroundAndFontStyle = {
@@ -85,8 +91,8 @@ export default {
85
91
backgroundColor: this .background ,
86
92
font: Math .floor (this .size / 2.5 ) + ' px/100px Helvetica, Arial, sans-serif' ,
87
93
fontWeight: ' bold' ,
88
- color : this .fontColor ,
89
- lineHeight : ` ${ ( this .size + Math . floor ( this . size / 20 )) } px `
94
+ lineHeight : ` ${ ( this .size + Math . floor ( this . size / 20 )) } px ` ,
95
+ color : this .fontColor
90
96
}
91
97
92
98
const backgroundAndFontStyle = (this .isImage )
You can’t perform that action at this time.
0 commit comments