🎨 getBlockInfo 返回 code = 3 时告知用户正在索引,请稍后再试

This commit is contained in:
Vanessa 2023-01-25 21:41:35 +08:00
parent 35f7fd0b66
commit e782e034cc
4 changed files with 19 additions and 1 deletions

View file

@ -23,6 +23,7 @@ import {getPreviousHeading} from "../protyle/wysiwyg/getBlock";
import {lockFile, setTitle} from "../dialog/processSystem";
import {zoomOut} from "../menus/protyle";
import {countBlockWord, countSelectWord} from "../layout/status";
import {showMessage} from "../dialog/message";
export const openFileById = (options: {
id: string,
@ -39,6 +40,10 @@ export const openFileById = (options: {
lockFile(data.data);
return;
}
if (data.code === 3) {
showMessage(data.msg);
return;
}
if (typeof options.removeCurrentTab === "undefined") {
options.removeCurrentTab = true;
}