能快速拿到单元格编辑的前后内容方法吗 #2261
Replies: 5 comments
-
有类似Luckysheet中的这个吗? |
Beta Was this translation helpful? Give feedback.
-
算了,时间紧张,暂时没找到好的办法,临时解决办法是 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
就是要个更新功能,如果单元格有变更就记录下来,当前我看文档有以下3个内容:
单元格进入编辑,没有单元格信息
univerAPI.onCommandExecuted((command) => {
if(command.id === 'sheet.operation.set-cell-edit-visible' && command.params.visible){
console.log('Cell edit visible')
}
})
单元格退出编辑,也没有单元格信息
univerAPI.onCommandExecuted((command) => {
if(command.id === 'sheet.operation.set-cell-edit-visible' && !command.params.visible){
console.log('Cell edit invisible')
}
})
监听选区变化,这个selection里有r,c,但是拿不到当前单元格的值吗?
const activeWorkbook = univerAPI.getActiveWorkbook();
activeWorkbook.onSelectionChange((selection) => {
console.log(selection);
});
Beta Was this translation helpful? Give feedback.
All reactions