mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-12 15:11:10 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
f66ef65013
@ -72,9 +72,9 @@ type Key struct {
|
||||
Options []*KeySelectOption `json:"options,omitempty"` // 选项列表
|
||||
}
|
||||
|
||||
func NewKey(name string, keyType KeyType) *Key {
|
||||
func NewKey(id, name string, keyType KeyType) *Key {
|
||||
return &Key{
|
||||
ID: ast.NewNodeID(),
|
||||
ID: id,
|
||||
Name: name,
|
||||
Type: keyType,
|
||||
}
|
||||
@ -234,7 +234,7 @@ type Viewable interface {
|
||||
|
||||
func NewAttributeView(id string) (ret *AttributeView) {
|
||||
view := NewView()
|
||||
key := NewKey("Block", KeyTypeBlock)
|
||||
key := NewKey(ast.NewNodeID(), "Block", KeyTypeBlock)
|
||||
ret = &AttributeView{
|
||||
Spec: 0,
|
||||
ID: id,
|
||||
|
@ -656,7 +656,7 @@ func addAttributeViewColumn(operation *Operation) (err error) {
|
||||
keyType := av.KeyType(operation.Typ)
|
||||
switch keyType {
|
||||
case av.KeyTypeText, av.KeyTypeNumber, av.KeyTypeDate, av.KeyTypeSelect, av.KeyTypeMSelect:
|
||||
key := av.NewKey(operation.Name, keyType)
|
||||
key := av.NewKey(operation.ID, operation.Name, keyType)
|
||||
attrView.KeyValues = append(attrView.KeyValues, &av.KeyValues{Key: key})
|
||||
|
||||
switch view.LayoutType {
|
||||
|
Loading…
Reference in New Issue
Block a user