handsontable merged cell CI

  Dog B Baidu, such a simple question can not find a normal solution, sucker, right? ? ?

  After my morning unremitting efforts, and finally found the correct configuration items merged cells (or my own guessed), merged cells, called mergeCells correct name in the menu, which is finished by reference to the contents of the bag own menu guessed. Configuration is as follows

 hotSettings: {
        data: [ // 数据,可以是数据,对象
          ['', '', '', '', '', ''],
          ['', '', '', '', '', ''],
          ['', '', '', '', '', '']
        ],
        colWidths: 64, // 列宽 忽略
        rowHeights: [47, 34, 34],//忽略
        colHeaders: ['主', '夹1', '夹2', '夹3', '夹4', '夹5'], // 行表头 忽略
        contextMenu: [
          'col_left',
          'col_right',
          'remove_col',
          'mergeCells' //没错就是他!!!菜单配置项加上他就能合并了
        ],
        mergeCells: true //别忘了还有他!!!
      }

  Results as shown below: splitting and merging requires only one parameter is enough.

 

 

Published 109 original articles · won praise 196 · Views 300,000 +

Guess you like

Origin blog.csdn.net/dkr380205984/article/details/88635281