解决el-descriptions的label-class-name不生效问题

简介: 解决el-descriptions的label-class-name不生效问题

在项目中要使element的Descriptions描述列表固定宽度

在el-descriptions-item上添加label-class-name=“className”

css中使用自定义的class名设置样式(不能用<style scoped>包裹)

<style lang="scss" scoped>
  .detail-label{
    width: 100px;
  }
</style>

改成

<style lang="scss">
  .detail-label{
    width: 100px;
  }
</style>

就生效了

相关文章
|
6天前
使用Form报错提示If ngModel is used within a form tag, either the name attribute must be set or the form
使用Form报错提示If ngModel is used within a form tag, either the name attribute must be set or the form
|
5月前
|
Kubernetes 调度 异构计算
k8s Label 2
k8s Label 2
|
9月前
|
Kubernetes 调度 Perl
k8s--label
k8s--label
element-ui的el-table与el-form的使用与表单校验
element-ui的el-table与el-form的使用与表单校验
element-ui的el-table与el-form的使用与表单校验
|
JavaScript
Element el-check 多选框详解
本文目录 1. 用途 2. 普通多选框 3. 带边框的多选框 4. 多选框组 5. 按钮样式的多选框组 6. 多选框组选中数量限制 7. 选项通过变量自动生成 8. 小结
860 0
Element el-check 多选框详解
Element UI - el-select 同时获取 value 和 label 的值
Element UI - el-select 同时获取 value 和 label 的值
513 0
ng-repeat part1 - how UI is rendered from {{name}} to actual value
ng-repeat part1 - how UI is rendered from {{name}} to actual value
ng-repeat part1 - how UI is rendered from {{name}} to actual value
the title and note has maintained the same text type
the title and note has maintained the same text type
83 0
the title and note has maintained the same text type
which class has achieved the label is layouted in the right of value
Created by Wang, Jerry, last modified on Mar 08, 2016
85 0
which class has achieved the label is layouted in the right of value