[element] select-modify background color, font color, width and height, etc.

Effect:

premise:

You need to add a class name to the parent element of el-select

.select {
    &::v-deep {
        .el-select {
            // 1.修改边距
            margin-left: 9px;

            .el-input.el-input--suffix {
                // 2.修改背景颜色、字体颜色、边框、宽高
                .el-input__inner {
                    background: rgba(0, 119, 239, 0.4) !important;
                    color: #fff;
                    border: 1px solid #057DD9;
                    height: 30px;
                    width: 95px; 
                }
                
                // 符号的位置会错乱,进行修正(水平)
                .el-input__suffix-inner {
                   position: absolute;
                   left: -65px;
                }
            }

                // 符号的位置会错乱,进行修正(垂直)
            .el-select__caret.el-input__icon.el-icon-arrow-up {
              line-height: 30px;
            }
        }
    }
}

 

Guess you like

Origin blog.csdn.net/Weiqian_/article/details/128074524