mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-26 04:27:26 +08:00
fix(components): [segmented] fix label item width render (#21379)
* fix(components): [segmented] fix label item width render * Update segmented.vue * chore: use zhiaxiaotong solution * Update segmented.vue * chore: foramt Co-authored-by: zhixiaotong <947803089@qq.com> --------- Co-authored-by: 知晓同丶 <zhixiaotong.me@qq.com>
This commit is contained in:
@ -130,13 +130,12 @@ const updateSelect = () => {
|
||||
state.focusVisible = false
|
||||
return
|
||||
}
|
||||
const rect = selectedItem.getBoundingClientRect()
|
||||
state.isInit = true
|
||||
if (props.direction === 'vertical') {
|
||||
state.height = rect.height
|
||||
state.height = selectedItem.offsetHeight
|
||||
state.translateY = selectedItem.offsetTop
|
||||
} else {
|
||||
state.width = rect.width
|
||||
state.width = selectedItem.offsetWidth
|
||||
state.translateX = selectedItem.offsetLeft
|
||||
}
|
||||
try {
|
||||
|
Reference in New Issue
Block a user