Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-07-17 11:22:52 +08:00
commit f66ef65013
2 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -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 {