From be2ca2911ebba58080ee1e8ff646ddf5ea243cef Mon Sep 17 00:00:00 2001 From: renxxing <74659302+renxxing@users.noreply.github.com> Date: Thu, 10 Dec 2020 09:59:56 +0800 Subject: [PATCH] repair repair --- src/controllers/select.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/controllers/select.js b/src/controllers/select.js index 41a0af9..538e652 100644 --- a/src/controllers/select.js +++ b/src/controllers/select.js @@ -6,6 +6,7 @@ import browser from '../global/browser'; import dataVerificationCtrl from './dataVerificationCtrl'; import { getSheetIndex, getRangetxt } from '../methods/get'; import Store from '../store'; +import method from '../global/method'; import locale from '../locale/locale'; //公式函数 选区实体框 @@ -182,6 +183,14 @@ function selectHightlightShow(isRestore = false) { } Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].luckysheet_select_save = Store.luckysheet_select_save; + // Hook function, change the range selection box, selectHightlightShowillbe triggered multiple times when mousemove is moused, and thhistoricalvalue is used here to throttle + const luckysheet_select_save_previous = JSON.stringify(Store.luckysheet_select_save); + + if(Store.luckysheet_select_save_previous == null |Store.luckysheet_select_save_previous !== luckysheet_select_save_previous){ + method.createHookFunction('rangeSelect', Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)], Store.luckysheet_select_save); + } + + Store.luckysheet_select_save_previous = luckysheet_select_save_previous; } //选区标题栏 @@ -546,4 +555,4 @@ export { collaborativeEditBox, luckysheet_count_show, selectHelpboxFill -} \ No newline at end of file +}