element el-select 调整高度

vue yekong 352℃

将原有的默认40px高度修改为30px
这里使用了::v-deep
wanjunshijiecom 2021-10-03 at 15.12.11

html

      <el-select class="topselect w130 ml15" v-model="value" placeholder="请选择">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value">
        </el-option>
      </el-select>

css

    .topselect {
      ::v-deep {
        .el-input__inner {
          height: 30px;
          background: rgba(29, 214, 226, 0.1) !important;
          border: 1px solid #01DEEF !important;
        }

        .el-input__prefix, .el-input__suffix {
          height: 30px;
        }

        /* 下面设置右侧按钮居中 */
        .el-input__suffix {
          top: 5px;
        }

        .el-input__icon {
          line-height: inherit;
        }

        .el-input__suffix-inner {
          display: inline-block;
        }
      }
    }
喜欢 (0)