mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 search asset
This commit is contained in:
parent
09ed2b15ed
commit
79962bd6e2
2 changed files with 4 additions and 10 deletions
|
|
@ -58,7 +58,10 @@ export class Menus {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dataType === "search-item") {
|
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();
|
event.stopPropagation();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -344,15 +344,6 @@ export const assetMethodMenu = (target: HTMLElement, cb: () => void) => {
|
||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
}).element);
|
}).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({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
iconHTML: Constants.ZWSP,
|
iconHTML: Constants.ZWSP,
|
||||||
label: window.siyuan.languages.regex,
|
label: window.siyuan.languages.regex,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue