mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
ac227fe375
commit
a945cf9c18
1 changed files with 9 additions and 2 deletions
|
|
@ -848,6 +848,7 @@ export const openMenuPanel = (options: {
|
||||||
} else if (type === "updateColType") {
|
} else if (type === "updateColType") {
|
||||||
if (target.dataset.newType !== target.dataset.oldType) {
|
if (target.dataset.newType !== target.dataset.oldType) {
|
||||||
const name = (avPanelElement.querySelector('.b3-text-field[data-type="name"]') as HTMLInputElement).value;
|
const name = (avPanelElement.querySelector('.b3-text-field[data-type="name"]') as HTMLInputElement).value;
|
||||||
|
data.view.columns.find((item: IAVColumn) => item.id === options.colId).type = target.dataset.newType as TAVCol;
|
||||||
transaction(options.protyle, [{
|
transaction(options.protyle, [{
|
||||||
action: "updateAttrViewCol",
|
action: "updateAttrViewCol",
|
||||||
id: options.colId,
|
id: options.colId,
|
||||||
|
|
@ -899,10 +900,16 @@ export const openMenuPanel = (options: {
|
||||||
blockID
|
blockID
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
avPanelElement.remove();
|
menuElement.innerHTML = getEditHTML({
|
||||||
|
protyle: options.protyle,
|
||||||
|
data,
|
||||||
|
colId: options.colId,
|
||||||
|
isCustomAttr
|
||||||
|
});
|
||||||
|
bindEditEvent({protyle: options.protyle, data, menuElement, isCustomAttr, blockID});
|
||||||
|
setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue