export default{ data(){ spanb:[] }},mounted:function(){ let contactDotb = 0; let spanb = []; this.data5.forEach((item,index)=>{ if(index === 0){ spanb.push(1) }else { if (item.b === this.data5[index - 1].b){ spanb[contactDotb] += 1; spanb.push(0) } else { contactDotb = index spanb.push(1) } } }) this.spanb = spanb;},methods:{ handleSpan({ row, column, rowIndex, columnIndex }){ if (columnIndex === 1) { if(this.spanb[rowIndex]){ return { rowspan:this.spanb[rowIndex], colspan:1 } }else{ return { rowspan: 0, colspan: 1 } } } if (columnIndex === 2) { if(this.spanb[rowIndex]){ return { rowspan:this.spanb[rowIndex], colspan:1 } }else{ return { rowspan: 0, colspan: 1 } } }}}
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!