elementui的时间选择器的icon位置调整
左侧icon隐藏,右侧icon添加class
<el-date-picker v-model="dateRange" type="daterange" :clearable='false' range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" > </el-date-picker>
.el-range__icon {
display: none;
}
mounted(){ document.getElementsByClassName('el-range__close-icon')[0].className += ' el-icon-date'; //在原来的后面加这个 console.log(document.getElementsByClassName('el-range__close-icon')) }