mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-13 10:44:20 +01:00
📱 标题为空的处理
This commit is contained in:
parent
da19c1fc47
commit
975fd55963
2 changed files with 2 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ export const openMobileFileById = (id: string, hasContext?: boolean, action = [C
|
|||
}
|
||||
});
|
||||
}
|
||||
(document.getElementById("toolbarName") as HTMLInputElement).value = data.data.rootTitle;
|
||||
(document.getElementById("toolbarName") as HTMLInputElement).value = data.data.rootTitle === "Untitled" ? "" : data.data.rootTitle;
|
||||
setEditor();
|
||||
closePanel();
|
||||
if (pushStack) {
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ export const initFramework = () => {
|
|||
|
||||
const initEditorName = () => {
|
||||
const inputElement = document.getElementById("toolbarName") as HTMLInputElement;
|
||||
inputElement.setAttribute("placeholder", window.siyuan.languages._kernel[16]);
|
||||
inputElement.addEventListener("blur", () => {
|
||||
if (window.siyuan.config.readonly || document.querySelector("#toolbarEdit use").getAttribute("xlink:href") === "#iconEdit") {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue