Vanessa 2023-03-22 19:00:25 +08:00
parent 05ce795c86
commit 6ef2dde3e9

View file

@ -263,7 +263,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()
element.addEventListener("click", (event: MouseEvent) => {
let target = event.target as HTMLElement;
const searchPathInputElement = element.querySelector("#searchPathInput");
const searchPathInputElement = element.querySelector("#searchPathInput");
while (target && !target.isSameNode(element)) {
if (target.classList.contains("search__rmpath")) {
config.idPath = [];
@ -370,6 +370,8 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()
icon: "iconSearch",
title: window.siyuan.languages.search,
callback(tab) {
config.k = searchInputElement.value
config.r = replaceInputElement.value
const asset = new Search({
tab,
config