mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
1cf54c34a8
commit
e70caed46a
3 changed files with 32 additions and 12 deletions
|
|
@ -471,16 +471,27 @@ export const setFilter = (options: {
|
|||
<option ${"Ends with" === options.filter.operator ? "selected" : ""} value="Ends with">${window.siyuan.languages.filterOperatorEndsWith}</option>
|
||||
<option ${"Is empty" === options.filter.operator ? "selected" : ""} value="Is empty">${window.siyuan.languages.filterOperatorIsEmpty}</option>
|
||||
<option ${"Is not empty" === options.filter.operator ? "selected" : ""} value="Is not empty">${window.siyuan.languages.filterOperatorIsNotEmpty}</option>
|
||||
`;
|
||||
break;
|
||||
case "number":
|
||||
selectHTML = `<option ${"=" === options.filter.operator ? "selected" : ""} value="=">=</option>
|
||||
<option ${"!=" === options.filter.operator ? "selected" : ""} value="!=">!=</option>
|
||||
<option ${">" === options.filter.operator ? "selected" : ""} value=">">></option>
|
||||
<option ${"<" === options.filter.operator ? "selected" : ""} value="<"><</option>
|
||||
<option ${">=" === options.filter.operator ? "selected" : ""} value=">=">≥</option>
|
||||
<option ${"<=" === options.filter.operator ? "selected" : ""} value="<=">≤</option>
|
||||
<option ${"Is empty" === options.filter.operator ? "selected" : ""} value="Is empty">${window.siyuan.languages.filterOperatorIsEmpty}</option>
|
||||
<option ${"Is not empty" === options.filter.operator ? "selected" : ""} value="Is not empty">${window.siyuan.languages.filterOperatorIsNotEmpty}</option>
|
||||
`;
|
||||
break;
|
||||
}
|
||||
menu.addItem({
|
||||
iconHTML: "",
|
||||
label: `<select class="b3-select fn__size200">${selectHTML}</select>`
|
||||
label: `<select style="margin: 4px 0" class="b3-select fn__size200">${selectHTML}</select>`
|
||||
});
|
||||
menu.addItem({
|
||||
iconHTML: "",
|
||||
label: `<input value="${options.filter.value[colType].content}" class="b3-text-field fn__size200">`
|
||||
label: `<input style="margin: 4px 0" value="${options.filter.value[colType].content}" class="b3-text-field fn__size200">`
|
||||
});
|
||||
const textElement = (window.siyuan.menus.menu.element.querySelector(".b3-text-field") as HTMLInputElement);
|
||||
textElement.addEventListener("keydown", (event) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue