Browse Source

feat: 修改当重命名sheet时输入了违规字符的交互方式和提示显示.

1. 用alert提示的交互体验不如tooltip.
2. 提示错误后又focus导致阻止任意下一步操作的交互体验修改.
master
菜猫子neko 4 years ago
parent
commit
d5fb439c0e
  1. 7
      src/controllers/sheetBar.js

7
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;
}

Loading…
Cancel
Save