elementui table :span-method
})-sharp-sharp-sharp
the environmental background of the problems and what methods you have tried
merge down by default, but can I merge online in advance
related codes
/ / Please paste the code text below (do not replace the code with pictures)
this.tableData.forEach((item, index) => {
if (index === 0) {
this.spanArr.push(1)
this.position = 0
} else {
if (this.tableData[index].name=== this.tableData[index - 1].name) {
this.spanArr[this.position] += 1
this.spanArr.push(0)
} else {
this.spanArr.push(1)
this.position = index
}
}