mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
4ed3efd7dd
commit
89685b863b
1 changed files with 17 additions and 21 deletions
|
@ -228,31 +228,27 @@ export const openMenuPanel = (options: {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type === "assets") {
|
if (type === "assets") {
|
||||||
const changeData = data.view.filters;
|
if (isTop) {
|
||||||
let targetFilter: IAVFilter;
|
targetElement.before(sourceElement)
|
||||||
changeData.find((filter, index: number) => {
|
} else {
|
||||||
if (filter.column === sourceId) {
|
targetElement.after(sourceElement);
|
||||||
targetFilter = changeData.splice(index, 1)[0];
|
}
|
||||||
return true;
|
const replaceValue: IAVCellAssetValue[] = []
|
||||||
|
Array.from(targetElement.parentElement.children).forEach((item: HTMLElement) => {
|
||||||
|
if (item.dataset.content) {
|
||||||
|
replaceValue.push({
|
||||||
|
content: item.dataset.content,
|
||||||
|
name: item.dataset.name,
|
||||||
|
type: item.dataset.type as "image" | "file",
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
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({
|
updateAssetCell({
|
||||||
protyle:options.protyle,
|
protyle: options.protyle,
|
||||||
data,
|
data,
|
||||||
cellElements:options.cellElements,
|
cellElements: options.cellElements,
|
||||||
type: "replace",
|
type: "replace",
|
||||||
// replaceValue
|
replaceValue
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue