mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
fix(nimbus-icon): make height equals to size
This commit is contained in:
parent
41ed14fc84
commit
bedc35ca6b
@ -64,11 +64,15 @@ export default {
|
||||
styles () {
|
||||
let style = {}
|
||||
if (this.size) {
|
||||
if (typeof this.size === 'number') style['width'] = this.size + 'px'
|
||||
else if (this.size.endsWith('%') || this.size.endsWith('px')) {
|
||||
if (typeof this.size === 'number') {
|
||||
style['width'] = this.size + 'px'
|
||||
style['height'] = this.size + 'px'
|
||||
} else if (this.size.endsWith('%') || this.size.endsWith('px')) {
|
||||
style['width'] = this.size
|
||||
style['height'] = this.size
|
||||
} else {
|
||||
style['width'] = this.size + 'px'
|
||||
style['height'] = this.size + 'px'
|
||||
}
|
||||
}
|
||||
if (this.color) {
|
||||
|
Loading…
Reference in New Issue
Block a user