mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
50156a0dc9
commit
bb151cc6fe
2 changed files with 95 additions and 50 deletions
|
|
@ -859,7 +859,13 @@ export const openMenuPanel = (options: {
|
|||
break;
|
||||
} else if (type === "removeCol") {
|
||||
const colId = menuElement.querySelector(".b3-menu__item").getAttribute("data-col-id");
|
||||
const colData = data.view.columns.find((item: IAVColumn) => item.id === colId);
|
||||
let previousID: string
|
||||
const colData = data.view.columns.find((item: IAVColumn, index) => {
|
||||
if (item.id === colId) {
|
||||
previousID = data.view.columns[index - 1]?.id;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
transaction(options.protyle, [{
|
||||
action: "removeAttrViewCol",
|
||||
id: colId,
|
||||
|
|
@ -869,7 +875,8 @@ export const openMenuPanel = (options: {
|
|||
name: colData.name,
|
||||
avID,
|
||||
type: colData.type,
|
||||
id: colId
|
||||
id: colId,
|
||||
previousID
|
||||
}]);
|
||||
removeAttrViewColAnimation(options.blockElement, colId);
|
||||
avPanelElement.remove();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue