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:
betavs
2025-05-01 18:23:23 +08:00
committed by GitHub
parent 0eb0eae70b
commit ec6e0c51a5
2 changed files with 6 additions and 2 deletions

View File

@@ -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 = () => {

View File

@@ -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 = () => {