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/7522

Liang Ding9cede8f1a440
diff --git a/kernel/model/transaction.go b/kernel/model/transaction.go
index 6c4adb2e13..bfabcf24ce 100644
--- a/kernel/model/transaction.go
+++ b/kernel/model/transaction.go
@@ -213,6 +213,10 @@ func performTx(tx *Transaction) (ret *TxErr) {
ret = tx.doUnfoldHeading(op)
case "setAttrs":
ret = tx.setAttrs(op)
+ case "insertAttrViewBlock":
+ ret = tx.insertAttrViewBlock(op)
+ case "removeAttrViewBlock":
+ ret = tx.removeAttrViewBlock(op)
}
if nil != ret {
@@ -232,6 +236,14 @@ func performTx(tx *Transaction) (ret *TxErr) {
return
}
+func (tx *Transaction) insertAttrViewBlock(operation *Operation) (ret *TxErr) {
+ return
+}
+
+func (tx *Transaction) removeAttrViewBlock(operation *Operation) (ret *TxErr) {
+ return
+}
+
func (tx *Transaction) doMove(operation *Operation) (ret *TxErr) {
var err error
id := operation.ID
@@ -1021,6 +1033,7 @@ type Operation struct {
ParentID string `json:"parentID"`
PreviousID string `json:"previousID"`
NextID string `json:"nextID"`
+ SrcIDs []string `json:"srcIDs"` // 用于将块拖拽到属性视图中
RetData interface{} `json:"retData"`
discard bool // 用于标识是否在事务合并中丢弃