mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-19 13:38:06 +01:00
This commit is contained in:
parent
526bd76c4c
commit
582cce1b92
3 changed files with 9 additions and 8 deletions
|
|
@ -25,8 +25,9 @@ export const setGroupMethod = async (options: {
|
|||
numStart: 0,
|
||||
numEnd: 1000,
|
||||
numStep: 100,
|
||||
} : null
|
||||
} : {field: null, method: null, order: null, range: null};
|
||||
} : null,
|
||||
hideEmpty: true,
|
||||
} : {field: null, method: null, order: null, range: null, hideEmpty: null};
|
||||
const response = await fetchSyncPost("/api/av/setAttrViewGroup", {
|
||||
blockID,
|
||||
avID: options.blockElement.getAttribute("data-av-id"),
|
||||
|
|
@ -169,7 +170,7 @@ export const getGroupsHTML = (columns: IAVColumn[], view: IAVView) => {
|
|||
groupHTML += `<button class="b3-menu__item" draggable="${disabledDrag ? "false" : "true"}">
|
||||
${disabledDrag ? "" : '<svg class="b3-menu__icon fn__grab"><use xlink:href="#iconDrag"></use></svg>'}
|
||||
<div class="b3-menu__label fn__flex">${item.name || ""}</div>
|
||||
<svg class="b3-menu__action" data-type="hideGroup" data-id="${item.id}"><use xlink:href="#iconEye${item.groupHidden ? "off" : ""}"></use></svg>
|
||||
<svg class="b3-menu__action" data-type="hideGroup" data-id="${item.id}"><use xlink:href="#iconEye${item.groupHidden === 0 ? "" : "off"}"></use></svg>
|
||||
</button>`;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1519,10 +1519,10 @@ export const openMenuPanel = (options: {
|
|||
data: !isHide
|
||||
}]);
|
||||
data.view.groups.find((item) => {
|
||||
if (item.id === target.dataset.id) {
|
||||
item.groupHidden = isHide;
|
||||
return true;
|
||||
}
|
||||
if (item.id === target.dataset.id) {
|
||||
item.groupHidden = isHide ? 2 : 0;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
|
|
|||
2
app/src/types/index.d.ts
vendored
2
app/src/types/index.d.ts
vendored
|
|
@ -853,7 +853,7 @@ interface IAVView {
|
|||
pageSize: number;
|
||||
showIcon: boolean;
|
||||
wrapField: boolean;
|
||||
groupHidden?: boolean,
|
||||
groupHidden?: number, // 0:显示,1:空白隐藏,2:手动隐藏
|
||||
filters: IAVFilter[],
|
||||
sorts: IAVSort[],
|
||||
groups: IAVView[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue