Cell merge
Cell merging refers to merging multiple cells into one cell, which is commonly used for functions such as merging and displaying duplicate content.
Automatic cell merge
In VTable, you can configure mergeCell on a column to merge adjacent cells with the same content in the same column.
Example
If mergeCell is configured, adjacent cells with the same content in the same column will be merged and displayed.
Custom cell merge
In VTable, you can configure customMergeCell to customize the merging method of cells. This method is often used to display some label information. The customMergeCell callback function will pass in the column number and table instance, determine the cells that need to be merged in the function, and return the corresponding merging rules:
- text: Merge text in cells
- range: merged range
- style: style of merged cells
customMergeCell can also be configured as an array of merge rules. Each item in the array is a merge rule. The configuration of the rule is the same as the return value of the customMergeCell callback function.