先上效果图:
实现代码:利用lb-element-table实现。
template中:
{ {table.indicatorType}}
注:其中merge中的数组是你需要合并的列的属性名。
data中定义column:
column = [
{
prop: "project",
label: "项目"
},
{
prop: "indicatorName",
label: "指标"
}
];
data中定义tableData的值:
listData: [
{
indicatorType: "指标分类1",
tableData: [
{
project: "工艺流程名称2",
indicatorName: "指标名称2",
name: "2019-01-01",
value1: "8",
value2: "90",
value3: "14",
value