mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-12 23:21:23 +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"` // 选项列表
|
Options []*KeySelectOption `json:"options,omitempty"` // 选项列表
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewKey(name string, keyType KeyType) *Key {
|
func NewKey(id, name string, keyType KeyType) *Key {
|
||||||
return &Key{
|
return &Key{
|
||||||
ID: ast.NewNodeID(),
|
ID: id,
|
||||||
Name: name,
|
Name: name,
|
||||||
Type: keyType,
|
Type: keyType,
|
||||||
}
|
}
|
||||||
@ -234,7 +234,7 @@ type Viewable interface {
|
|||||||
|
|
||||||
func NewAttributeView(id string) (ret *AttributeView) {
|
func NewAttributeView(id string) (ret *AttributeView) {
|
||||||
view := NewView()
|
view := NewView()
|
||||||
key := NewKey("Block", KeyTypeBlock)
|
key := NewKey(ast.NewNodeID(), "Block", KeyTypeBlock)
|
||||||
ret = &AttributeView{
|
ret = &AttributeView{
|
||||||
Spec: 0,
|
Spec: 0,
|
||||||
ID: id,
|
ID: id,
|
||||||
|
@ -656,7 +656,7 @@ func addAttributeViewColumn(operation *Operation) (err error) {
|
|||||||
keyType := av.KeyType(operation.Typ)
|
keyType := av.KeyType(operation.Typ)
|
||||||
switch keyType {
|
switch keyType {
|
||||||
case av.KeyTypeText, av.KeyTypeNumber, av.KeyTypeDate, av.KeyTypeSelect, av.KeyTypeMSelect:
|
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})
|
attrView.KeyValues = append(attrView.KeyValues, &av.KeyValues{Key: key})
|
||||||
|
|
||||||
switch view.LayoutType {
|
switch view.LayoutType {
|
||||||
|
Loading…
Reference in New Issue
Block a user