1.@focus="getFocus"鼠标聚焦的时候写个方法,弹窗起来
javascript
getFocus(){
this.定义的弹窗状态字段 = true;
}
2.点击确定的时候,数值赋值到el-input的输入框,弹窗取消(this.定义的弹段字端 = false)
3.但是会有个问题就是el-input 不可点击加了:readonly="true"这个属性,此时清除效果就会失效

javascript
<el-input
v-model="value"
placeholder="请选择"
:readonly="true"
@focus="getFocus($index)"
>
<!-- slot="suffix"重点 btnClearable事件,v-show=value有值就显示没有值就隐藏 -->
<span slot="suffix" v-show="value" @click="getClearable(row,$index)">
<i class="el-icon-close" style="margin-left: 5px;margin-top:13px;cursor: pointer;"></i>
</span>
</el-input>
javascript
getClearable(row,index){
this.value = ''
},
css
<style>
/deep/.el-icon-close:before {
content: "\E78D";
}
</style>