mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-09 00:34:20 +01:00
🎨 搜索支持按相关度排序 https://github.com/siyuan-note/siyuan/issues/6827
This commit is contained in:
parent
dd617d6089
commit
167b0fda6f
9 changed files with 37 additions and 7 deletions
|
|
@ -597,6 +597,20 @@ const addConfigMoreMenu = async (config: ISearchOption, edit: Protyle, element:
|
|||
config.sort = 4;
|
||||
inputEvent(element, config, undefined, edit);
|
||||
}
|
||||
}, {
|
||||
label: window.siyuan.languages.sortByRankAsc,
|
||||
current: config.sort === 6,
|
||||
click() {
|
||||
config.sort = 6;
|
||||
inputEvent(element, config, undefined, edit);
|
||||
}
|
||||
}, {
|
||||
label: window.siyuan.languages.sortByRankDesc,
|
||||
current: config.sort === 7,
|
||||
click() {
|
||||
config.sort = 7;
|
||||
inputEvent(element, config, undefined, edit);
|
||||
}
|
||||
}];
|
||||
if (config.group === 1) {
|
||||
sortMenu.push({
|
||||
|
|
|
|||
2
app/src/types/index.d.ts
vendored
2
app/src/types/index.d.ts
vendored
|
|
@ -53,7 +53,7 @@ interface Window {
|
|||
|
||||
interface ISearchOption {
|
||||
name?: string
|
||||
sort: number, // 0:按块类型(默认),1:按创建时间升序,2:按创建时间降序,3:按更新时间升序,4:按更新时间降序,5:按内容顺序(仅在按文档分组时)
|
||||
sort: number, // 0:按块类型(默认),1:按创建时间升序,2:按创建时间降序,3:按更新时间升序,4:按更新时间降序,5:按内容顺序(仅在按文档分组时),6:按相关度升序,7:按相关度降序
|
||||
group: number, // 0:不分组,1:按文档分组
|
||||
layout: number // 0:上下,1:左右
|
||||
hasReplace: boolean,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue