mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-19 05:28:07 +01:00
feat: change database click action (#8937)
This commit is contained in:
parent
7361429c6f
commit
7f21a05d84
4 changed files with 28 additions and 11 deletions
|
|
@ -15,6 +15,7 @@ export const initBlockPopover = (app: App) => {
|
|||
return;
|
||||
}
|
||||
const aElement = hasClosestByAttribute(event.target, "data-type", "a", true) ||
|
||||
hasClosestByAttribute(event.target, "data-type", "url") ||
|
||||
hasClosestByAttribute(event.target, "data-type", "tab-header") ||
|
||||
hasClosestByClassName(event.target, "ariaLabel") ||
|
||||
hasClosestByAttribute(event.target, "data-type", "inline-memo");
|
||||
|
|
@ -207,7 +208,9 @@ export const showPopover = async (app: App, showRef = false) => {
|
|||
});
|
||||
ids = postResponse.data;
|
||||
}
|
||||
} else if (popoverTargetElement.getAttribute("data-type")?.split(" ").includes("a")) {
|
||||
} else if (
|
||||
popoverTargetElement.getAttribute("data-type")?.split(" ").includes("a") ||
|
||||
popoverTargetElement.getAttribute("data-type")?.split(" ").includes("url")) {
|
||||
// 以思源协议开头的链接
|
||||
ids = [getIdFromSYProtocol(popoverTargetElement.getAttribute("data-href"))];
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue