思路:focus时获取到select框的宽度,复制个一个变量,将这个宽度绑定到option上 代码: <el-selectv-model="item.text"@focus="setOptionWidth"><el-option:style="{width:selectOptionWidth}"v-for="(selectItem, selectIndex) in arr":key="selectIndex":label="selectItem.name":value="selectItem.name"></...
一、icon下拉框的多列选择: 二、常规、通用下拉框的多列选择: 【注】第二种常规、通用下拉框的多列选择,是在第一种的前端代码上删除几行代码就行(把icon显示标签删去),所以下面着重介绍第一种icon下拉框的多列选择。 思路 不使用下拉框标签<el-option>来做,使用elementUI提供的popover...