diff --git a/src/controllers/handler.js b/src/controllers/handler.js index 0d4be85c7..6d225ab4b 100644 --- a/src/controllers/handler.js +++ b/src/controllers/handler.js @@ -3318,7 +3318,7 @@ export default function luckysheetHandler() { } let luckysheetTableContent = $("#luckysheetTableContent").get(0).getContext("2d"); - + method.createHookFunction("sheetMouseup", Store.flowdata[row_index][col_index], { r:row_index, c:col_index, @@ -4972,7 +4972,7 @@ export default function luckysheetHandler() { }); //表格左上角点击 全选表格 - $("#luckysheet-left-top").mousedown(function (event) { + $("#luckysheet-left-top").click(function (event) { if(!checkProtectionAllSelected(Store.currentSheetIndex)){ return; } diff --git a/src/controllers/keyboard.js b/src/controllers/keyboard.js index c1e7d57fd..35671743f 100644 --- a/src/controllers/keyboard.js +++ b/src/controllers/keyboard.js @@ -696,8 +696,9 @@ export function keyboardInitial(){ luckysheetMoveHighlightCell2("right", "rangeOfSelect"); } else if (String.fromCharCode(kcode).toLocaleUpperCase() == "A") {//Ctrl + A 全选 - $("#luckysheet-left-top").trigger("mousedown"); - $(document).trigger("mouseup"); + // $("#luckysheet-left-top").trigger("mousedown"); + // $(document).trigger("mouseup"); + $("#luckysheet-left-top").click() } event.preventDefault(); diff --git a/src/controllers/menuButton.js b/src/controllers/menuButton.js index c41a17e5b..74431a6f4 100644 --- a/src/controllers/menuButton.js +++ b/src/controllers/menuButton.js @@ -46,7 +46,7 @@ const menuButton = { "coloritem": '
${name}
', "subcolor": '
', "rightclickmenu": null, - "submenuhide": null, + "submenuhide": {}, focus: function($obj, value){ if($obj.attr("id")=="luckysheet-icon-font-family-menuButton"){ if (isdatatypemulti(value)["num"]) { @@ -956,7 +956,7 @@ const menuButton = { "borderType": type, "color": color, "style": style, - "range": Store.luckysheet_select_save + "range": $.extend(true, [], Store.luckysheet_select_save) } cfg["borderInfo"].push(borderInfo); @@ -1115,7 +1115,7 @@ const menuButton = { "borderType": itemvalue, "color": color, "style": style, - "range": Store.luckysheet_select_save + "range": $.extend(true, [], Store.luckysheet_select_save) } cfg["borderInfo"].push(borderInfo); @@ -2874,7 +2874,7 @@ const menuButton = { } mouseclickposition($menuButton, menuleft, $(this).offset().top + 25, "lefttop"); }); - + $("body").on("mouseover mouseleave",".luckysheet-menuButton .luckysheet-cols-submenu", function(e){ let $t = $(this), attrid = $t.attr("itemvalue"), $attr = $("#luckysheet-icon-" + attrid + "-menuButton"); @@ -2897,13 +2897,13 @@ const menuButton = { $attr.css({ "top": top, "left": left }).show(); _this.rightclickmenu = $t; } else { - clearTimeout(_this.submenuhide); - _this.submenuhide = setTimeout(function () { $attr.hide(); }, 200); + clearTimeout(_this.submenuhide[$attr.attr('id')]); + _this.submenuhide[$attr.attr('id')] = setTimeout(function () { $attr.hide(); }, 200); } }).on("mouseover mouseleave",".luckysheet-menuButton-sub", function(e){ if (e.type === "mouseover") { _this.rightclickmenu.addClass("luckysheet-cols-menuitem-hover"); - clearTimeout(_this.submenuhide); + clearTimeout(_this.submenuhide[$(this).attr('id')]); } else { _this.rightclickmenu.removeClass("luckysheet-cols-menuitem-hover"); diff --git a/src/global/border.js b/src/global/border.js index aa089181e..c6b8589e4 100644 --- a/src/global/border.js +++ b/src/global/border.js @@ -1062,7 +1062,7 @@ function getBorderInfoCompute(sheetIndex) { data = Store.luckysheetfile[getSheetIndex(sheetIndex)].data; } - getBorderInfoComputeRange(0, data.length,0, data[0].length, sheetIndex); + borderInfoCompute = getBorderInfoComputeRange(0, data.length,0, data[0].length, sheetIndex); return borderInfoCompute; } diff --git a/src/global/method.js b/src/global/method.js index 86726d82c..f576ba49a 100644 --- a/src/global/method.js +++ b/src/global/method.js @@ -491,9 +491,6 @@ const method = { dataVerificationCtrl[key] = defaultDataVerification[key]; } } - - - }, editorChart:function(c){ let chart_selection_color = luckyColor[0];