vue2样式穿透

发布于 2025-01-09  515 次阅读


html

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

css

::v-deep .transparent-select .el-input__inner {
    background-color: transparent !important;
  }
个人博客
最后更新于 2025-01-09