element plus 去掉select选择框的边框,并修改右侧图标

1.去掉选择框边框

::v-deep .el-select__wrapper{
box-shadow: none;
}
::v-deep .is-hovering{
box-shadow: none !important;
}

2.修改选择框右侧图标

  • 新建CaretBottom.vue文件
  • 内容:
<template>
    <el-icon>
        <CaretBottom />
    el-icon>
template>
  • 将新建的vue文件引入到select选择框所在的文件
import CaretBottom from '../components/CaretBottom.vue';
  • 使用,添加:teleported=“false”, :suffix-icon=“CaretBottom”
<el-select v-model="searchvalue" :teleported="false"  placeholder="请选择" :suffix-icon="CaretBottom" ">
     <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
el-select>

你可能感兴趣的:(elementplus,css,前端)