mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
225b1ef176
commit
415445863d
2 changed files with 46 additions and 9 deletions
|
|
@ -10,7 +10,7 @@ import {addSort, bindSortsEvent, getSortsHTML} from "./sort";
|
|||
import {bindDateEvent, getDateHTML, setDateValue} from "./date";
|
||||
import {formatNumber} from "./number";
|
||||
import {removeAttrViewColAnimation} from "./action";
|
||||
import {addAssetLink, bindAssetEvent, editAssetItem, getAssetHTML} from "./asset";
|
||||
import {addAssetLink, bindAssetEvent, editAssetItem, getAssetHTML, updateAssetCell} from "./asset";
|
||||
import {Constants} from "../../../constants";
|
||||
|
||||
export const openMenuPanel = (options: {
|
||||
|
|
@ -227,6 +227,35 @@ export const openMenuPanel = (options: {
|
|||
menuElement.innerHTML = getFiltersHTML(data.view);
|
||||
return;
|
||||
}
|
||||
if (type === "assets") {
|
||||
const changeData = data.view.filters;
|
||||
let targetFilter: IAVFilter;
|
||||
changeData.find((filter, index: number) => {
|
||||
if (filter.column === sourceId) {
|
||||
targetFilter = changeData.splice(index, 1)[0];
|
||||
return true;
|
||||
}
|
||||
});
|
||||
changeData.find((filter, index: number) => {
|
||||
if (filter.column === targetId) {
|
||||
if (isTop) {
|
||||
changeData.splice(index, 0, targetFilter);
|
||||
} else {
|
||||
changeData.splice(index + 1, 0, targetFilter);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
updateAssetCell({
|
||||
protyle:options.protyle,
|
||||
data,
|
||||
cellElements:options.cellElements,
|
||||
type: "replace",
|
||||
replaceValue
|
||||
});
|
||||
return;
|
||||
}
|
||||
transaction(options.protyle, [{
|
||||
action: "sortAttrViewCol",
|
||||
avID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue