mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [select] update selection width calculation (#20615)
* fix(components): [select] update selection width calculation * fix(components): [select-v2] update selection width calculation
This commit is contained in:
@@ -533,7 +533,9 @@ const useSelect = (props: ISelectV2Props, emit: SelectEmitFn) => {
|
||||
}
|
||||
|
||||
const resetSelectionWidth = () => {
|
||||
states.selectionWidth = selectionRef.value!.getBoundingClientRect().width
|
||||
states.selectionWidth = Number.parseFloat(
|
||||
window.getComputedStyle(selectionRef.value!).width
|
||||
)
|
||||
}
|
||||
|
||||
const resetCollapseItemWidth = () => {
|
||||
|
||||
@@ -454,7 +454,9 @@ export const useSelect = (props: ISelectProps, emit: SelectEmits) => {
|
||||
}
|
||||
|
||||
const resetSelectionWidth = () => {
|
||||
states.selectionWidth = selectionRef.value!.getBoundingClientRect().width
|
||||
states.selectionWidth = Number.parseFloat(
|
||||
window.getComputedStyle(selectionRef.value!).width
|
||||
)
|
||||
}
|
||||
|
||||
const resetCollapseItemWidth = () => {
|
||||
|
||||
Reference in New Issue
Block a user