From d5fb439c0ef6a64a325ad0c27fb2fe57df20a57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=9C=E7=8C=AB=E5=AD=90neko?= <815743831@qq.com> Date: Wed, 10 Nov 2021 17:31:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=BD=93=E9=87=8D?= =?UTF-8?q?=E5=91=BD=E5=90=8Dsheet=E6=97=B6=E8=BE=93=E5=85=A5=E4=BA=86?= =?UTF-8?q?=E8=BF=9D=E8=A7=84=E5=AD=97=E7=AC=A6=E7=9A=84=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E5=92=8C=E6=8F=90=E7=A4=BA=E6=98=BE=E7=A4=BA?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 用alert提示的交互体验不如tooltip. 2. 提示错误后又focus导致阻止任意下一步操作的交互体验修改. --- src/controllers/sheetBar.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/controllers/sheetBar.js b/src/controllers/sheetBar.js index 8a821cd..b89d205 100644 --- a/src/controllers/sheetBar.js +++ b/src/controllers/sheetBar.js @@ -281,11 +281,8 @@ export function initialSheetBar(){ } if(txt.length>31 || txt.charAt(0)=="'" || txt.charAt(txt.length-1)=="'" || /[:\:\\\/?\?\*\[\]]+/.test(txt)){ - alert(locale_sheetconfig.sheetNameSpecCharError); - setTimeout(()=>{ - luckysheetsheetnameeditor($(this)); - $(this).focus(); - }, 1); + tooltip.info("", locale_sheetconfig.sheetNameSpecCharError); + $t.text(oldtxt).attr("contenteditable", "false"); return; }