fix(components): [select] multiple init height (#8423)

This commit is contained in:
Xc
2022-06-23 01:34:05 +08:00
committed by GitHub
parent 65d198f0a0
commit 2b71f2c561

View File

@@ -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