解决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>

就生效了

相关文章
|
5月前
|
前端开发 开发者
Warning: [antd: Breadcrumb] `Breadcrumb.Item and Breadcrumb.Separator` is deprecated. Please use `it
Warning: [antd: Breadcrumb] `Breadcrumb.Item and Breadcrumb.Separator` is deprecated. Please use `it
284 1
|
3月前
|
前端开发
前端使用 <el-descriptions>标签报错: <el-descriptions> - did you register the component correctly
前端使用 <el-descriptions>标签报错: <el-descriptions> - did you register the component correctly
182 0
|
5月前
input type="button"和button的区别
input type="button"和button的区别
|
10月前
|
Kubernetes 调度 异构计算
k8s Label 2
k8s Label 2
|
11月前
|
JavaScript
Element UI报错:Unknown custom element: <el-menu>
Element UI报错:Unknown custom element: <el-menu>
138 0
|
Kubernetes 调度 Perl
k8s--label
k8s--label
|
JavaScript
Element el-check 多选框详解
本文目录 1. 用途 2. 普通多选框 3. 带边框的多选框 4. 多选框组 5. 按钮样式的多选框组 6. 多选框组选中数量限制 7. 选项通过变量自动生成 8. 小结
951 0
Element el-check 多选框详解
element-ui的el-table与el-form的使用与表单校验
element-ui的el-table与el-form的使用与表单校验
element-ui的el-table与el-form的使用与表单校验
Element UI - el-select 同时获取 value 和 label 的值
Element UI - el-select 同时获取 value 和 label 的值
580 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