美文网首页程序员
Element-UI 样式修改 覆盖

Element-UI 样式修改 覆盖

作者: 蜂子阁先生 | 来源:发表于2022-09-18 13:43 被阅读0次
  • F12 打开网页调试,找到需要修改的CSS


    QQ20220919-133708.png

例如要修改的样式为

.el-input.is-disabled .el-input__inner {
    background-color: #F5F7FA;
    border-color: #E4E7ED;
    color: #C0C4CC;
    cursor: not-allowed;
}
  • 将需要修改的样式拷贝到vue文件里面修改;注意 <style> 不能包含scope ,需要修改的属性要加上 !important
<style>
  /* 修改elementUI-switch组件 disabled样式 */
.el-input.is-disabled .el-input__inner {
    /* background-color: #143567 !important; */
    border-color: #E4E7ED;
    color: #000000;
    cursor: unset !important;
}
</style>

相关文章

网友评论

    本文标题:Element-UI 样式修改 覆盖

    本文链接:https://www.haomeiwen.com/subject/frdportx.html