赞
踩
this.$refs.mySelect.addEventListener('mouseenter', function () {
this.querySelector('.selectel .el-select-dropdown').style.display = 'block'
})
this.$refs.mySelect.addEventListener('mouseleave', function () {
this.querySelector('.selectel .el-select-dropdown').style.display = 'none'
})
<div ref="mySelect">
<el-select
class="selectel"
style="float: right"
v-model="value"
placeholder="请选择"
@change="handlechange"
>
<el-option
v-for="item in cities"
:key="item.value"
:label="item.label"
:value="item.value"
>
<i :class="item.icon"></i>
<span>{{ textSwitch(item.label) }}</span>
</el-option>
</el-select>
</div>
/deep/.el-select-dropdown {
margin: 0;
padding: 5px 0;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。