Cascader: fix #21395

pull/21800/head
yuming.shao 2022-04-14 15:57:15 +08:00
parent 2f4f6962c6
commit e2b30b78eb
2 changed files with 7 additions and 1 deletions

View File

@ -641,8 +641,13 @@ export default {
} }
if (tags) { if (tags) {
const reviseSize = {
mini: 0,
small: 2
};
const offsetHeight = Math.round(tags.getBoundingClientRect().height); const offsetHeight = Math.round(tags.getBoundingClientRect().height);
const height = Math.max(offsetHeight + 6, inputInitialHeight) + 'px'; const reviseSizeNum = ['small', 'mini'].indexOf(this.realSize) > -1 ? reviseSize[this.realSize] : 6;
const height = Math.max(offsetHeight + reviseSizeNum, inputInitialHeight) + 'px';
inputInner.style.height = height; inputInner.style.height = height;
if (this.dropDownVisible) { if (this.dropDownVisible) {
this.updatePopper(); this.updatePopper();

View File

@ -88,6 +88,7 @@
transform: translateY(-50%); transform: translateY(-50%);
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center;
line-height: normal; line-height: normal;
text-align: left; text-align: left;
box-sizing: border-box; box-sizing: border-box;