mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-04 20:00:17 +01:00
This commit is contained in:
parent
4bf7b49beb
commit
60f6bf9a64
9 changed files with 203 additions and 139 deletions
|
|
@ -41,11 +41,7 @@ export class MobileTags {
|
|||
return;
|
||||
}
|
||||
}
|
||||
const searchOption = window.siyuan.storage[Constants.LOCAL_SEARCHDATA];
|
||||
popSearch(app, {
|
||||
removed: searchOption.removed,
|
||||
sort: searchOption.sort,
|
||||
group: searchOption.group,
|
||||
hasReplace: false,
|
||||
method: 0,
|
||||
hPath: "",
|
||||
|
|
@ -53,8 +49,6 @@ export class MobileTags {
|
|||
k: `#${labelName}#`,
|
||||
r: "",
|
||||
page: 1,
|
||||
types: Object.assign({}, searchOption.types),
|
||||
replaceTypes: Object.assign({}, searchOption.replaceTypes)
|
||||
});
|
||||
},
|
||||
blockExtHTML: window.siyuan.config.readonly ? undefined : '<span class="b3-list-item__action"><svg><use xlink:href="#iconMore"></use></svg></span>',
|
||||
|
|
|
|||
|
|
@ -616,7 +616,18 @@ const initSearchEvent = (app: App, element: Element, config: Config.IUILayoutTab
|
|||
}, false);
|
||||
};
|
||||
|
||||
export const popSearch = (app: App, config = window.siyuan.storage[Constants.LOCAL_SEARCHDATA] as Config.IUILayoutTabSearchConfig) => {
|
||||
export const popSearch = (app: App, searchConfig?: any) => {
|
||||
const config: Config.IUILayoutTabSearchConfig = JSON.parse(JSON.stringify(window.siyuan.storage[Constants.LOCAL_SEARCHDATA]));
|
||||
const rangeText = (getCurrentEditor()?.protyle.toolbar.range || (getSelection().rangeCount > 0 ? getSelection().getRangeAt(0) : document.createRange())).toString()
|
||||
if (rangeText) {
|
||||
config.k = rangeText;
|
||||
}
|
||||
if (searchConfig) {
|
||||
Object.keys(searchConfig).forEach((key: "r") => {
|
||||
config[key] = searchConfig[key];
|
||||
});
|
||||
}
|
||||
|
||||
activeBlur();
|
||||
hideKeyboardToolbar();
|
||||
let includeChild = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue