mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
fix(components): [select] correct update selectSize (#11973)
* chore: 尝试恢复pr * chore: update * chore: update
This commit is contained in:
parent
105d79b0d9
commit
4c93b47a05
@ -2048,6 +2048,12 @@ describe('Select', () => {
|
||||
},
|
||||
})
|
||||
|
||||
Object.defineProperty(inputEl, 'clientHeight', {
|
||||
get() {
|
||||
return Number.parseInt(getComputedStyle(inputEl).height)
|
||||
},
|
||||
})
|
||||
|
||||
for (const size in sizeMap) {
|
||||
await wrapper.setProps({
|
||||
size,
|
||||
|
@ -383,7 +383,9 @@ export const useSelect = (props, states: States, ctx) => {
|
||||
const gotSize = getComponentSize(selectSize.value || form?.size)
|
||||
|
||||
const sizeInMap =
|
||||
gotSize === originClientHeight || originClientHeight <= 0
|
||||
selectSize.value ||
|
||||
gotSize === originClientHeight ||
|
||||
originClientHeight <= 0
|
||||
? gotSize
|
||||
: originClientHeight
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user