1. 样式问题示例:
组件为el-cascader,添加filterable属性后会出现placeholder重叠问题
2. 解决办法
在页面样式区域添加以下代码,此代码是根据自身项目现有样式进行调整,可根据实际情况删减
:deep(.el-cascader__tags) {
// margin-left: -5px;
.el-cascader__search-input {
height: 22px;
}
.el-tag > span {
max-width: 100px !important;
}
//
}
// 主要是此部分样式
::v-deep {
.el-cascader:has(.el-cascader__tags)
.el-input
input::-webkit-input-placeholder {
color: transparent;
opacity: 0;
}
}
:deep(.el-cascader) {
height: 24px;
.el-input__inner {
height: 24px !important;
}
}