Browse Source

fix: 修复重命名sheet为空时的tooltip导致无法进行下一步任何操作的问题

master
菜猫子neko 4 years ago
parent
commit
68d113201c
  1. 13
      src/controllers/sheetBar.js

13
src/controllers/sheetBar.js

@ -271,20 +271,15 @@ export function initialSheetBar(){
return;
}
if(0 === $(this).text().length){
let $t = $(this);
let txt = $t.text(), oldtxt = $t.data("oldtxt");
if(0 === $(this).text().length){
tooltip.info("", locale_sheetconfig.sheetNamecannotIsEmptyError);
setTimeout(()=>{
$(this).text(oldSheetFileName);
luckysheetsheetnameeditor($(this));
$(this).focus();
}, 1);
$t.text(oldtxt).attr("contenteditable", "false");
return;
}
let $t = $(this);
let txt = $t.text(), oldtxt = $t.data("oldtxt");
if(txt.length>31 || txt.charAt(0)=="'" || txt.charAt(txt.length-1)=="'" || /[:\:\\\/?\?\*\[\]]+/.test(txt)){
alert(locale_sheetconfig.sheetNameSpecCharError);
setTimeout(()=>{

Loading…
Cancel
Save