HTML:
<el-select v-model="" multiple clearable ref="choose" @focus="handleTask" class="applySelect">
<el-option v-for="v in list" :key="v.value" :label="v.label" :value="v.value">
<el-popover v-if="v.label.length >= 40" placement="top-start" width="400"
trigger="hover">
<p>{{ v.label }}</p>
<span slot="reference">{{ v.label.slice(0,37) + '...' }}</span>
</el-popover>
<span v-else>{{ v.label }}</span>
</el-option>
</el-select>
CSS:
去掉小箭头 ::v-deep .applySelect .el-icon-arrow-up:before { content: '' }
SCRIPT:
去掉下拉 handleTask() { this.$refs['chooseName'].blur }
去掉el-select中的小箭头+option太长省略...
于 2022-11-07 09:17:40 首次发布