el-date-picker icon color

1. Effect:
insert image description here
The color of the calendar icon on the left and the clear icon on the right are both set to white.
2. Realize
vue

<div class="block">
				   <el-date-picker
				     v-model="value2"
				     type="month"
					 format="yyyy年M月"
					 value-format="yyyy-MM"
				     placeholder="选择月">
				   </el-date-picker>
				 </div>

css

.block{
    
    
		::v-deep .el-input__inner{
    
    
			background-color: $themeColor;
			color: #ffffff;
		}
		//设置左侧日历图标颜色
		::v-deep .el-input__prefix {
    
    
			color: #ffffff;
		}
		//设置右侧清除图标颜色
		::v-deep .el-input__suffix{
    
    
			color: #ffffff;
		}
	}

Guess you like

Origin blog.csdn.net/qq_43840793/article/details/128445052