自己摸索的,element-plus和element-ui的修改方式不太一樣蚜退。
<div?class="v-header-select">
? ??????? ?<el-select
? ? ? :model-value="data.modelValue"
? ? ? :placeholder="data.placeholder"
? ? ? :size="data.size"
? ? ? popper-class="_name-style"
? ? >...(代碼結(jié)構(gòu)略去)
樣式部分:
.v-header-select {
?????:deep(.el-select) {//deep穿透
? ? .el-input .el-select__caret{//箭頭樣式
? ? ? ? background: url(~statics/header/自定義箭頭圖片.svg) no-repeat;//自定義圖片
? ? ? ? transform: rotateZ(0deg);//轉(zhuǎn)動(dòng)圖片
? ? ? ? appearance: none;
? ? ? ? background-size: 8px 8px;
? ? ? ? width: 14px;
? ? ? ? height: 14px;
? ? ? ? position: absolute;//圖片定位
? ? ? ? top:5px;
? ? ? ? right: 0px;
? ? }
? ? ? .el-icon svg{//隱藏原來(lái)箭頭
? ? ? ? ? display:none
? ? ? ? }
}
可正常使用~