1、多选时候可以全部显示出来

2、选完后就收起一行显示了 ,多余的不在显示

3、样式方法如下

.multipleAction .antselectselectionmultiple{

  width: 200px;

}

.multipleAction .antselectselectionmultiple .antselectselection__rendered {

overflow: hidden;

}

.multipleAction .antselectselection–multiple .ant-selectselection__rendered ul {

display: flex;

flexwrap: nowrap;

overflow: hidden;

float: left;

}

.multipleAction .ant-selectselection–multiple .ant-selectselection__choice {

float: none;

overflow: visible;

}

.multipleAction .ant-select-selectionmultiple .ant-select-searchinline {

float: none;

position: absolute;

}

.multipleAction .ant-select-selectionmultiple {

maxheight: 32px;

overflow: hidden;

}

 动态class名称设置获取焦点和失去焦点就可以实现这个功能了呦!

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注