This commit is contained in:
Daniel 2023-10-06 10:17:52 +08:00
parent 8db022ec8a
commit a3ea6a2362
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 4 additions and 3 deletions

View file

@ -82,11 +82,12 @@ type Key struct {
Template string `json:"template"` // 模板内容
}
func NewKey(id, name string, keyType KeyType) *Key {
func NewKey(id, name, icon string, keyType KeyType) *Key {
return &Key{
ID: id,
Name: name,
Type: keyType,
Icon: icon,
}
}
@ -397,7 +398,7 @@ type Viewable interface {
func NewAttributeView(id string) (ret *AttributeView) {
view := NewView()
key := NewKey(ast.NewNodeID(), "Block", KeyTypeBlock)
key := NewKey(ast.NewNodeID(), "Block", "", KeyTypeBlock)
ret = &AttributeView{
Spec: 0,
ID: id,