vue使用 element lable的样式修改

1.去掉style中的scoped

<style scoped>

</style>

2.在对应el-form-item的label属性中加入class样式

<el-form-item label="用户名" class="item">
              <el-input v-model="ruleForm.username" placeholder="请输入用户名" maxlength="10"></el-input>
</el-form-item>

3.查看当前元素对应style的样式名称

如:.el-form-item__label 添加如下样式代码

.item .el-form-item__label{
    color: wheat;
  }

参考链接:https://www.jianshu.com/p/465207874a10

发布了27 篇原创文章 · 获赞 0 · 访问量 590

猜你喜欢

转载自blog.csdn.net/qq_40209717/article/details/103413486
今日推荐