🎨 search asset

This commit is contained in:
Vanessa 2023-08-15 20:37:16 +08:00
parent 09ed2b15ed
commit 79962bd6e2
2 changed files with 4 additions and 10 deletions

View file

@ -58,7 +58,10 @@ export class Menus {
}
if (dataType === "search-item") {
initSearchMenu(target.getAttribute("data-node-id")).popup({x: event.clientX, y: event.clientY});
const nodeId = target.getAttribute("data-node-id");
if (nodeId) {
initSearchMenu(nodeId).popup({x: event.clientX, y: event.clientY});
}
event.stopPropagation();
break;
}

View file

@ -344,15 +344,6 @@ export const assetMethodMenu = (target: HTMLElement, cb: () => void) => {
cb();
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({
iconHTML: Constants.ZWSP,
label: "SQL",
current: method === 2,
click() {
window.siyuan.storage[Constants.LOCAL_SEARCHASSET].method = 2;
cb();
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({
iconHTML: Constants.ZWSP,
label: window.siyuan.languages.regex,