mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-23 11:59:34 +08:00
fix(components): [tabs] bar width is error when only one bar (#17016)
This commit is contained in:
parent
1faeb5f314
commit
92204e97f1
@ -55,11 +55,9 @@ const getBarStyle = (): CSSProperties => {
|
||||
const tabStyles = window.getComputedStyle($el)
|
||||
|
||||
if (sizeName === 'width') {
|
||||
if (props.tabs.length > 1) {
|
||||
tabSize -=
|
||||
Number.parseFloat(tabStyles.paddingLeft) +
|
||||
Number.parseFloat(tabStyles.paddingRight)
|
||||
}
|
||||
tabSize -=
|
||||
Number.parseFloat(tabStyles.paddingLeft) +
|
||||
Number.parseFloat(tabStyles.paddingRight)
|
||||
offset += Number.parseFloat(tabStyles.paddingLeft)
|
||||
}
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user