Skip to content

Commit 7c6db8a

Browse files
committed
feat(devops): define ComponentSlotItemExtra in Slot
1 parent fb8e9fc commit 7c6db8a

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

devops/model/canvas.go

+12-5
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ type ComponentSchema struct {
195195
Method string `json:"method,omitempty"` // component initialization generates the corresponding function name (official components support cloning creation, custom components only support referencing existing components)
196196

197197
Slots []Slot `json:"slots,omitempty"`
198+
// SlotCounter return the historical count of the slot.
199+
SlotCounter int `json:"slot_counter,omitempty"`
198200

199201
Config *ConfigSchema `json:"config,omitempty"`
200202
ExtraProperty *ExtraPropertySchema `json:"extra_property,omitempty"`
@@ -214,14 +216,19 @@ type ExtraPropertySchema struct {
214216
ExtraPropertyInput string `json:"extra_property_input"`
215217
}
216218

219+
type ComponentSlotItemExtra struct {
220+
Index int `json:"index"`
221+
}
222+
217223
type Slot struct {
218224
Component string `json:"component"`
219225

220226
// The path of the configuration field.
221227
// for example: if there is no nesting, it means Field, if there is a nested structure, it means Field.NestField.
222-
FieldLocPath string `json:"field_loc_path"`
223-
Multiple bool `json:"multiple"`
224-
Required bool `json:"required"`
225-
ComponentItems []ComponentSchema `json:"component_items"`
226-
GoDefinition *GoDefinition `json:"go_definition,omitempty"`
228+
FieldLocPath string `json:"field_loc_path"`
229+
Multiple bool `json:"multiple"`
230+
Required bool `json:"required"`
231+
ComponentItems []*ComponentSchema `json:"component_items"`
232+
ComponentSlotItemExtra []*ComponentSlotItemExtra `json:"component_slot_item_extra"`
233+
GoDefinition *GoDefinition `json:"go_definition,omitempty"`
227234
}

0 commit comments

Comments
 (0)