Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/11428

Vanessa0a56ef608bad
diff --git a/app/src/protyle/render/av/blockAttr.ts b/app/src/protyle/render/av/blockAttr.ts
index 120ecfceb3..0c2ad80696 100644
--- a/app/src/protyle/render/av/blockAttr.ts
+++ b/app/src/protyle/render/av/blockAttr.ts
@@ -225,17 +225,15 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone", "block"]
const undoPreviousID = window.siyuan.dragElement.previousElementSibling?.getAttribute("data-col-id");
if (previousID !== undoPreviousID && previousID !== window.siyuan.dragElement.dataset.colId) {
transaction(protyle, [{
- action: "sortAttrViewCol",
+ action: "sortAttrViewKey",
avID: dragBlockElement.dataset.avId,
previousID,
id: window.siyuan.dragElement.dataset.colId,
- blockID: id
- }, {
- action: "sortAttrViewCol",
+ }], [{
+ action: "sortAttrViewKey",
avID: dragBlockElement.dataset.avId,
previousID: undoPreviousID,
id,
- blockID: id
}]);
if (isBottom) {
targetElement.after(window.siyuan.dragElement);
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index c6b92520d7..67519a627d 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -765,7 +765,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
"setAttrViewSorts", "setAttrViewColCalc", "removeAttrViewCol", "updateAttrViewColNumberFormat", "removeAttrViewBlock",
"replaceAttrViewBlock", "updateAttrViewColTemplate", "setAttrViewColPin", "addAttrViewView", "setAttrViewColIcon",
"removeAttrViewView", "setAttrViewViewName", "setAttrViewViewIcon", "duplicateAttrViewView", "sortAttrViewView",
- "updateAttrViewColRelation", "setAttrViewPageSize", "updateAttrViewColRollup"].includes(operation.action)) {
+ "updateAttrViewColRelation", "setAttrViewPageSize", "updateAttrViewColRollup", "sortAttrViewKey"].includes(operation.action)) {
refreshAV(protyle, operation);
return;
}
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index 76a47f2121..3a6d0125f4 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -23,6 +23,7 @@ type TOperation =
| "updateAttrViewColTemplate"
| "sortAttrViewRow"
| "sortAttrViewCol"
+ | "sortAttrViewKey"
| "setAttrViewColPin"
| "setAttrViewColHidden"
| "setAttrViewColWrap"