el-select 调整宽高

715 阅读1分钟

一、 宽度调整:

1. 行内样式

<el-select v-model="op1" style="width: 200px;"></el-select>

2. 添加样式即可

.el-select { width : 200px; }

二、 高度调整:默认高度为40px

.el-select {
  height: 60px;
 
  /deep/ .el-input {
    .el-input__inner {
      height: 60px;
    }
 
    .el-input__prefix,
    .el-input__suffix {
      height: 60px;
    }
 
    /* 下面设置右侧按钮居中 */
    .el-input__suffix {
      top: 0px;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-wrap: nowrap;
      flex-direction: row;
      align-content: flex-start;
    }
 
    /* 输入框加上上下边是 60px + 2px =62px */
    .el-input__icon {
      line-height: 62px;
    }
  }
}