This commit is contained in:
parent
a412018823
commit
58e97e0f07
6 changed files with 7 additions and 7 deletions
|
@ -726,7 +726,7 @@ export class Graph extends Model {
|
|||
return;
|
||||
}
|
||||
if (-1 < node.type.indexOf("tag")) {
|
||||
openGlobalSearch(this.app, `#${node.id}#`, !window.siyuan.ctrlIsPressed);
|
||||
openGlobalSearch(this.app, `#${node.id}#`, !window.siyuan.ctrlIsPressed, {method: 0});
|
||||
return;
|
||||
}
|
||||
if (window.siyuan.shiftIsPressed) {
|
||||
|
|
|
@ -87,7 +87,7 @@ export class Tag extends Model {
|
|||
return;
|
||||
}
|
||||
}
|
||||
openGlobalSearch(app, `#${element.getAttribute("data-label")}#`, !window.siyuan.ctrlIsPressed);
|
||||
openGlobalSearch(app, `#${element.getAttribute("data-label")}#`, !window.siyuan.ctrlIsPressed, {method: 0});
|
||||
},
|
||||
rightClick: (element: HTMLElement, event: MouseEvent) => {
|
||||
openTagMenu(element, event, element.getAttribute("data-label"));
|
||||
|
|
|
@ -1681,7 +1681,7 @@ export const tagMenu = (protyle: IProtyle, tagElement: HTMLElement) => {
|
|||
icon: "iconSearch",
|
||||
click() {
|
||||
/// #if !MOBILE
|
||||
openGlobalSearch(protyle.app, `#${tagElement.textContent}#`, false);
|
||||
openGlobalSearch(protyle.app, `#${tagElement.textContent}#`, false, {method: 0});
|
||||
/// #else
|
||||
popSearch(protyle.app, {
|
||||
hasReplace: false,
|
||||
|
|
|
@ -391,7 +391,7 @@ export class Background {
|
|||
break;
|
||||
} else if (type === "open-search") {
|
||||
/// #if !MOBILE
|
||||
openGlobalSearch(protyle.app, `#${target.textContent}#`, !window.siyuan.ctrlIsPressed);
|
||||
openGlobalSearch(protyle.app, `#${target.textContent}#`, !window.siyuan.ctrlIsPressed, {method: 0});
|
||||
/// #else
|
||||
popSearch(protyle.app, {
|
||||
hasReplace: false,
|
||||
|
|
|
@ -2375,7 +2375,7 @@ export class WYSIWYG {
|
|||
const tagElement = hasClosestByAttribute(event.target, "data-type", "tag");
|
||||
if (tagElement && !event.altKey) {
|
||||
/// #if !MOBILE
|
||||
openGlobalSearch(protyle.app, `#${tagElement.textContent}#`, !ctrlIsPressed);
|
||||
openGlobalSearch(protyle.app, `#${tagElement.textContent}#`, !ctrlIsPressed, {method: 0});
|
||||
hideElements(["dialog"]);
|
||||
/// #else
|
||||
popSearch(protyle.app, {
|
||||
|
|
|
@ -202,7 +202,7 @@ const saveKeyList = (type: "keys" | "replaceKeys", value: string) => {
|
|||
setStorageVal(Constants.LOCAL_SEARCHKEYS, window.siyuan.storage[Constants.LOCAL_SEARCHKEYS]);
|
||||
};
|
||||
|
||||
export const openGlobalSearch = (app: App, text: string, replace: boolean) => {
|
||||
export const openGlobalSearch = (app: App, text: string, replace: boolean, searchData?: Config.IUILayoutTabSearchConfig) => {
|
||||
text = text.trim();
|
||||
const searchModel = getAllModels().search.find((item) => {
|
||||
item.parent.parent.switchTab(item.parent.headElement);
|
||||
|
@ -219,7 +219,7 @@ export const openGlobalSearch = (app: App, text: string, replace: boolean) => {
|
|||
k: text,
|
||||
r: "",
|
||||
hasReplace: false,
|
||||
method: localData.method,
|
||||
method: searchData ? searchData.method : localData.method,
|
||||
hPath: "",
|
||||
idPath: [],
|
||||
group: localData.group,
|
||||
|
|
Loading…
Add table
Reference in a new issue