Skip to content

Commit

Permalink
fix(components): [select] multiple init height (#8423)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxch committed Jun 22, 2022
1 parent 65d198f commit 2b71f2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/select/src/useSelect.ts
Expand Up @@ -341,14 +341,14 @@ export const useSelect = (props, states: States, ctx) => {
const sizeInMap = getComponentSize(selectSize.value || elForm.size)
// it's an inner input so reduce it by 2px.
input.style.height = `${
states.selected.length === 0
(states.selected.length === 0
? sizeInMap
: Math.max(
_tags
? _tags.clientHeight + (_tags.clientHeight > sizeInMap ? 6 : 0)
: 0,
sizeInMap
) - 2
)) - 2
}px`

states.tagInMultiLine = Number.parseFloat(input.style.height) >= sizeInMap
Expand Down

0 comments on commit 2b71f2c

Please sign in to comment.