mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 Improve av https://github.com/siyuan-note/siyuan/issues/15561
This commit is contained in:
parent
3e033079bd
commit
5efe525e3c
1 changed files with 4 additions and 1 deletions
|
@ -3083,7 +3083,10 @@ func fillDefaultValue(attrView *av.AttributeView, view, groupView *av.View, prev
|
||||||
keyValues.Values = append(keyValues.Values, newValue)
|
keyValues.Values = append(keyValues.Values, newValue)
|
||||||
} else {
|
} else {
|
||||||
newValueRaw := newValue.GetValByType(keyValues.Key.Type)
|
newValueRaw := newValue.GetValByType(keyValues.Key.Type)
|
||||||
existingVal.SetValByType(keyValues.Key.Type, newValueRaw)
|
if av.KeyTypeBlock != existingVal.Type || (av.KeyTypeBlock == existingVal.Type && existingVal.IsDetached) {
|
||||||
|
// 非主键的值直接覆盖,主键的值只覆盖非绑定块
|
||||||
|
existingVal.SetValByType(keyValues.Key.Type, newValueRaw)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue