mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🚨
This commit is contained in:
parent
e0ebc536d5
commit
5781bb6356
3 changed files with 13 additions and 13 deletions
|
|
@ -294,7 +294,7 @@ const genAttr = (attrs: IObject, focusName = "bookmark", cb: (dialog: Dialog, rm
|
|||
}
|
||||
bindAttrInput(item, btnsElement[2]);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const openFileAttr = (attrs: IObject, id: string, focusName = "bookmark") => {
|
||||
genAttr(attrs, focusName, (dialog) => {
|
||||
|
|
@ -307,7 +307,7 @@ export const openFileAttr = (attrs: IObject, id: string, focusName = "bookmark")
|
|||
if (item.tagName === "INPUT") {
|
||||
return;
|
||||
}
|
||||
name = "custom-" + (item.parentElement.querySelector(".b3-text-field") as HTMLInputElement).value
|
||||
name = "custom-" + (item.parentElement.querySelector(".b3-text-field") as HTMLInputElement).value;
|
||||
}
|
||||
if (item.value.trim()) {
|
||||
if (!/^[0-9a-zA-Z\-]*$/.test(name.replace("custom-", "")) || name === "custom-") {
|
||||
|
|
@ -359,7 +359,7 @@ export const openFileAttr = (attrs: IObject, id: string, focusName = "bookmark")
|
|||
/// #endif
|
||||
});
|
||||
dialog.destroy();
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
export const openAttr = (nodeElement: Element, protyle: IProtyle, focusName = "bookmark") => {
|
||||
|
|
@ -378,7 +378,7 @@ export const openAttr = (nodeElement: Element, protyle: IProtyle, focusName = "b
|
|||
if (item.tagName === "INPUT") {
|
||||
return;
|
||||
}
|
||||
name = "custom-" + (item.parentElement.querySelector(".b3-text-field") as HTMLInputElement).value
|
||||
name = "custom-" + (item.parentElement.querySelector(".b3-text-field") as HTMLInputElement).value;
|
||||
}
|
||||
if (item.value.trim()) {
|
||||
if (!/^[0-9a-zA-Z\-]*$/.test(name.replace("custom-", "")) || name === "custom-") {
|
||||
|
|
@ -432,7 +432,7 @@ export const openAttr = (nodeElement: Element, protyle: IProtyle, focusName = "b
|
|||
nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));
|
||||
updateTransaction(protyle, id, nodeElement.outerHTML, oldHTML);
|
||||
dialog.destroy();
|
||||
})
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue