记录--vue使用Luckysheet监听切换sheet事件

Luckysheet中有多种操作事件,具体可以查看配置;事件全部是写在配置里的hook中,如:

	hook: {
            cellDragStop: function (cell, postion, sheetFile, ctx, event) {
              // console.info(cell, postion, sheetFile, ctx, event);
            },
            rowTitleCellRenderBefore: function (rowNum, postion, ctx) {
              // console.log(rowNum);
            },
            rowTitleCellRenderAfter: function (rowNum, postion, ctx) {
              // console.log(ctx);
            },
            columnTitleCellRenderBefore: function (columnAbc, postion, ctx) {
              // console.log(columnAbc);
            },
            columnTitleCellRenderAfter: function (columnAbc, postion, ctx) {
              // console.log(postion);
            },
            cellRenderBefore: function (cell, postion, sheetFile, ctx) {
              // console.log(cell,postion,sheetFile,ctx);
            },
            cellRenderAfter: function (cell, postion, sheetFile, ctx) {
              // console.log(postion);
            },
            cellMousedownBefore: function (cell, postion, sheetFile, ctx) {
              // console.log(postion);
            },
            cellMousedown: function (cell, postion, sheetFile, ctx) {
              // console.log(sheetFile);
            },
            sheetMousemove: function (cell, postion, sheetFile, moveState, ctx) {
              // console.log(cell,postion,sheetFile,moveState,ctx);
            },
            sheetMouseup: function (cell, postion, sheetFile, moveState, ctx) {
              // console.log(cell,postion,sheetFile,moveState,ctx);
            },
            cellAllRenderBefore: function (data, sheetFile, ctx) {
              // console.info(data,sheetFile,ctx)
            },
            updated: function (operate) {
              // console.info(operate)
            },
            cellUpdateBefore: function (r, c, value, isRefresh) {
              // console.info('cellUpdateBefore',r,c,value,isRefresh)
            },
            cellUpdated: function (r, c, oldValue, newValue, isRefresh) {
              // console.info('cellUpdated',r,c,oldValue, newValue, isRefresh)
            },
            sheetActivate: function (index, isPivotInitial, isNewSheet) {
              // console.info(index, isPivotInitial, isNewSheet)
            },
            rangeSelect: function (index, sheet) {
              // console.info(index, sheet)
            },
            commentInsertBefore: function (r, c) {
              // console.info(r, c)
            },
            commentInsertAfter: function (r, c, cell) {
              // console.info(r, c, cell)
            },
            commentDeleteBefore: function (r, c, cell) {
              // console.info(r, c, cell)
            },
            commentDeleteAfter: function (r, c, cell) {
              // console.info(r, c, cell)
            },
            commentUpdateBefore: function (r, c, value) {
              // console.info(r, c, value)
            },
            commentUpdateAfter: function (r, c, oldCell, newCell) {
              // console.info(r, c, oldCell, newCell)
            },
            cellEditBefore: function (range) {
              // console.info(range)
            },
            workbookCreateAfter: function (json) {
              // console.info(json)
            },
            rangePasteBefore: function (range, data) {
              // console.info('rangePasteBefore',range,data)
              // return false; //Can intercept paste
            },


          }
  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值