根据判断条件动态显示表头,有年度表头显示年批复量,没有年度,表头显示总批复量
columns表头本就是数组,所以使用数组的方法
splice往指定索引处添加元素就行
this.columns.splice(3, 0, { title: '年批复量', key: 'count', align: "center" }, ) 在表头数组索引为3处,添加数组元素
{ title: '年批复量', key: 'count', align: "center" }或者
{ title: '总批复量', key: 'count', align: "center" }