handsontable 自定义右键菜单 发表于 2016-05-24 | 分类于 js | 12345678910111213141516171819202122232425262728293031323334353637383940414243hot1.updateSettings({ contextMenu: { callback: function (key, options) { console.log(key); if (key === 'ColType') { setTimeout(function () { //timeout is used to make sure the menu collapsed before alert is shown alert("This is a context menu with default and custom options mixed"); }, 100); } }, items: { // 上面插入一行 "row_above": {}, // 下面插入一行 "row_below": {}, "hsep1": "---------", // 左侧插入一列 "col_left":{}, // 右侧插入一列 "col_right":{}, "hsep2": "---------", // 删除行 "remove_row":{}, // 删除列 "remove_col":{}, "hsep3": "---------", "undo":{}, "redo":{}, "make_read_only": {}, // 单元格对齐方式 //"alignment": {}, "commentsAddEdit": {}, // 合并单元格菜单 "mergeCells": {}, "hsep2": "---------", // 自定义菜单 "ColType": { name: 'ColType', } } }}); 坚持原创技术分享,您的支持将鼓励我继续创作! Donate WeChat Pay Alipay 本文作者: WilleamZhao 本文链接: http://sourcod.com/2016/05/24/handsontable-自定义右键菜单/ 版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 许可协议。转载请注明出处!